Replace pipeline ref fetch with SHA to local ref

What does this MR do and why?

Prior to this change, the runner would fetch a ref of the form refs/pipelines/:id as an indirect way of obtaining the commit for the pipeline's SHA. With this change, it instead fetches the pipeline's SHA directly into a local ref claled refs/pipelines/:id. We use a proper refspec fetching into a local ref (as opposed a bare fetch of the SHA) to to preserve git tag autodiscovery (which only triggers if a local ref is written).

This change was previously behind the feature flag runner_refspec_use_sha_instead_of_persistent_ref, disabled by default, but enabled on GitLab.com for over a month now without problems.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading