This repository was archived by the owner on Dec 19, 2025. It is now read-only.
[ADMINAPI-1292] Add Health Check for Security and Admin Databases#370
Merged
DavidJGapCR merged 6 commits intomainfrom Oct 21, 2025
Merged
[ADMINAPI-1292] Add Health Check for Security and Admin Databases#370DavidJGapCR merged 6 commits intomainfrom
DavidJGapCR merged 6 commits intomainfrom
Conversation
Test Results338 tests 337 ✅ 16s ⏱️ Results for commit 254a221. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull Request Overview
Adds health checks for both Admin and Security databases (single-tenant and multi-tenant) and enhances the /health endpoint response with per-check detail and status-based HTTP codes.
- Refactors health check registration to support multi-tenancy and both database types.
- Adds an overload for explicit connection string-based registration.
- Improves /health endpoint JSON output and introduces new unit tests (though coverage is minimal).
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Application/EdFi.Ods.AdminApi/Program.cs | Customizes /health endpoint response and status code logic. |
| Application/EdFi.Ods.AdminApi/Infrastructure/Helpers/HealthCheckServiceExtensions.cs | Refactors registration to add both Admin and Security health checks with multi-tenant naming. |
| Application/EdFi.Ods.AdminApi.V1/Infrastructure/Helpers/HealthCheckServiceExtensions.cs | Adds overload for explicit connection strings and database type. |
| Application/EdFi.Ods.AdminApi.UnitTests/Infrastructure/HealthCheckServiceExtensionsTests.cs | Adds basic tests asserting health check service registration only. |
DavidJGapCR
approved these changes
Oct 21, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 adds comprehensive health check support to the application, including multi-tenancy scenarios, and improves the health check API response format. It introduces new tests to verify health check registration and refactors the health check registration logic for better maintainability.
Health check registration and configuration:
AddHealthCheckextension method inHealthCheckServiceExtensionsto support both single-tenant and multi-tenant configurations, registering health checks for bothEdFi_AdminandEdFi_Securitydatabases based on the database engine and tenancy settings. [1] [2]AddHealthCheckthat allows explicit registration of health checks by passing connection strings and database type directly.Health check endpoint improvements:
/healthendpoint to return a detailed JSON response including the status of each health check and any exceptions, and to return HTTP 503 if any health check is unhealthy.Testing:
HealthCheckServiceExtensionsTeststo verify that health checks are registered correctly for both single-tenant and multi-tenant configurations.Dependency and import cleanup:
HealthCheckServiceExtensions.cs.Dependency registration:
Program.csto support the new health check features.