-
Notifications
You must be signed in to change notification settings - Fork 20
CI cleanup fixes #1239
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
Merged
Merged
CI cleanup fixes #1239
Conversation
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
Contributor
Marenz
commented
Jun 24, 2025
- Set min numpy version to lowest prebuilt python3.13-compatible release
- ComponentTracker: Use run_forever with eventloop fixes for _run() loop
- Actor: Don't restart on RuntimeError:No Running Eventloop
- Use get_running_loop() instead of str cmp to check for a running event loop
- cancel_and_wait: Re-raise if it was our task
- Fix swallowing of cancel error in Formula Engine & Voltage streamer
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.
Pull Request Overview
This PR cleans up CI compatibility and refines event loop and cancellation handling across several components.
- Bump numpy to ≥2.1.0 for Python 3.13 compatibility
- Propagate
CancelledErrorinstead of breaking loops in FormulaEngine and VoltageStreamer - Centralize continuous retry loops via
run_foreverand prevent actor restarts when no running event loop - Improve
cancel_and_awaitto re-raise cancellation and abort on missing event loop
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frequenz/sdk/timeseries/formula_engine/_formula_engine.py | Replace break with raise for CancelledError propagation |
| src/frequenz/sdk/timeseries/_voltage_streamer.py | Replace break with raise for CancelledError propagation |
| src/frequenz/sdk/microgrid/_power_distributing/_component_status/_battery_status_tracker.py | Wrap the main loop in run_forever |
| src/frequenz/sdk/actor/_actor.py | Skip restart when no event loop is running |
| src/frequenz/sdk/_internal/_asyncio.py | Refine cancel_and_await, add is_loop_running, abort on missing loop |
| pyproject.toml | Update numpy dependency to >=2.1.0,<3 |
Comments suppressed due to low confidence (1)
src/frequenz/sdk/actor/_actor.py:109
- [nitpick] The new branch that skips restarts when no event loop is running should be covered by a unit or integration test to prevent regressions.
if not is_loop_running():
src/frequenz/sdk/microgrid/_power_distributing/_component_status/_battery_status_tracker.py
Show resolved
Hide resolved
Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
…t loop Signed-off-by: Mathias L. Baumann <[email protected]>
Reraise the cancel error if it was our task that was cancelled. Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
shsms
approved these changes
Jun 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cmd:skip-release-notes
It is not necessary to update release notes for this PR
part:actor
Affects an actor ot the actors utilities (decorator, etc.)
part:core
Affects the SDK core components (data structures, etc.)
part:data-pipeline
Affects the data pipeline
part:microgrid
Affects the interactions with the microgrid
part:tooling
Affects the development tooling (CI, deployment, dependency management, etc.)
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.