Evaluate outdated jobs when deployment starts
requested to merge 363328-skip-outdated-deployment-jobs-should-evaluate-the-job-execution-when-deployment-starts into master
What does this MR do and why?
We now evaluate whether or not to skip an outdated job when the job starts, in addition to after it's done as we did previously
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
.gitlab-ci.yml
image: alpine
build:
stage: build
script:
- echo "building..."
production:
stage: deploy
script: sleep 3600 && echo "deploying app..."
environment:
name: "production"
- Enable
prevent_outdated_deployment_jobs
feature flag - Create a project with a long running deployment (i.e.
sleep 3600
) - Run a deployment pipeline
- Run a second deployment pipeline with an older commit than the previous pipeline
- Note that it fails immediately before it is even ran with the error message
The deployment job is older than the latest deployment, and therefore failed
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.
Related to #363328 (closed)
Edited by Allen Cook