task_events_mgr: task events should not be able to re-wind task state.#7288
Open
oliver-sanders wants to merge 1 commit into
Open
task_events_mgr: task events should not be able to re-wind task state.#7288oliver-sanders wants to merge 1 commit into
oliver-sanders wants to merge 1 commit into
Conversation
* Closes cylc#7269 * This fixes a bug where a delayed poll notification could cause a final-state task to re-wind to submitted/running.
MetRonnie
reviewed
Apr 30, 2026
MetRonnie
left a comment
Member
There was a problem hiding this comment.
From my understanding, if process_message() returns True (indicating an attempt at a backwards state change) then the scheduler will poll the task to confirm. By removing the check for FLAG_RECEIVED is there now the potential for an endless polling loop where the poll always tries to take the task to an earlier state? (It seems unlikely to happen though)
In any case I think this poll to confirm is now useless and ought to be removed?
cylc-flow/cylc/flow/scheduler.py
Lines 990 to 998 in 8b5257a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the bug, however, it does so by reverting a long-standing behaviour introduced in #2638 (we've been doing it this way ever since we dropped the poll-to-confirm approach).
I'm not sure why we would want to allow task state to re-wind in the event of
FLAG_POLLEDbut notFLAG_RECEIVED,FLAG_INTERNALmight make sense, however, due to implied task state changes, the message will already have been processed and the children spawned, so it's not clear that this logic was required in any case?Check List
CONTRIBUTING.mdand added my name as a Code Contributor.setup.cfg(andconda-environment.ymlif present).?.?.xbranch.