Order Deployments by Finish Time
What does this MR do and why?
If manual deployments are deployed out of order, the ordering of the table gets murky and it is hard to tell which deployment was most recently deployed.
Instead we can update the deployment ordering so that deployments are ordered by when they finished at, which forces the finished deployments to be sorted by most recently finished (read: deployed). Postgres ORDER BY pushes NULL to the top of the list, so created/running (upcoming) deployments are first
Changelog: changed
Screenshots or screen recordings
How to set up and validate locally
- Configure a runner
- Set up a deployment with the following CI YAML:
stages: # List of stages for jobs, and their order of execution - deploy deploy-job: # This job runs in the deploy stage. stage: deploy # It only runs when *both* jobs in the test stage complete successfully. environment: name: production url: https://example.org when: manual script: - echo "Deploying application..." - echo "Application successfully deployed."
- Run a few pipelines, cancel some, etc., to see the ordering.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
For #292031 (closed)
Edited by Andrew Fontaine