Skip to content

Remove failed deployments earlier in the filtering

Robert Speicher requested to merge rs-deployments-remove-failures into master

Previously, we only fetched the two latest deployments, so if the first was running and the second failed, we'd end up with only the running deployment, meaning auto_deploy status never showed the current version for that environment.

Now we fetch 10 and reject failed deploys before we check if there's nothing upcoming.

This means we should always get back the latest successful deploy, plus an upcoming deploy if there is one, but never get back only the running deploy.

Closes gitlab-com/gl-infra/delivery#1847 (closed)

Merge request reports