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

Error if graph has a dependency offset exclusively on the RHS #5924

Merged
merged 8 commits into from
Mar 28, 2024

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Jan 16, 2024

Closes #5844

Raise an error if a graph has a dependency offset only on the RHS of a graph pair.

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 cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@wxtim wxtim added the bug Something is wrong :( label Jan 16, 2024
@wxtim wxtim added this to the cylc-8.2.5 milestone Jan 16, 2024
@wxtim wxtim self-assigned this Jan 16, 2024
@wxtim wxtim force-pushed the fix.5844.abs_dependency_on_RHS branch from 317908d to 93638db Compare January 16, 2024 11:01
@wxtim wxtim changed the base branch from master to 8.2.x January 16, 2024 11:03
@wxtim wxtim force-pushed the fix.5844.abs_dependency_on_RHS branch from 93638db to 7cd0bce Compare January 16, 2024 11:04
@oliver-sanders oliver-sanders marked this pull request as draft January 17, 2024 09:38
@MetRonnie MetRonnie requested review from MetRonnie and removed request for markgrahamdawson January 17, 2024 16:26
@wxtim wxtim force-pushed the fix.5844.abs_dependency_on_RHS branch from 7cd0bce to 91dd3e4 Compare January 29, 2024 09:13
@wxtim wxtim marked this pull request as ready for review January 29, 2024 09:14
@wxtim wxtim marked this pull request as draft January 29, 2024 09:53
@MetRonnie MetRonnie changed the title Error if graph has a dependency offset exclusively on the RHS of a gr… Error if graph has a dependency offset exclusively on the RHS Jan 29, 2024
@wxtim wxtim force-pushed the fix.5844.abs_dependency_on_RHS branch from 91dd3e4 to 8d48016 Compare February 12, 2024 11:13
@wxtim wxtim force-pushed the fix.5844.abs_dependency_on_RHS branch from 8d48016 to 50163fc Compare February 12, 2024 13:24
@wxtim wxtim marked this pull request as ready for review February 12, 2024 14:29
@oliver-sanders
Copy link
Member

@wxtim what does "…aph pair." mean?

@MetRonnie
Copy link
Member

I think he used the commit message as the PR title and it got truncated, continuing on the body. I updated the title to something a little more readable

cylc/flow/graph_parser.py Outdated Show resolved Hide resolved
cylc/flow/graph_parser.py Outdated Show resolved Hide resolved
cylc/flow/graph_parser.py Outdated Show resolved Hide resolved
cylc/flow/graph_parser.py Outdated Show resolved Hide resolved
cylc/flow/graph_parser.py Outdated Show resolved Hide resolved
tests/unit/test_graph_parser.py Outdated Show resolved Hide resolved
@wxtim wxtim requested a review from MetRonnie February 20, 2024 09:06
@oliver-sanders
Copy link
Member

wxtim requested a review from MetRonnie

@wxtim, you have an outstanding review comment.

@wxtim
Copy link
Member Author

wxtim commented Mar 25, 2024

wxtim requested a review from MetRonnie

@wxtim, you have an outstanding review comment.

I think that I was waiting for Ronnie and you finish the discussion. Will fix now.

tests/unit/test_graph_parser.py Outdated Show resolved Hide resolved
tests/unit/test_graph_parser.py Outdated Show resolved Hide resolved
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
@wxtim wxtim force-pushed the fix.5844.abs_dependency_on_RHS branch from 6c61253 to 5ad1611 Compare March 26, 2024 07:55
@oliver-sanders oliver-sanders requested review from hjoliver and removed request for oliver-sanders March 26, 2024 16:19
@oliver-sanders
Copy link
Member

oliver-sanders commented Mar 26, 2024

@hjoliver could you check you're happy with this approach.

This is back-filling a check which was removed in: https://github.com/cylc/cylc-flow/pull/4343/files#diff-be87b3fcb20fc3228166ad53af61efb79f0d0c84ee01fcd0c9e3092c788e0b93L374-L377 (see the issue)

I think the logic has become more complex in order to permit examples like a => b[-P1] => c which presumably failed validation at Cylc 7.

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.

If we need to merge this quickly for a maintenance release, I'm happy so long as the change log comment is straightened out, and preferably if the error message is too.

As a follow-up it would be nice to clean this up (same problem, very different error messages):

foo => bar[-P1] => baz  # TaskDefError: No cycling sequences defined for bar
foo => bar[-P1]  # GraphParseError: illegal cycle point offset on the right: foo => bar[-P1]

changes.d/fix.5924.md Outdated Show resolved Hide resolved
cylc/flow/graph_parser.py Outdated Show resolved Hide resolved
wxtim and others added 2 commits March 27, 2024 11:08
Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
@wxtim
Copy link
Member Author

wxtim commented Mar 27, 2024

@MetRonnie - I've used your words. Please merge at your leisure.

@MetRonnie
Copy link
Member

Tests need updating

@MetRonnie MetRonnie merged commit e1701b0 into cylc:8.2.x Mar 28, 2024
25 checks passed
@wxtim wxtim deleted the fix.5844.abs_dependency_on_RHS branch June 28, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

Successfully merging this pull request may close these issues.

graph parser: absolute dependency offset on the RHS
4 participants