Skip to content
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

Nightly monitoring & reporting: staging matches HEAD #555

Open
grayside opened this issue Jun 28, 2022 · 0 comments
Open

Nightly monitoring & reporting: staging matches HEAD #555

grayside opened this issue Jun 28, 2022 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@grayside
Copy link
Collaborator

Proposal

In order to ensure our staging CD system is working correctly on an ongoing basis, we should verify that the staging environment has deployed the latest commit to the main branch (HEAD).

This will require a multi-step process:

  1. Add Git versioning data to the app in one or more places
  2. Add monitoring to compare the app to the GitHub repository
  3. Add reporting to file / reopen a GitHub issue if there is a mismatch

Initial Implementation Thoughts

Add Git Versioning Data to the App

Plumbing git revision metadata through how the container image is built.

Because our deploy process sits behind an Artifact Registry Pub/Sub message, we may need to add this as build metadata to the container image itself. This is often done with container labels, such as https://docs.docker.com/config/labels-custom-metadata/.
If we do so, we may want to investigate using a standardized key scheme such as https://github.com/opencontainers/image-spec/blob/main/annotations.md.

When deploying the application, we'll want to access this label from inside the container. This may not be possible, but in Cloud Build we can inspect the container, pull out the label, and convert that to an environment variable on the Cloud Run service.

When deployed with the deploy commit data, include it in a healthcheck endpoint.

Monitoring

Verify the API and Website healthcheck endpoints report a Git version that matches the repository.

Notifications

We're currently exploring GitHub issue notifications in #414 , perhaps the mechanism used there could be used here?

Why Not Monitor Failed Deploys?

We previously had an incident where our deployment triggers stopped firing. In that case, we wouldn't have a failed deployment to verify.

@grayside grayside added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Jun 28, 2022
@rogerthatdev rogerthatdev added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants