-
Notifications
You must be signed in to change notification settings - Fork 94
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
broadcast: report invalid settings #6574
base: master
Are you sure you want to change the base?
Conversation
b111fc7
to
3c02de1
Compare
* We already report invalid cycle points and namespaces. * However, we have been relying on client-side validation for settings (which doesn't apply to the GraphQL mutation). * This also raises the potential for inter-version compatibility issues going unreported. * This commit explicitly handles invalid settings in the same way as invalid cycle points and namespaces so that they are reported back to the user. * Closes the issue part of cylc#6429. * Additionally: * This change also strips duplicate entries from broadcast reports. * And fixes the CLI options in broadcast report to match `cylc broadcast`.
Note to self, if #6554 is merged before this, change the code to return the invalid broadcast to the user rather than just logging it server side: |
6554 has been merged. |
ret = [] | ||
for item in iterable: | ||
if item not in ret: | ||
ret.append(item) | ||
return ret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do this you can also do away with a bit of the documentation too: There's no point having the same doctest for both functions.
ret = [] | |
for item in iterable: | |
if item not in ret: | |
ret.append(item) | |
return ret | |
return list(iter_uniq(iterable)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(note, this is a code move from the resolvers module)
I suspect it's probably more efficient to build a list directly, than to build a set, then build a list from the set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 small suggestion.
- Manually tested as working.
- Read - seems reasonable.
- Still needs to reject
run mode
if workflow is insimulation
, ordummy
mode.
broadcast: report invalid settings
cylc broadcast
.Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).?.?.x
branch.