Skip to content

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Jul 23, 2025

Closes #6866

Follow-up to #4302

Apparently there was no systematic validation of whether users were supplying sensible values for these, except in a small number of cases.

In this PR, I write a thorough set of cases and ensure that they all pass.

Currently this targets 8.4.x, but I understand that given the refactoring it might be sensible enough to target 8.6.0.

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.

@wxtim wxtim requested a review from MetRonnie July 23, 2025 15:47
@wxtim wxtim self-assigned this Jul 23, 2025
@wxtim wxtim force-pushed the fix.validation_NNN_cycle_pt branch from e7708d2 to 223fefe Compare July 23, 2025 15:49
@wxtim wxtim marked this pull request as draft July 25, 2025 07:08
@wxtim
Copy link
Member Author

wxtim commented Jul 25, 2025

Broken the one test which did test any case

@wxtim wxtim marked this pull request as ready for review July 25, 2025 08:22
@wxtim wxtim force-pushed the fix.validation_NNN_cycle_pt branch 2 times, most recently from ef8574c to f81634e Compare July 28, 2025 09:56
@MetRonnie MetRonnie added this to the 8.4.x milestone Jul 29, 2025
Comment on lines +834 to +848
f"{label1} cycle point '{point1}' will have no effect as"
f" it is {order} the {label2} cycle point '{point2}'."
Copy link
Member

Choose a reason for hiding this comment

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

I think there is conflation of 2 different cases here.

  1. Valid but useless X cycle point. E.g.:

    start cycle point '1' before the initial cycle point '2'

    This should give a warning.

  2. Invalid X cycle point. E.g.:

    stop cycle point '1' before the initial cycle point '2'

    I think this ought to raise an input error.

Copy link
Member Author

@wxtim wxtim Aug 11, 2025

Choose a reason for hiding this comment

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

There are already errors raised elsewhere for seriously bad cases (mostly final < initial).

I can't see, however why you think these two cases should be treated differently - Neither make a lick of sense, but I don't think one is more clearly wrong than the other?

Copy link
Member

Choose a reason for hiding this comment

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

Case 2 is a user error that will result in the workflow shutting down immediately. It would be more helpful to flag up this error instead of just warning?

Copy link
Member Author

Choose a reason for hiding this comment

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

will result in the workflow shutting down immediately

I think that's less dangerous than case 1 where the workflow runs, but if the user intended startcp=10 it won't work as expected, but will do so quietly.

Copy link
Member

Choose a reason for hiding this comment

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

I think I am happy for case 1 to raise an error too. However we may want to discuss this

@wxtim wxtim modified the milestones: 8.4.x, 8.5.x Aug 11, 2025
@oliver-sanders oliver-sanders modified the milestones: 8.5.x, 8.7.0 Aug 11, 2025
@oliver-sanders
Copy link
Member

(assigning commenters as reviewers)

@wxtim wxtim marked this pull request as draft August 27, 2025 08:08
@wxtim
Copy link
Member Author

wxtim commented Aug 27, 2025

Draft because it's broken loads of tests

@wxtim wxtim force-pushed the fix.validation_NNN_cycle_pt branch from badaf1f to c5cbfd1 Compare October 2, 2025 15:45
@wxtim wxtim changed the base branch from 8.4.x to 8.6.x October 2, 2025 15:45
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.

4 participants