Repository navigation
Merge v1.x.x (v1.13.1) into v2.x.x - #627
Merged
Merged
Conversation
After waking up, `ready()` cancels the task it is no longer waiting for and awaits it, catching its `CancelledError`. If the task running `ready()` is itself cancelled while it awaits there, the `except` clause catches that cancellation too. After a reset, `ready()` then goes back to sleeping until the next tick, so a `select()` or service being stopped can hang for a whole timer interval. After a tick, the cancellation is lost and `ready()` returns as if nothing happened. Wait for the cancelled tasks with `asyncio.wait()` instead. It doesn't raise the tasks' exceptions, but it still raises `CancelledError` when the task running `ready()` is cancelled. The new test cancels `ready()` at several loop iterations after a reset and after a tick, so it doesn't depend on exactly when the cleanup happens. Without the fix, it fails for 3 and 4 iterations in both cases. The deprecated `Timer` is an alias of `MonotonicTimer`, so it's fixed too. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Cancelling a task waiting in `MonotonicTimer.ready()` right after the timer was reset or ticked could be ignored, because the cleanup of the task `ready()` stopped waiting for also caught the caller's own `CancelledError`. The commit message has the details. Fixes frequenz-floss#624.
Add a summary and remove the template comments and the empty sections, as the release process requires before tagging. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Adds a summary and removes the template comments and the empty sections, so v1.13.1 can be tagged. The only change in this release is frequenz-floss#625.
This merges `v1.x.x` (aa72a4c, v1.13.1) into `v2.x.x`, so v2 gets the fix for timers ignoring the cancellation of a task waiting on them (frequenz-floss#625), to be released as v2.0.1. There were no conflicts. The only change on top of the merge is in `RELEASE_NOTES.md`: the bug fix entry no longer mentions the deprecated `Timer` alias, since v2 doesn't have it. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
llucax
marked this pull request as ready for review
November 25, 2026 10:14
llucax
requested review from
daniel-zullo-frequenz
and removed request for
a team
November 25, 2026 10:14
llucax
enabled auto-merge
November 25, 2026 10:14
Contributor
Author
|
BTW, this is just porting the timer cancellation fix to v2.x.x. |
daniel-zullo-frequenz
approved these changes
Nov 25, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to Branch Protection failures
Nov 25, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
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.
Brings the timer cancellation fix from #625 (released in v1.13.1) to
v2.x.x, with the release notes for v2.0.1. The release notes entry drops the mention of the deprecatedTimer, which v2 doesn't have.Fixes #624.