Skip to content

sync: skip tags on commits not synced to the destination (bug 2082281) - #172

Open
jcristau wants to merge 1 commit into
mozilla-conduit:mainfrom
jcristau:skip-unsynced-tags
Open

jcristau wants to merge 1 commit into
mozilla-conduit:mainfrom
jcristau:skip-unsynced-tags

Conversation

@jcristau

Copy link
Copy Markdown
Contributor

If a tag points to a commit that isn't on a branch synced to the destination repository, it can't get Mercurial metadata, and the whole message would fail and be requeued forever, blocking the queue. Log an error and report to Sentry instead, pointing to the manual tag push documentation, and carry on with the rest of the message.

Also don't attempt to add metadata with a dry-run push when there are no branches to push (the push would then fail with a confusing "nothing changed on remote" error), and only do it once per sync, so the rollback candidate isn't overwritten after metadata was already forced.

If a tag points to a commit that isn't on a branch synced to the
destination repository, it can't get Mercurial metadata, and the whole
message would fail and be requeued forever, blocking the queue.  Log an
error and report to Sentry instead, pointing to the manual tag push
documentation, and carry on with the rest of the message.

Also don't attempt to add metadata with a dry-run push when there are
no branches to push (the push would then fail with a confusing
"nothing changed on remote" error), and only do it once per sync, so
the rollback candidate isn't overwritten after metadata was already
forced.
@jcristau jcristau changed the title sync: skip tags on commits not synced to the destination sync: skip tags on commits not synced to the destination (bug 2082281) Oct 15, 2026
@jcristau
jcristau marked this pull request as ready for review October 15, 2026 08:30
@jcristau
jcristau requested a review from a team as a code owner October 15, 2026 08:30

@shtrom shtrom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's a good find. We'll want to test it in dev, after #174 has landed, but this looks good. Thanks!

Comment thread git_hg_sync/repo_synchronizer.py
shtrom

This comment was marked as resolved.

):
raise MercurialMetadataNotFoundError(tag_operation)
exc = MercurialMetadataNotFoundError(tag_operation, destination_url)
sentry_sdk.capture_exception(exc)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rebase this on #174, and re-add the import sentry_sdk in this file?

@shtrom

shtrom commented Oct 21, 2026

Copy link
Copy Markdown
Member
2026-10-21T11:17:21,584386503+11:00

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants