-
Notifications
You must be signed in to change notification settings - Fork 13
❌ DO NOT MERGE - [ADMINAPI-1260] Design: merge health check worker into AdminApi-2 #323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"?> | |||
Copilot
AI
Aug 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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> |
Copilot
AI
Aug 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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))); |
Copilot
AI
Aug 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
Copilot
AI
Aug 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
Copilot
AI
Aug 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in property name: AnyErrros should be AnyErrors
| result.AnyErrros = true; | |
| result.AnyErrors = true; |
No description provided.