Repository navigation
Wake tasks reparked into broken parking lots - #3534
Open
harbinresearcher wants to merge 2 commits into
Open
harbinresearcher wants to merge 2 commits into
harbinresearcher wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3534 +/- ##
===============================================
Coverage 100.00000% 100.00000%
===============================================
Files 128 128
Lines 19474 19504 +30
Branches 1323 1326 +3
===============================================
+ Hits 19474 19504 +30
🚀 New features to boost your workflow:
|
Contributor
|
Not sure this makes much sense, |
This branch has not been deployed
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.
Problem
ParkingLot.repark()currently inserts tasks into an already broken destination. These tasks remain blocked instead of raisingBrokenResourceError, unlike tasks that callpark()on that destination directly. Callingbreak_lot()again does not wake them, because it returns early for an already broken lot.Solution
Reschedule the selected tasks with
BrokenResourceErrorwhen the destination is broken. Do not enqueue them in the destination. Keep FIFO/count selection and the healthy-destination path unchanged.The regression tests use real Trio tasks and cover zero, partial, oversized and infinite counts, plus
repark_all(). They also verify that unselected source waiters can still be unparked normally.Testing
git diff --checkpassed.Unfiltered-suite limits on this machine
The unfiltered patched suite had 810 passed, 85 skipped, 3 xfailed and 6 failed. All six failures also occurred on pristine
bcc9ceeb8b22134515d3d4f66a99c14783bd5e6f: five tests compare Chinese-localized Windows errors to English messages, and the REPL keyboard-interrupt test decodes non-UTF-8 subprocess output as UTF-8.Excluded functions (eight cases, including platform skips):
test_wait_on_invalid_object,test_open_tcp_listeners_rebind,test_ki_in_repl,test_WaitForMultipleObjects_sync,test_WaitForSingleObject,test_pipe_error_on_close.The pristine unfiltered run had 803 passed, 85 skipped, 3 xfailed and 7 failed, including an additional intermittent socket-writability failure. An initial patched run also had a socket-writability failure; subsequent patched runs passed those tests. No unrelated IO tests or implementation were changed.
AI assistance: OpenAI Codex. The exact model version is not available in this environment.