Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate [platform groups][<name>]platforms against [platforms] #5938

Open
wxtim opened this issue Jan 26, 2024 · 2 comments
Open

Validate [platform groups][<name>]platforms against [platforms] #5938

wxtim opened this issue Jan 26, 2024 · 2 comments
Labels
question Flag this as a question for the next Cylc project meeting.
Milestone

Comments

@wxtim
Copy link
Member

wxtim commented Jan 26, 2024

Problem

It is possible to request invalid platforms be selected from platform groups. This will only show up at runtime.

Proposed Solution

Validate the platforms in global.cylc[platform groups][<name>]platforms against [platforms]

Example

[platforms]
    [[foo\d\d]]
         ...

[platform groups]
    [[foo]]
        platforms = foo11, foo22, foo33, foolish, foo44 foo55

Should fail validation:

> cylc config . -i 'platform groups'
[ERROR] NoPlatformsError: The following platforms from platform group [foo] are not defined:
  * foolish
  * foo44 foo55 (Should there have been a comma?)
@wxtim wxtim added this to the cylc-8.3.0 milestone Jan 26, 2024
@oliver-sanders oliver-sanders added the question Flag this as a question for the next Cylc project meeting. label Jan 29, 2024
@oliver-sanders oliver-sanders modified the milestones: cylc-8.3.0, some-day Jan 29, 2024
@oliver-sanders
Copy link
Member

oliver-sanders commented Jan 29, 2024

Potentially useful, but I'm not sure this should fail validation.

Note that we don't do any validation-time checking for platforms (as opposed to platform groups) whatsoever:

[runtime]
    [[foo]]
        platform = no-such-platform
$ cylc val .
Valid for Cylc 8.3.0.dev

Given that we don't check platforms it would be a bit odd to checkout platform groups.

@wxtim
Copy link
Member Author

wxtim commented Jan 29, 2024

To clarify - this is not about Cylc validate but about checking that all platforms referred to in [platform groups][<>]platforms are defined in [platforms].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Flag this as a question for the next Cylc project meeting.
Projects
None yet
Development

No branches or pull requests

2 participants