Skip to content

Order Deployments by Finish Time

Andrew Fontaine requested to merge afontaine/order-deployments into master

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

image image

How to set up and validate locally

  1. Configure a runner
  2. 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."
  3. 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.

For #292031 (closed)

Edited by Andrew Fontaine

Merge request reports

Loading