Release manager dashboard: Auto-deploy pressure
Overview
A Release Manager dashboard should show the number of commits to the GitLab EE master
branch that are not yet deployed to gitlab.com (and canary, and staging).
Data gathering
The current plan is to run a scheduled CI job that gathers data from the GitLab API.
- Find the currently deployed revision on
{{environment}}
- Use the gitlab.com compare API to find the number of commits between that revision and
master
:$ http GET 'https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab/repository/compare?from={{revision}}&to=master' | jq '.commits | length`
Prometheus format
- One entry per environment
- Gauge, where the value is the number of commits
Example of one time series:
delivery_auto_deploy_pressure{env="gprd",instance="",job="auto-deploy-pressure"} 198
delivery_auto_deploy_pressure{env="gprd-cny",instance="",job="auto-deploy-pressure"} 198
delivery_auto_deploy_pressure{env="gstg",instance="",job="auto-deploy-pressure"} 198
env
may be reserved, see #800 (comment 354010145).
Grafana/GitLab Dashboard format
When gstg
and gprd-cny
are on the same revision, but ahead of gprd
:
When all are on the same revision (different styling):
Problems
-
We currently rely on theVersion is now fetched from Chef./api/v4/version
endpoint to know the version running in each environment. When a deploy is in-progress, this can cause the version to differ between executions depending on the host receiving the request, which is why there's a dip and then rise in the examplegprd
graph above. We need a more stable data source for the gitlab-rails revision running in each environment.
Nice-to-haves
N/A
Edited by Robert Speicher