Skip to content

Mirror push unable to delete branch-name remote ref does not exist

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

ZD: https://gitlab.zendesk.com/agent/tickets/34884

Description

Deleting branches on GitLab instance that is mirror pushing to secondary instance results in Error: unable to delete 'branch-name': remote ref does not exist.

Previous Discussion

We talked about this with @brodock, this is the conversation:

G: hmm it looks like it is trying to remove a branch that haven’t replicated yet...
the best thing would be to ignore the error and go on
if there is no branch to delete, than no need to delete anyway
but it can lead to inconsistent state
J: Should we expect the error to fade out eventually
G: where the creation is happening in parallel
yeah this is a little tricky
it should eventually solve itself
I think the safe approach would be to try to remove the remote first
so in that case, if it haven’t been replicated yet, we will retry later


/cc @brodock besides the workaround above how can we help fix this?

Edited by 🤖 GitLab Bot 🤖