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

Allow to incrementally adopt new ID format in distributed system #7343

Merged
merged 2 commits into from
Aug 10, 2024

Conversation

tobias-tengler
Copy link
Collaborator

@tobias-tengler tobias-tengler commented Aug 7, 2024

In order to adopt the new ID format in a distributed system, you need to

  1. Update services to support old and new format
  2. Once all services support both formats, update services to start outputting the new ID format
  3. Once all services are consuming and outputting the new ID format, get rid of the old format

Currently this adoption strategy wouldn't be possible, because while the new Default Serializer supports parsing both formats, it only outputs the new format, making it impossible to only update one service. The Legacy serializer only handles the old format, so it also can't be used to start adopting the new format.

This PR introduces a new option outputNewIdFormat for AddDefaultNodeIdSerializer. This allows you in the first step to update all your services to AddDefaultNodeIdSerializer(outputNewIdFormat: false) and once all services are updated, switch to outputting the new ID format via AddDefaultNodeIdSerializer().

@tobias-tengler tobias-tengler force-pushed the tte/make-new-id-format-incrementally-adoptable branch from 6661104 to 1bc5893 Compare August 7, 2024 20:18
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 4 lines in your changes missing coverage. Please review.

Project coverage is 76.61%. Comparing base (dfbe2fe) to head (1bc5893).

Files Patch % Lines
...s/Relay/Serialization/OptimizedNodeIdSerializer.cs 70.00% 3 Missing ⚠️
...n/RequestExecutorBuilderExtensions.IdSerializer.cs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7343      +/-   ##
==========================================
- Coverage   77.06%   76.61%   -0.45%     
==========================================
  Files        2460     2786     +326     
  Lines      122123   139089   +16966     
==========================================
+ Hits        94108   106559   +12451     
- Misses      28015    32530    +4515     
Flag Coverage Δ
unittests 76.61% <77.77%> (-0.45%) ⬇️

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 a5c1cb1 into main Aug 10, 2024
180 of 188 checks passed
@michaelstaib michaelstaib deleted the tte/make-new-id-format-incrementally-adoptable branch August 10, 2024 09:58
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