Repository navigation
Avoid deadlock when a schema filter depends on ISerializerDataContractResolver - #4210
Merged
martincostello merged 2 commits intoOct 19, 2026
Conversation
martincostello
approved these changes
Oct 19, 2026
Remove comments and shorten timeouts. Co-authored-by: Martin Costello <martin@martincostello.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4210 +/- ##
==========================================
+ Coverage 91.57% 91.77% +0.20%
==========================================
Files 108 108
Lines 4057 4063 +6
Branches 909 909
==========================================
+ Hits 3715 3729 +14
+ Misses 198 189 -9
- Partials 144 145 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
martincostello
enabled auto-merge (squash)
October 19, 2026 12:25
martincostello
merged commit Oct 19, 2026
6b7491b
into
domaindrivendev:master
13 of 14 checks passed
Contributor
|
Thanks for your contribution @DevKaurav-14 - the changes from this pull request have been published as part of version 10.3.1 📦, which is now available from NuGet.org 🚀 |
This was referenced Oct 19, 2026
This was referenced Oct 21, 2026
Open
Open
deps(backend): Bump Swashbuckle.AspNetCore from 6.6.2 to 10.3.1
kamvatwalaofficial-hub/SIC-Connect#7
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4207
Since 10.3.0 (#3998), the factories that register ISerializerDataContractResolver read IOptions.Value when the resolver is created. Schema filters are created by ConfigureSchemaGeneratorOptions.Configure while those same options are being built, so a filter whose constructor takes ISerializerDataContractResolver re-enters the options configuration and the swagger.json request deadlocks.
This change makes the resolvers read the options on first use instead of at construction:
Tests: one test per resolver registers a schema filter that depends on ISerializerDataContractResolver and resolves IOptions.Value. Because the bug is a hang rather than an exception, the resolution runs on a separate task with a 30 second timeout. Both tests time out on net8.0, net9.0 and net10.0 without the fix and pass with it.
I ran the full test suite locally on macOS (arm64) with SDK 10.0.402. Everything passes except the three Playwright UITests, which could not install their browser dependencies on my machine.
PR Checklist