Skip to content

Fix race condition and optimise CI pipeline

Marge will wait until a CI pipeline succeeds, then merge with merge-when-pipeline-succeeds. There's a vanishingly small window for a race, where if we run at the exact wrong moment then:

  • Marge will see the pipeline as successful
  • trigger-jobs will see the pipeline as successful
  • Marge will enable 'merge when pipeline succeeds'
  • triggering the jobs will move the pipeline from successful to running
  • Marge will give up after the MR hasn't been merged after 5 minutes, not knowing it's because we've changed the pipeline from under her

Work around this by giving a good amount of leeway so that we don't trigger jobs at the wrong time.


Additionally rewrite the CI pipeline rules and definitions so we make more optimal use of the infrastructure.

Merge request reports

Loading