Skip to content

Conversation

@Marenz
Copy link
Contributor

@Marenz Marenz commented Oct 1, 2025

To stay backwards compatible.

@Marenz Marenz requested a review from a team as a code owner October 1, 2025 08:11
@Marenz Marenz requested review from Copilot and ela-kotulska-frequenz and removed request for ela-kotulska-frequenz October 1, 2025 08:11
@github-actions github-actions bot added the part:dispatcher Affects the high-level dispatcher interface label Oct 1, 2025
Copy link

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 PR adds backwards compatibility support for the DispatchUpdate constructor by accepting a deprecated components parameter alongside the new target parameter. The change ensures existing code using the old parameter name continues to work while providing a deprecation warning to encourage migration.

  • Added custom __init__ method to DispatchUpdate class
  • Implemented parameter validation and deprecation warning for components parameter
  • Maintained backwards compatibility while encouraging migration to target parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Marenz Marenz requested review from Copilot and llucax October 1, 2025 08:19
@Marenz Marenz added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Oct 1, 2025
Copy link

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

options: dict[str, Any],
_src: Dispatch,
) -> None:
"""Initialize the DispatchInfo.
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring incorrectly refers to 'DispatchInfo' but this is the constructor for 'DispatchUpdate'. The class name should be corrected.

Copilot uses AI. Check for mistakes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, the class name is DispatchInfo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the commit title though

Copy link
Contributor

@llucax llucax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that, LGTM, feel free to force-merge afterwards.

options: dict[str, Any],
_src: Dispatch,
) -> None:
"""Initialize the DispatchInfo.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This.

@Marenz Marenz changed the title Make DispatchUpdate c'tor accept components Make DispatchInfo c'tor accept components Oct 1, 2025
To stay backwards compatible.

Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
@Marenz Marenz merged commit 4cea8eb into frequenz-floss:v0.x.x Oct 1, 2025
5 checks passed
@Marenz Marenz deleted the backwards branch October 1, 2025 10:09
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:dispatcher Affects the high-level dispatcher interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants