Draft
Conversation
sharpener6
reviewed
Dec 16, 2025
Collaborator
|
@magniloquency, can you remind me why you closed this one? |
Contributor
Author
|
@sharpener6, I closed this because, if I remember correctly, this PR fixed one problem but exposed another that would need fixes in the state machines. You said you would take a look at it, so I closed this PR thinking that you would raise your own |
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 PR closes #242.
Root cause:
VanillaWorkerController.on_task_cancel()didn't conform to its interface, because it did not return the worker ID. It also sent out the task cancel message, which the caller (VanillaTaskController.__send_task_cancel_to_worker()) was also set up to do, assuming the worker id was returned.Solution: Ensure that the worker id is always returned and check for validity in the caller. Only actually send the cancel message in the vanilla task controller.
Recommendation: Python 3.12 introduced
typing.override, which is available in pre-3.12 versions usingtyping_extensions, and enables type checking of overridden methods. Mypy also has an option to force all overridden methods to use the@overridedecorator. Mypy won't warn us for methods with a dynamic return type (no return type hint), but it might be possible for it to warn us on that as well.