department-of-veterans-affairs / abd-vro

To get Veterans benefits in minutes, VRO software uses health evidence data to help fast track disability claims.
Other
19 stars 6 forks source link

update grep for finding mock containers in CI check for healthy containers #3211

Closed lisac closed 2 months ago

lisac commented 2 months ago

What was the problem?

The container-healthchecks job in the suite of CI checks regularly fails due to a mock container not registering a healthy status. We have code in-place mean to remove mock containers from consideration for this test (because they don't have health checks); however, the container for mock-bie-kafka is named in a way that isn't caught by this code. As a result, the job displays a Failure result, when we can see that it's only the mock container that was unhealthy.

Sample run showing this problem: https://github.com/department-of-veterans-affairs/abd-vro/actions/runs/9975597466/job/27565759431?pr=3209

Solution proposed in this PR

  1. Loosen from a match of -mock- to mock-. why: at least one mock container is named with _mock-, which doesn't satisfy the original pattern.
  2. Adjust logging level for failed Datadog API metrics submissions from error to warning. why: 1) I would consider these warning level rather than error; 2) for compatibility with the existing script used in the CI check for whether a container's logs appear healthy. In the build environment, the DD metrics submission will fail; and if these log messages appear at the error threshold, that will be enough for the script logic to interpret the container as unhealthy (which, when restricted to the DD metrics failures, is not accurate).

The better solution would be to track down why the container is being named with "_mock-" rather than "-mock-", and seeing if we can standardize to "-mock-"; however, I wasn't able to track this down.

github-actions[bot] commented 2 months ago

Test Results

116 tests  ±0   116 :white_check_mark: ±0   35s :stopwatch: -2s  34 suites ±0     0 :zzz: ±0   34 files   ±0     0 :x: ±0 

Results for commit 5ecfae4f. ± Comparison against base commit e1869467.

github-actions[bot] commented 2 months ago

JaCoCo Test Coverage

Overall Project 67.7% -0.19% :x:
Files changed 50% :x:


File Coverage
MetricLoggerService.java 68.44% -3.04% :x:
lisac commented 2 months ago

update: not ready for review - i found something else to address

github-actions[bot] commented 2 months ago

Test Results

116 tests  ±0   116 :white_check_mark: ±0   34s :stopwatch: -3s  34 suites ±0     0 :zzz: ±0   34 files   ±0     0 :x: ±0 

Results for commit 5d843289. ± Comparison against base commit e1869467.