-
Notifications
You must be signed in to change notification settings - Fork 540
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
Add GitHub Actions health check workflow #23036
Conversation
359ed4d
to
14df65d
Compare
14df65d
to
311332d
Compare
3f76254
to
6df4943
Compare
678c7c5
to
916ac21
Compare
c6b4e04
to
16283cf
Compare
- we need a migrated database to pass healtchecks on the database, but we don't necessarily need a fully seeded DB
16283cf
to
ef19c7e
Compare
Introduces a new GitHub Actions workflow to periodically check service health and version information for specified endpoints. The workflow includes: - Scheduled runs every 5 minutes - Checks version information - Monitors service status - Raises an error if any services are down
ef19c7e
to
e67ac81
Compare
@diox should be ready to verify. |
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.
While the run I just did is marked as successful if you dig through the logs it raised a 404 and logged an error:
Requesting https://addons-dev.allizom.org/services/monitors.json for dev
{'error': JSONDecodeError('Expecting value: line 1 column 1 (char 0)'), 'data': None, 'response': <Response [404]>}
typo in the URL its |
@diox the issue was in the retry mechanism in the healtcheck script. We were not raising on the final attempt. That is fixed now and I've verified it exits 1 with the incorrect URL. I've also fixed the URL and the related tests. |
Fixes: mozilla/addons#15429
Description
Introduces a new GitHub Actions workflow to periodically check service health and version information for specified endpoints. The workflow includes:
Context
This PR adds the workflow for checking the health of our services/dependencies. A future PR will integrate a slack notification when things are found
Testing
Running the workflow
You can run the workflow manually via bash (example here)
Select "Health Check" and then visit https://github.com/mozilla/addons-server/actions/workflows/health_check.yml to see your run
Running locally
To inspect the logic of the health check script you can run it manually passing in an environment to ping.
Note
You should do this inside a running web container if you don't want to have to install dependencies manually on your host
Warning
Passing no environment should error
Checking for failure
You can manually run the bash script the healthcheck runs and modify the monitors json to test for error state.
false
and add a status message.Checklist
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.