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

config: validate task messages and outputs #5606

Merged

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Jun 28, 2023

At this moment users can do things like this:

[runtime]
  [[task]]
    [[[outputs]]]
      succeeded = failed  # shadowing builtin output, undefined behaviour
      a:b = abc  # not compatible with graph syntax
      required = required  # conflicts with cylc terminology
      BE $$ EF ££ WELL )(*& TON =  ?  # just nasty
  • Task messages & outputs should be validated to avoid users shadowing built-in messages, outputs or qualifiers.
  • Reserve the _cylc prefix save we need it later.

Also reserve the outputs required, optional and all as keywords for future use by cylc set, see cylc set proposal. This proposal isn't approved yet and won't be implemented until Cylc 8.3.0, however, we may as well reserve these keywords now as the proposal will not change their meaning.

I've checked workflows at our end and have found shockingly little usage of custom outputs and no obvious breakages as a result of these changes.

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).
  • CHANGES.md entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at remove duplicate index cylc-doc#617.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

* Task messages & outputs should be validated to avoid users shadowing built-in
  messages, outputs or qualifiers.
* Reserve the outputs `required`, `optional` and `all` as keywords
  for future use by `cylc set`.
* Reserve the `_cylc` prefix save we need it later.
@oliver-sanders oliver-sanders added this to the cylc-8.2.0 milestone Jun 28, 2023
@oliver-sanders oliver-sanders self-assigned this Jun 28, 2023
CHANGES.md Outdated Show resolved Hide resolved
Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V. nice 👍

cylc/flow/unicode_rules.py Outdated Show resolved Hide resolved
tests/integration/validate/test_outputs.py Outdated Show resolved Hide resolved
tests/integration/validate/test_outputs.py Outdated Show resolved Hide resolved
cylc/flow/cfgspec/workflow.py Outdated Show resolved Hide resolved
cylc/flow/unicode_rules.py Outdated Show resolved Hide resolved
cylc/flow/unicode_rules.py Outdated Show resolved Hide resolved
Co-authored-by: Ronnie Dutta <[email protected]>
Co-authored-by: Hilary James Oliver <[email protected]>
cylc/flow/unicode_rules.py Outdated Show resolved Hide resolved
@oliver-sanders oliver-sanders merged commit 502a16b into cylc:master Jul 4, 2023
@oliver-sanders oliver-sanders deleted the validate-task-messages-and-outputs branch July 4, 2023 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants