Use ComponentId instead of int TargetComponents#156
Merged
Marenz merged 2 commits intofrequenz-floss:v0.x.xfrom May 27, 2025
Merged
Use ComponentId instead of int TargetComponents#156Marenz merged 2 commits intofrequenz-floss:v0.x.xfrom
Marenz merged 2 commits intofrequenz-floss:v0.x.xfrom
Conversation
Signed-off-by: Elzbieta Kotulska <elzbieta.kotulska@frequenz.com>
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the dispatching logic to use ComponentId for target components instead of raw integer IDs while also improving type clarity.
- Migrate TargetComponents type definition to support list[ComponentId] | list[ComponentCategory].
- Introduce a helper function to convert integer target components to ComponentId instances.
- Update dependency versions and release notes accordingly.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/frequenz/dispatch/_actor_dispatcher.py | Replaces TargetComponents type definition and adds conversion logic for integer components. |
| pyproject.toml | Updates dependency version for frequenz-sdk. |
| RELEASE_NOTES.md | Documents the breaking change in DispatchInfo.components type. |
llucax
previously approved these changes
May 27, 2025
|
|
||
| * This release now supports the sdk up to rc2000. | ||
| * Less logs are now on `INFO` level, and more on `DEBUG` level, making the output less verbose. | ||
| * Changed the type of `DispatchInfo.components` from `list[int] | list[ComponentCategory]` to `list[ComponentId] | list[ComponentCategory]`, where `ComponentId` is imported from `frequenz.client.microgrid`. |
Contributor
There was a problem hiding this comment.
Maybe clarify that this is temporary until ComponentId is moved to api-common.
Contributor
There was a problem hiding this comment.
I'll update the release notes accordingly before release
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
llucax
approved these changes
May 27, 2025
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.
No description provided.