cylc-flow icon indicating copy to clipboard operation
cylc-flow copied to clipboard

Platform From Group Fails if Platform Selected is not Set Up

Open wxtim opened this issue 3 years ago • 4 comments

Describe the bug

Technically this is user/site admin error, but it seems like a simple fix: Currently if you have this config:

[platforms]
  [[platform1]]
    ...

[platform groups]
  [my_group]
    platforms = platform0, platform1

You get an error if the first, undefined platform is selected first, despite the fact that the second platform exists and would work.

This should be handle-able.

Pull requests welcome! This is an Open Source project - please consider contributing a bug fix yourself (please read CONTRIBUTING.md before starting any work though).

wxtim avatar Oct 20 '21 13:10 wxtim

This should be handle-able.

How should we handle this? Silently ignoring the missing platform wouldn't be a good idea.

Perhaps a warning or error?

oliver-sanders avatar Aug 04 '22 16:08 oliver-sanders

Re-reading this I'm not sure that it should be handleable!

If we wanted to we could warn rather than erroring?

Else feel free to close

wxtim avatar Aug 05 '22 08:08 wxtim

If possible I think this ought to fail to load in the same way as other invalid settings

dpmatthews avatar Aug 05 '22 12:08 dpmatthews

Ok, should be easy, needs adding to an existing validation interface:

https://github.com/cylc/cylc-flow/blob/04437b8d4a610e66befa538b3f4fd3336c1b34b7/cylc/flow/platforms.py#L714-L716

oliver-sanders avatar Aug 08 '22 16:08 oliver-sanders