DT-2942: Remove Ontology checks and configurations#2877
Merged
Conversation
|
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the now-unused Ontology health check/configuration from Consent, updating status handling and tests to reflect that Consent no longer depends on the Ontology service for system health reporting.
Changes:
- Removed Ontology health check implementation, registration, and related configuration field (
ontologyURL). - Updated
StatusResourcedegraded-status computation to no longer consider Ontology. - Refactored/removed tests that previously exercised Ontology health checking.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/resources/consent-config.yml | Removes services.ontologyURL from test config. |
| src/test/java/org/broadinstitute/consent/http/resources/StatusResourceTest.java | Updates status tests to stop referencing Ontology health checks. |
| src/test/java/org/broadinstitute/consent/http/health/OntologyHealthCheckTest.java | Deletes the Ontology health check test suite. |
| src/main/java/org/broadinstitute/consent/http/resources/StatusResource.java | Removes Ontology from degraded-health evaluation. |
| src/main/java/org/broadinstitute/consent/http/health/OntologyHealthCheck.java | Deletes the Ontology health check implementation. |
| src/main/java/org/broadinstitute/consent/http/configurations/ServicesConfiguration.java | Removes the ontologyURL field and its accessors. |
| src/main/java/org/broadinstitute/consent/http/ConsentApplication.java | Stops registering the Ontology health check and removes the constant/import. |
Comments suppressed due to low confidence (3)
src/test/java/org/broadinstitute/consent/http/resources/StatusResourceTest.java:63
- In
testUnhealthyES, the inline comment still refers to a failing ontology check, but the test now sets the ElasticSearch check unhealthy. Update the comment to match the scenario being tested (and ideally what behavior is expected when ES is down).
Response response = statusResource.getStatus();
// A failing ontology check should not fail the status
assertEquals(200, response.getStatus());
src/test/java/org/broadinstitute/consent/http/resources/StatusResourceTest.java:64
testUnhealthyEScurrently only asserts the HTTP status code, but it doesn't verify the key behavior specific to this scenario (e.g., that the response is marked degraded when ES is unhealthy). Consider asserting thedegradedflag and setting the other checks (GCS/SAM/SendGrid) healthy so the test isolates ES as the cause.
void testUnhealthyES() {
Result elasticSearch = Result.unhealthy("ES is down");
SortedMap<String, Result> checks = new TreeMap<>();
checks.put(DB_ENV, Result.healthy());
checks.put(ConsentApplication.ES_CHECK, elasticSearch);
StatusResource statusResource = initStatusResource(checks);
Response response = statusResource.getStatus();
// A failing ontology check should not fail the status
assertEquals(200, response.getStatus());
}
src/test/java/org/broadinstitute/consent/http/resources/StatusResourceTest.java:90
testDegradeddoesn’t include a SendGrid check entry, soformatResultswill treat SendGrid as unhealthy by default, making the system degraded even if Sam were healthy. Add an explicit healthy SendGrid check (and keep the other systems healthy) so the test specifically validates that Sam being down causes degradation.
void testDegraded() {
SortedMap<String, Result> checks = new TreeMap<>();
checks.put(DB_ENV, Result.healthy());
checks.put(ConsentApplication.ES_CHECK, Result.healthy());
checks.put(ConsentApplication.GCS_CHECK, Result.healthy());
checks.put(ConsentApplication.SAM_CHECK, Result.unhealthy("Sam is Down"));
StatusResource statusResource = initStatusResource(checks);
kevinmarete
approved these changes
Apr 24, 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.



Addresses
https://broadworkbench.atlassian.net/browse/DT-2942
Summary
Mostly code removal with some test refactoring. Consent no longer talks to Ontology so we can remove all status checks and configurations that used it.
Have you read CONTRIBUTING.md lately? If not, do that first.