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

Recompute runahead limit after cylc remove #5192

Merged
merged 3 commits into from
Oct 13, 2022

Conversation

hjoliver
Copy link
Member

@hjoliver hjoliver commented Oct 13, 2022

This is a trivial fix, but diagnosing the problem was complicated by #5186

With the example of #5185, on this branch:

Run till stalled with 1,2,3,4,5/b failed.

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.
  • 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, PRs raised to both master and the relevant maintenance branch.

@hjoliver hjoliver added the bug label Oct 13, 2022
@hjoliver hjoliver self-assigned this Oct 13, 2022
@hjoliver hjoliver added this to the cylc-8.0.3 milestone Oct 13, 2022
@wxtim wxtim self-requested a review October 13, 2022 09:53
Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

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

  • Tried example workflow - fails at master, works on branch
  • Read the code
  • Poked the change in the checked-out copy.

Comment on lines +563 to +578
async def test_runahead_after_remove(
example_flow: Scheduler
) -> None:
"""The runahead limit should be recomputed after tasks are removed.

"""
task_pool = example_flow.pool
assert int(task_pool.runahead_limit_point) == 4

# No change after removing an intermediate cycle.
task_pool.remove_tasks(['3/*'])
assert int(task_pool.runahead_limit_point) == 4

# Should update after removing the first point.
task_pool.remove_tasks(['1/*'])
assert int(task_pool.runahead_limit_point) == 5
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

🤣 classic.

image

@oliver-sanders oliver-sanders merged commit 481c0dc into cylc:8.0.x Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants