Repository navigation
GH-5162 ServiceCapabilities: isolate each store, record FailedSections - #5175
Merged
Merged
Conversation
…tions One store whose TryCreateUsage threw used to empty its whole EventStores / DocumentStores section, and the snapshot then reported the section as empty rather than failed. Each store (event stores, document stores, DbContexts, HTTP graphs) is now read on its own, and every failed section or store is listed on the new ServiceCapabilities.FailedSections (section, subject where known, exception type). Whole-section failures and the existing per-transport and per-endpoint guards record there too. Cancellation still propagates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U
Merged
This was referenced Oct 25, 2026
This was referenced Nov 2, 2026
This was referenced Nov 9, 2026
This was referenced Nov 16, 2026
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.
What changed
ServiceCapabilities.readEventStores/readDocumentStores(and the identically shapedreadDbContexts/readHttpGraphs) now read each store on its own. A store whoseTryCreateUsagethrows is logged, recorded and skipped, so its healthy siblings still appear in the snapshot.ServiceCapabilities.FailedSections(List<CapabilitySectionFailure>, defaults to[]). Each entry hasSection(property name, e.g.EventStores),Subject(store subject URI where known, null for a whole-section failure) andExceptionType(full type name). A consumer can now tell "empty" from "failed" and ask again.readSection/readSectionAsync) and the existing per-transport / per-endpoint guards record there too.Additive only: an older payload without
FailedSectionsdeserializes to an empty list (covered by a test). The exception message is deliberately left out of the snapshot (it is still in the logged warning) so connection details don't travel to a monitoring console.Tests run locally (net9.0, Release)
CoreTests.Acceptance.service_capabilities_failed_sections_5162: 6/6 passed (failing event store drops only itself, failing document store drops only itself, empty-without-failures, cancellation, JSON round trip, old payload deserializes).service_capabilities*,exporting_service_capabilities,exporting_saga_capabilities,recurring_schedules_in_capabilities*,system_message_type_filtering,service_tags_3240): 37/37 passed.dotnet build src/Testing/CoreTests -c Release -f net9.0: 0 warnings, 0 errors.Note for CritterWatch: the new property changes the serialized payload, so if CritterWatch hashes the whole document it may want to include or exclude
FailedSectionsdeliberately (JasperFx/CritterWatch#1443).Closes #5162
🤖 Generated with Claude Code
https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U