Skip to content
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

Fix GraphMetadata serialization: attributes' order #659

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

olperr1
Copy link
Member

@olperr1 olperr1 commented Dec 2, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?

No

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

On some systems, the export order of GraphMetadata attributes is determined by the order of the 1st encountered JsonCreator's attributes and unescapedId is put in last place.
But on other systems, the export order is determined by the getters' order and unescapedId is put in 1st place, which leads to comparison errors in the unit tests.

What is the new behavior (if this is a feature change)?
To prevent this discrepancy, the order is manually fixed.

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

This problem was spotted via the pypowsybl "Snapshot CI" action. The problem occurs for the following jobs:

  • Build windows cp310 wheel
  • Build windows cp312 wheel

@olperr1 olperr1 requested a review from flo-dup December 2, 2024 07:03
@olperr1 olperr1 self-assigned this Dec 2, 2024
Copy link

sonarqubecloud bot commented Dec 2, 2024

@flo-dup flo-dup merged commit b68a4f0 into main Dec 2, 2024
7 checks passed
@flo-dup flo-dup deleted the unescaped_id_serialization_position branch December 2, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants