allow workflow config to unset global events config#6518
allow workflow config to unset global events config#6518MetRonnie merged 5 commits intocylc:8.4.xfrom
Conversation
71761af to
15ad245
Compare
a4d2d8f to
c718f8b
Compare
c718f8b to
3b8a7df
Compare
878597f to
0761f1a
Compare
|
Thanks @TomekTrzeciak 👍 it might be January before we have a chance to look at this however |
|
This would change the meaning of The "reset to empty lisy" behaviour makes sense, but unfortunately, I think there may be valid use cases for both behaviours (especially when you take inheritance into account). I had a skim through workflows at our site to see what list items are being "unset" in this way and found the following:
|
|
I think this "reset to global default" behaviour only happens for events settings and no other settings? |
My reading is that only
Out of this list only |
|
So this change would mean:
Seems good to me, no blockers as far as NIWA is concerned. @oliver-sanders - would it be sufficient for you just to ping the owners of the workflows you found and tell them about the change? |
Will do. I'll confirm the scope of the change and try to work out the intention of the users impacted. So long as it's just |
There was a problem hiding this comment.
👍
I've taken a look into the change and am happy with the scope.
I had a look on site and found mail events = in 513 run dirs belonging to 47 users internally. I highly doubt that this change has the potential to cause any issues, but I've put up an internal bulletin to ensure that folks are aware. I don't think we need to go any further than that.
A quick changelog would be appreciated.
|
Sorry, just gotten round to this. Apparently though, it is already possible to unset events by using a value of # flow.cylc
[scheduler]
[[events]]
mail events = None(Apologies for not realising this when you asked me back in December!) |
|
^ @TomekTrzeciak thoughts? |
|
cylc-flow/cylc/flow/cfgspec/workflow.py Lines 396 to 405 in 5b2b180 I had forgotten about this too, sorry. However, it doesn't seem to be documented, and use of "None" (being Pythonic) is weird in a config file. |
|
Actually I've realised that |
MetRonnie
left a comment
There was a problem hiding this comment.
I've pushed a changelog entry. Got one optional suggestion, take or leave it 👍
| try: | ||
| cmd = handler % (template_variables) | ||
| except KeyError as exc: | ||
| except (KeyError, TypeError, ValueError) as exc: |
There was a problem hiding this comment.
Think this could be simplified to
| except (KeyError, TypeError, ValueError) as exc: | |
| except Exception as exc: |
|
Actually, might as well merge |
* upstream/8.4.x: Ensure `cylc message` exceptions are printed to stderr (cylc#6647) fix typo in stop.py - options.max_poll -> options.max_polls doc: improve NamespaceIDGlob description (cylc#6637) Document that "ex" prefix means "exclude" [skip ci] tests: remove string templating in SQL statements (cylc#6631) Bump dev version Prepare release 8.4.1 Merge pull request cylc#6578 from MetRonnie/graphql-err-handling Update cylc/flow/etc/examples/expiry/index.rst Pytest: full verbosity for assertions Fix test picking up user global config Wrapper script: fix `PATH` override preventing selection of Cylc version in GUI under Cylc Hub Get poll to return task failure if job/log has been removed. (cylc#6577) work around NFS caching issues (cylc#6603) allow workflow config to unset global events config (cylc#6518) examples: document expiry workflow design patterns
* upstream/8.4.x: Ensure `cylc message` exceptions are printed to stderr (cylc#6647) fix typo in stop.py - options.max_poll -> options.max_polls doc: improve NamespaceIDGlob description (cylc#6637) Document that "ex" prefix means "exclude" tests: remove string templating in SQL statements (cylc#6631) Bump dev version Prepare release 8.4.1 Merge pull request cylc#6578 from MetRonnie/graphql-err-handling Update cylc/flow/etc/examples/expiry/index.rst Pytest: full verbosity for assertions Fix test picking up user global config Wrapper script: fix `PATH` override preventing selection of Cylc version in GUI under Cylc Hub Get poll to return task failure if job/log has been removed. (cylc#6577) work around NFS caching issues (cylc#6603) allow workflow config to unset global events config (cylc#6518) examples: document expiry workflow design patterns
This addresses a bug whereby it is not possible to reset list-type values like
mail eventsfrom the global config to empty list by overriding them in the workflow config.Check List
CONTRIBUTING.mdand added my name as a Code Contributor.setup.cfg(andconda-environment.ymlif present).?.?.xbranch.