-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Python: Fix/7859 discard pending state #8819
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
Open
Patel Namraa (Namraa310806)
wants to merge
24
commits into
microsoft:main
Choose a base branch
from
Namraa310806:fix/7859-discard-pending-state
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+228
−11
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
956f43f
fix(workflow): discard pending state after failed supersteps
Namraa310806 59a705a
Merge branch 'main' into fix/7859-discard-pending-state
Namraa310806 b5e6ca0
Merge branch 'main' into fix/7859-discard-pending-state
Namraa310806 da0154c
fix: discard pending state before yielding failure events
Namraa310806 2848ad2
Merge branch 'main' into fix/7859-discard-pending-state
Namraa310806 debc9ba
Merge branch 'main' into fix/7859-discard-pending-state
Namraa310806 8bfce51
fix: discard pending state from failed supersteps
Namraa310806 f6f7535
Merge branch 'main' into fix/7859-discard-pending-state
Namraa310806 018f570
Merge branch 'main' into fix/7859-discard-pending-state
Namraa310806 8dd250b
Merge branch 'main' into fix/7859-discard-pending-state
Namraa310806 729818d
Merge upstream/main into fix/7859-discard-pending-state
Namraa310806 aa573c7
Fixing failing CI/CD workflows
Namraa310806 d5a3223
Merge branch 'main' into fix/7859-discard-pending-state
Namraa310806 eda1814
Merge remote-tracking branch 'upstream/main' into fix/7859-discard-pe…
Namraa310806 547db3c
Fixing failing workflows
Namraa310806 7182915
Merge branch 'microsoft:main' into fix/7859-discard-pending-state
Namraa310806 d074130
Merge remote-tracking branch 'upstream/main' into fix/7859-discard-pe…
Namraa310806 89e43bb
Fixing failing workflows
Namraa310806 f809d8e
Merge branch 'microsoft:main' into fix/7859-discard-pending-state
Namraa310806 c70e117
Merge remote-tracking branch 'upstream/main' into fix/7859-discard-pe…
Namraa310806 c52fdd2
fix(workflows): clean up failed superstep state
Namraa310806 5e85602
Merge remote-tracking branch 'upstream/main' into fix/7859-discard-pe…
Namraa310806 e2e23ef
Merge branch 'main' into fix/7859-discard-pending-state
Namraa310806 92cca29
fix: preserve failed superstep state isolation
Namraa310806 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patel Namraa (@Namraa310806) Caller cancellation can still bypass this discard. If
run_until_convergence()is cancelled while awaitingasyncio.wait(...), thefinallycancels and drains the tasks and the originalCancelledErroris re-raised before execution reaches thisawait iteration_taskblock, leaving staged state pending for the next run. The regression’ssleep(0)also does not guarantee the write was staged. Could the wait-loop cancellation or closure path discard pending state directly and synchronize the test on the staged write?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, you're right. Current fix only handles cancellation at await iteration_task, not the asyncio.wait(...) edge-runner path, which has its own finally that skips discard. Planning to wrap the whole superstep scope in one try/finally with a committed flag so discard() runs on any non-success exit, no matter where cancellation hits. Also fixing the test to sync on an asyncio.Event instead of sleep(0), since that's not a real guarantee. Will add a second test that cancels inside the asyncio.wait(...) path too. Let me know if you'd rather see a different approach.