-
Notifications
You must be signed in to change notification settings - Fork 6
Use ComponentId instead of int TargetComponents #156
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
Use ComponentId instead of int TargetComponents #156
Conversation
Signed-off-by: Elzbieta Kotulska <[email protected]>
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 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. |
@@ -12,6 +12,7 @@ | |||
|
|||
* 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`. |
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.
Maybe clarify that this is temporary until ComponentId
is moved to api-common
.
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.
I'll update the release notes accordingly before release
Signed-off-by: Mathias L. Baumann <[email protected]>
No description provided.