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

command validation: broadcasts #6429

Open
oliver-sanders opened this issue Oct 17, 2024 · 0 comments
Open

command validation: broadcasts #6429

oliver-sanders opened this issue Oct 17, 2024 · 0 comments
Labels
could be better Not exactly a bug, but not ideal.
Milestone

Comments

@oliver-sanders
Copy link
Member

oliver-sanders commented Oct 17, 2024

If you try to broadcast an invalid configuration on the CLI, you get a helpful error:

$ cylc broadcast generic -s 'elephant = shrew'
IllegalItemError: elephant

However, if you try to broadcast an invalid configuration from the GUI, you get no error, and a cryptic message in the log:

2024-10-17T15:14:55Z INFO - Command "broadcast" received.
    broadcast(cycle_points=['*'], mode=put_broadcast, namespaces=[None], settings=[{'elephant': 'shrew'}])
Traceback (most recent call last):
...
graphql.error.located_error.GraphQLLocatedError: elephant

2024-10-17T15:14:55Z ERROR - elephant
2024-10-17T15:14:55Z ERROR - graphql.error.located_error.GraphQLLocatedError: elephant

The broadcast command is unlike other commands in that it is performed entirely at command queue time (broadcasts aren't queued to be processed later). It's also implemented outside of cylc.flow.commands for historical reasons.

Suggest moving the broadcast code into cylc.flow.commands (so it runs like a normal command) as this will give it the same error handling as other commands. But keep it all queue-time. Doing this should also forward the error to the client.

@oliver-sanders oliver-sanders added the could be better Not exactly a bug, but not ideal. label Oct 17, 2024
@oliver-sanders oliver-sanders added this to the 8.3.x milestone Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could be better Not exactly a bug, but not ideal.
Projects
None yet
Development

No branches or pull requests

1 participant