You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 🎫 Ticket
https://jira.cms.gov/browse/BCDA-9633
Related tickets:
[CDAP](CMSgov/cdap#354)
[bcda-ops](CMSgov/bcda-ops#1303)
## 🛠 Changes
<!-- What was added, updated, or removed in this PR? -->
- added local health checks for ssas and api, with an additional
dockerfile dependency on curl
- added local health check for worker
- refactored worker into a command-line app, with two entrypoints:
`start-worker` and `health`
- added an interface for HealthChecker and a mock implementation with
Mockery
- added a makefile target for generating mocks with Mockery that pins a
shared Mockery version and enables devs to not have to install Mockery
locally
## ℹ️ Context
<!-- Why were these changes made? Add background context suitable for a
non-technical audience. -->
Since the worker service doesn't have a target group or load balancer,
it would be useful to have a container-level health check that monitors
the health of the service. The worker does not have any api endpoints
like API and SSAS, so a command-line interface was added to enable easy
verification of the worker health. This app has two commands:
`start-worker` (which starts the worker service) and `health` (which
performs the same health check that is run on a timed loop currently in
the worker). For temporary compatibility with EC2, this health check can
be configured to still run in a timed loop, but this is skipped for ECS.
Sonarqube will complain about the test coverage -- I tested what I
thought was reasonable, but much of the gap is the CLI entrypoint that I
don't believe is relevant (and is untested in its current form on main).
<!-- If any of the following security implications apply, this PR must
not be merged without Stephen Walter's approval. Explain in this section
and add @SJWalter11 as a reviewer.
- Adds a new software dependency or dependencies.
- Modifies or invalidates one or more of our security controls.
- Stores or transmits data that was not stored or transmitted before.
- Requires additional review of security implications for other reasons.
-->
## 🧪 Validation
<!-- How were the changes verified? Did you fully test the acceptance
criteria in the ticket? Provide reproducible testing instructions and
screenshots if applicable. -->
Tested in dev on ECS and EC2
0 commit comments