Skip to content

If a push mirror fails, try again with the refs that would have succeeded

This will resolve limitation number 2 from gitlab#198270:

A single branch divergence breaks mirroring for all branches. This means that when we merge a security fix into 12-7-stable-ee on Security, for example, no other changes in any branch from Canonical can be pushed until the divergence is resolved.

Proposal

First, we need to push with the --porcelain command line flag, which makes the output machine-readable.

Then we need to parse the list of branches, remove the ones that failed, and try again with just the ones that would have succeeded. This should allow for a single branch divergence to not interrupt the entire mirroring process.

This will be behind a Gitaly Ruby feature flag, via !1818 (merged).

Process

  • Get !1823 (closed) merged
  • Enable the gitaly_ruby_push_mirror_retry flag for gitlab-org/gitlab and gitlab-org/security/gitlab
  • Verify behavior by creating a push conflict
Edited by Robert Speicher
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information