Skip to content

Reorder SyncRemotesService execution

Robert Speicher requested to merge rs-reorder-sync-service into master

Prior, we would sync tags and then sync branches, for no reason other than syncing tags was easier, so I wrote that first. In our pre-Security repository mirroring setup, this presumably worked only because we were leaking commit objects from Build to Canonical, so the OIDs that the tags were referencing already existed on both remotes by the time we were pushing tags.

Now that the Security repository adds a layer of indirection, those commit objects aren't leaking, and thus don't exist on Canonical, so it rejects an annotated tag pointing to an object it's never heard of.

Now we sync the branches first, exposing those objects on all remotes, and then sync the tags that reference them.

It should be noted that this is all theoretical, because we lacked proper logging for a failed push from RemoteRepository, which will be rectified in the following commit.

See https://gitlab.com/gitlab-org/release-tools/issues/350#note_258458430

1719fe2f - Add logging for failed RemoteRepository push

Merge request reports