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

Fixed serialization of composite Ids when setting outputNewIdFormat: false #7426

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

tobias-tengler
Copy link
Collaborator

@tobias-tengler tobias-tengler commented Sep 3, 2024

Recently I introduced the ability to incrementally adopt the new Id format: a5c1cb1

Underneath it was using the LegacyNodeIdSerializer to write Ids in the old format, as long as the outputNewIdFormat option was set to false.
The LegacyNodeIdSerializer doesn't know about custom INodeValueSerializers though, so you'd end up with a .ToString()ed version of your Id, instead of the value being transformed by your serializer.

This PR changes the behavior of the outputNewIdFormat flag, by still using the serializer infrastructure of the new Id format, but outputting the formatted Id with the delimiters of the legacy format.

I've also increased the test coverage for the various format / parse cases.

@tobias-tengler tobias-tengler added the 👓 ready-for-review The PR is ready for review. label Sep 3, 2024
@michaelstaib michaelstaib changed the title Fix serialization of composite Ids when setting outputNewIdFormat: false Fixed serialization of composite Ids when setting outputNewIdFormat: false Sep 3, 2024
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.79%. Comparing base (830a96f) to head (e06b78c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7426      +/-   ##
==========================================
- Coverage   78.85%   77.79%   -1.06%     
==========================================
  Files        2445     2818     +373     
  Lines      120325   141261   +20936     
==========================================
+ Hits        94887   109901   +15014     
- Misses      25438    31360    +5922     
Flag Coverage Δ
unittests 77.79% <100.00%> (-1.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelstaib michaelstaib merged commit a88692f into main Sep 3, 2024
5 checks passed
@michaelstaib michaelstaib deleted the tte/composite-ids-when-using-old-format branch September 3, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants