Skip to content

Conversation

hjoliver
Copy link
Member

@hjoliver hjoliver commented Sep 20, 2025

Close #6744

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.

@hjoliver hjoliver added this to the 8.7.0 milestone Sep 20, 2025
@hjoliver hjoliver self-assigned this Sep 20, 2025
@hjoliver hjoliver force-pushed the relax-optionality-constraints branch from 28d541e to 80ca9c9 Compare September 24, 2025 03:13
@hjoliver hjoliver marked this pull request as ready for review September 24, 2025 03:31
@wxtim wxtim self-requested a review September 24, 2025 08:54
@hjoliver hjoliver force-pushed the relax-optionality-constraints branch 7 times, most recently from 5086645 to 025515d Compare September 28, 2025 00:09
Comment on lines +667 to +670
if name in self.family_map:
raise GraphParseError(
f"Family trigger required: {left} => {right}"
)
Copy link
Member Author

@hjoliver hjoliver Sep 28, 2025

Choose a reason for hiding this comment

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

Bug in master: the code here was adding :succeeded to bare family names on the left side of trigger pairs: FAM --> FAM:succeeded.

This results in failed validation later, but with a cryptic error message.

E.g. for a => FAM => c on master:

$ cylc val .
GraphParseError: Illegal family trigger in FAM:succeeded

On this branch:

$ cylc val .
GraphParseError: Family trigger required: FAM => c

for outp in [TASK_OUTPUT_SUCCEEDED, TASK_OUTPUT_FAILED]:
self._set_output_opt(
name, outp, optional, suicide, fam_member)
return
Copy link
Member Author

Choose a reason for hiding this comment

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

Bug in master, possibly inconsequential though.

@hjoliver hjoliver force-pushed the relax-optionality-constraints branch from 025515d to f50182e Compare September 28, 2025 00:20
@wxtim wxtim self-requested a review September 29, 2025 13:42
Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

LGTM.

Nice tests.

Ensured that it's still possible to mark an output as optional on the RHS when required.

Ran through the examples in https://cylc.github.io/cylc-doc/stable/html/user-guide/writing-workflows/scheduling.html#graph-branching and checked that the auto-generated completion expressions match before and after.

One efficiency suggestion that I'll punt to a followup PR.

@oliver-sanders oliver-sanders merged commit 3dc42f1 into cylc:master Sep 30, 2025
23 checks passed
@MetRonnie MetRonnie modified the milestones: 8.7.0, 8.6.0 Sep 30, 2025
@hjoliver hjoliver deleted the relax-optionality-constraints branch September 30, 2025 20:03
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.

Tweak output optionality inference to avoid confusing syntax.

4 participants