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

allow workflow config to unset global events config #6518

Open
wants to merge 4 commits into
base: 8.4.x
Choose a base branch
from

Conversation

TomekTrzeciak
Copy link
Contributor

@TomekTrzeciak TomekTrzeciak commented Dec 6, 2024

This addresses a bug whereby it is not possible to reset list-type values like mail events from the global config to empty list by overriding them in the workflow config.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@MetRonnie MetRonnie self-requested a review December 6, 2024 12:37
@MetRonnie MetRonnie added this to the 8.4.1 milestone Dec 6, 2024
@MetRonnie MetRonnie added bug? Not sure if this is a bug or not small labels Dec 6, 2024
@TomekTrzeciak TomekTrzeciak force-pushed the workflow_events_fix branch 3 times, most recently from a4d2d8f to c718f8b Compare December 6, 2024 19:23
@TomekTrzeciak TomekTrzeciak marked this pull request as ready for review December 6, 2024 22:57
@MetRonnie
Copy link
Member

Thanks @TomekTrzeciak 👍 it might be January before we have a chance to look at this however

@oliver-sanders
Copy link
Member

oliver-sanders commented Jan 6, 2025

This would change the meaning of mail events = from "reset to global default" to "reset to empty list".

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:

  • mail events (a lot of instances)
  • (submission|execution) retry delays (a lot of instances)
  • handler events (a few instances)
  • collapsed families (a couple instances)

@MetRonnie
Copy link
Member

I think this "reset to global default" behaviour only happens for events settings and no other settings?

@TomekTrzeciak
Copy link
Contributor Author

I think this "reset to global default" behaviour only happens for events settings and no other settings?

My reading is that only events and mail settings under scheduler section would be affected by this change.

This would change the meaning of mail events = from "reset to global default" to "reset to empty list".

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:

  • mail events (a lot of instances)
  • (submission|execution) retry events (a lot of instances)
  • handler events (a few instances)
  • collapsed families (a couple instances)

Out of this list only mail events and handler events would be affected by this change. On our site only the former (mail events) is set in the global config and thus would behave differently (and as expected IMHO).

@hjoliver
Copy link
Member

hjoliver commented Jan 7, 2025

So this change would mean:

  • no mention in workflow config: you get the global defaults
  • explicit key = # nothing: you get nothing

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?

@MetRonnie MetRonnie changed the base branch from master to 8.4.x January 9, 2025 18:33
@oliver-sanders
Copy link
Member

@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 [scheduler][events and [scheduler][mail], I'm not expecting any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Not sure if this is a bug or not small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants