❌ DO NOT MERGE - [ADMINAPI-1260] Design: merge health check worker into AdminApi-2#323
❌ DO NOT MERGE - [ADMINAPI-1260] Design: merge health check worker into AdminApi-2#323CSR2017 wants to merge 14 commits into
Conversation
Test Results322 tests 321 ✅ 14s ⏱️ Results for commit c0e2e0d. ♻️ This comment has been updated with latest results. |
|
|
||
| COPY --from=assets ./Application/NuGet.Config EdFi.AdminConsole.HealthCheckService/ | ||
| COPY --from=assets ./Application/EdFi.AdminConsole.HealthCheckService EdFi.AdminConsole.HealthCheckService/ | ||
|
|
There was a problem hiding this comment.
These are frustrating false positives. I wish Hadolint would update to recognize the new syntax for additional contexts.
|
|
||
| - name: Copy health check service folder to docker context | ||
| run: cp -r ../EdFi.Ods.AdminApi.HealthCheck ../../Docker/Application | ||
|
|
There was a problem hiding this comment.
We could simplify all of this switching the Dockerfile to use the new "additional contexts" feature, which allows accessing files from a different parent directory.
Let's do that as a separate work item though, rather than allowing scope creep on this.
|
|
||
| ## Admin Api and Ed-Fi ODS / API docker containers | ||
|
|
||
| Please refer [DOCKER DEPLOYMENT](https://techdocs.ed-fi.org/display/EDFITOOLS/Docker+Deployment) for |
There was a problem hiding this comment.
| Please refer [DOCKER DEPLOYMENT](https://techdocs.ed-fi.org/display/EDFITOOLS/Docker+Deployment) for | |
| Please refer [DOCKER DEPLOYMENT](https://docs.ed-fi.org/reference/docker) for |
|
I moved to "ready for review" for Copilot's sake. |
There was a problem hiding this comment.
Pull Request Overview
This PR integrates the Ed-Fi AdminConsole HealthCheckService directly into the EdFi.Ods.AdminApi application using Quartz.NET for scheduling and on-demand execution. The integration eliminates the need for a separate health check worker process by incorporating health check functionality as scheduled background jobs within the main AdminAPI application.
Key changes include:
- Added a new EdFi.Ods.AdminApi.HealthCheck project with health check logic previously in a separate service
- Integrated Quartz.NET for scheduled health check execution with configurable frequency
- Added API endpoint for triggering health checks on-demand
Reviewed Changes
Copilot reviewed 52 out of 54 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/setup-local-multi-tenants-docker.ps1 | New PowerShell script for simplified multi-tenant Docker environment setup |
| docs/docker.md | Documentation for the new multi-tenant setup script |
| docs/design/INTEGRATE-HEALTHCHECK-SERVICE | Design document outlining the health check service integration architecture |
| Application/EdFi.Ods.AdminApi/Program.cs | Integration of health check services into main application startup |
| Application/EdFi.Ods.AdminApi.HealthCheck/* | New project containing health check service logic and API clients |
| Various appsettings files | Configuration updates for health check endpoints and multi-tenant setup |
| Docker files and CI workflows | Updates to include new health check project in build processes |
| @@ -0,0 +1,17 @@ | |||
| ?xml version="1.0"?> | |||
There was a problem hiding this comment.
Missing opening angle bracket. The XML declaration should be <?xml version="1.0"?>
| ?xml version="1.0"?> | |
| <?xml version="1.0"?> |
| ?xml version="1.0"?> | ||
| <package > | ||
| <metadata> | ||
| <id><EdFi class="AdminConsoleHealthCheckWorkerProcess"></EdFi></id> |
There was a problem hiding this comment.
Invalid XML structure. The <id> element contains invalid nested tags. It should contain a plain string package identifier, not XML elements with attributes.
| <id><EdFi class="AdminConsoleHealthCheckWorkerProcess"></EdFi></id> | |
| <id>EdFi.AdminConsoleHealthCheckWorkerProcess</id> |
|
|
||
| if (healthCheckData != null) | ||
| { | ||
| healthCheckDocument.Add(new KeyValuePair<string, JsonNode?>("healthy", !healthCheckData.Any(r => r.AnyErrros))); |
There was a problem hiding this comment.
Typo in property name: AnyErrros should be AnyErrors
| healthCheckDocument.Add(new KeyValuePair<string, JsonNode?>("healthy", !healthCheckData.Any(r => r.AnyErrros))); | |
| healthCheckDocument.Add(new KeyValuePair<string, JsonNode?>("healthy", !healthCheckData.Any(r => r.AnyErrors))); |
|
|
||
| public int OdsApiEndpointCount { get; set; } = 0; | ||
|
|
||
| public bool AnyErrros { get; set; } = false; |
There was a problem hiding this comment.
Typo in property name: AnyErrros should be AnyErrors
| public bool AnyErrros { get; set; } = false; | |
| public bool AnyErrors { get; set; } = false; |
| if (response != null && response.StatusCode == System.Net.HttpStatusCode.OK && response.Headers != null && response.Headers.Contains(Constants.TotalCountHeader)) | ||
| result.OdsApiEndpointCount = int.Parse(response.Headers.GetValues(Constants.TotalCountHeader).First()); | ||
| else | ||
| result.AnyErrros = true; |
There was a problem hiding this comment.
Typo in property name: AnyErrros should be AnyErrors
| result.AnyErrros = true; | |
| result.AnyErrors = true; |
No description provided.