Enrich internal custom checks with flag showing them as such - #5840
Open
rbev wants to merge 5 commits into
Open
Conversation
rbev
force-pushed
the
rhys/flag-builtin-customchecks
branch
from
September 1, 2026 05:16
9a89855 to
1e06c53
Compare
rbev
marked this pull request as ready for review
September 1, 2026 05:33
jpalac
reviewed
Sep 1, 2026
| [Route("customchecks")] | ||
| [HttpGet] | ||
| public async Task<IList<CustomCheck>> CustomChecks([FromQuery] PagingInfo pagingInfo, string status = null, CancellationToken cancellationToken = default) | ||
| public async Task<IList<CustomCheckView>> CustomChecks([FromQuery] PagingInfo pagingInfo, string status = null, CancellationToken cancellationToken = default) |
Contributor
There was a problem hiding this comment.
Just want to verify that this isn't going to be a problem if the SP and SC versions don't match. ie SC is updated but SP is not or SP is updated but SC is not.
Also, do we do scatter gather on this, in which case if some instances have this updated API call and others do not - will that cause an issue?
Contributor
Author
There was a problem hiding this comment.
These new fields are boolean and nullable, so an old server will emit the custom checks as Internal = default(bool) to a new client which was the graceful degradation we spoke about.
This api is not present on Audit instances, they emit custom checks via events over the transport so no issues with scatter gather.
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.
This pull request introduces several improvements and new tests to the handling, classification, and verification of custom checks, particularly focusing on the distinction between internal and endpoint-originated checks. It also adds approval and diagnostic tests to ensure the correct registration and reporting of custom checks across both primary and audit instances, and makes minor code and test project adjustments to support these changes.
Custom Check Classification and API Verification:
internalflag for both types of checks (When_custom_checks_are_classified.cs,When_a_persister_check_fails.cs,When_the_body_storage_check_is_reported.cs). [1] [2] [3]InternalinCustomCheckView, and how these are handled in the API and by clients (docs/data-versioning-design.md).Test Infrastructure and Approval Testing:
AuditCustomCheckApprovals.cs,AuditCustomCheckApprovals.Audit_check_ids_are_snapshot.approved.txt). [1] [2]InternalCustomCheckClassificationcode in audit and persistence test projects to enable these approval tests without requiring expensive acceptance tests (ServiceControl.Audit.Persistence.Tests.RavenDB.csproj,ServiceControl.Audit.Persistence.Tests.csproj). [1] [2]Code Consistency and Cleanup:
CustomCheckViewand related types, improving clarity and maintainability (When_a_failing_custom_check_is_dismissed.cs,When_email_notifications_are_configured.cs,CustomCheckTests.cs). [1] [2] [3]CustomCheckTests.cs).Test Project Adjustments:
ServiceControl.AcceptanceTests.RavenDB.csproj).DiagPath.cs).Persistence Layer Update:
CustomCheckViewobjects instead ofCustomCheck, aligning the API response with new requirements (CustomCheckDataStore.cs). [1] [2]