Skip to content

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

Merged
merged 2 commits into from
May 27, 2025

Conversation

ela-kotulska-frequenz
Copy link
Contributor

No description provided.

@ela-kotulska-frequenz ela-kotulska-frequenz self-assigned this May 27, 2025
@Copilot Copilot AI review requested due to automatic review settings May 27, 2025 13:02
@ela-kotulska-frequenz ela-kotulska-frequenz added the part:actor Affects the dispatching actor label May 27, 2025
@ela-kotulska-frequenz ela-kotulska-frequenz requested a review from a team as a code owner May 27, 2025 13:02
@github-actions github-actions bot added part:docs Affects the documentation part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) part:dispatcher Affects the high-level dispatcher interface labels May 27, 2025
Copy link

@Copilot Copilot AI left a 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.

@ela-kotulska-frequenz ela-kotulska-frequenz changed the title Use ComponentId instead of in TargetComponents Use ComponentId instead of int TargetComponents May 27, 2025
llucax
llucax previously approved these changes May 27, 2025
@@ -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`.
Copy link
Contributor

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.

Copy link
Contributor

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

@Marenz Marenz dismissed llucax’s stale review May 27, 2025 13:19

I'd like to have tests first

@github-actions github-actions bot added the part:tests Affects the unit, integration and performance (benchmarks) tests label May 27, 2025
@Marenz Marenz added this pull request to the merge queue May 27, 2025
@Marenz Marenz removed this pull request from the merge queue due to a manual request May 27, 2025
@Marenz Marenz added this pull request to the merge queue May 27, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit c8973fc May 27, 2025
5 checks passed
@ela-kotulska-frequenz ela-kotulska-frequenz deleted the add_component_id branch May 27, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:actor Affects the dispatching actor part:dispatcher Affects the high-level dispatcher interface part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants