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 serialization of saga data #512

Merged
merged 2 commits into from
Sep 18, 2024
Merged

Fix serialization of saga data #512

merged 2 commits into from
Sep 18, 2024

Conversation

DavidBoike
Copy link
Member

@DavidBoike DavidBoike commented Sep 18, 2024

Symptoms

Saga property changes are not reflected in ServiceInsight saga diagrams.

Who's affected

All users of NServiceBus.SagaAudit 5.0.0 are affected.

Root cause

A change of JSON serializer in version 5.0.0 from SimpleJson to System.Text.Json caused saga data properties to not be serialized. By default, System.Text.Json will only serialize properties of the compilation-identified type, meaning only properties of IContainSagaData were serialized. This prevented any business-related properties on the type inheriting from ContainSagaData being included.

@DavidBoike DavidBoike merged commit 6da2b49 into master Sep 18, 2024
3 checks passed
@DavidBoike DavidBoike deleted the fix-serializer branch September 18, 2024 16:23
DavidBoike added a commit that referenced this pull request Sep 18, 2024
* Failing test

* Instruct serializer to use actual type of serialized saga data
DavidBoike added a commit that referenced this pull request Sep 18, 2024
* Failing test

* Instruct serializer to use actual type of serialized saga data
@DavidBoike DavidBoike added the bug label Sep 18, 2024
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