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 CI checks for healthy containers #3077

Closed lisac closed 3 months ago

lisac commented 3 months ago

What was the problem?

Minor issue observed with the continuous integration check on healthy containers: step Check for unhealthy containers has a buggy command that results in misleading log output (typically reports grep: invalid max count). as snapshots, samples from June 2024, May 2024, Apr 2024.

How does this fix it?

adjust the grep command to avoid substring -m being interpreted as a flag for --max-count

To demonstrate the behavior, try these on an environment that has docker containers. (i ran these on local dev)

# set of containers we want to inspect
docker container ls --format '{{.Names}} \t {{.Status}}'

# this is what is in the default branch; it gives me a `grep: Invalid argument` error
docker container ls --format '{{.Names}} \t {{.Status}}' | grep -v "(healthy)" | grep -v "-mock-\|svc-bgs-api" 

# adds an escape char to the search for `-mock-`; returns expected results and no error
docker container ls --format '{{.Names}} \t {{.Status}}' | grep -v "(healthy)" | grep -v "\-mock-\|svc-bgs-api"

# equivalent to previous, but perhaps more readable ; this is the version submitted in the PR
docker container ls --format '{{.Names}} \t {{.Status}}' | grep -v "(healthy)" | grep -v "svc-bgs-api\|-mock-" 
github-actions[bot] commented 3 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 4da831cd. ± Comparison against base commit 305ce5f3.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 3 months ago

JaCoCo Test Coverage

Overall Project 67.56% :x:

There is no coverage information present for the Files changed