Pushing a tag and branch together to an upstream repository does not sync the tag to forks after migrating to external Mesh

XMLWordPrintable

    • 2
    • Severity 2 - Major
    • 14

      Issue Summary

      After migrating repositories to an external Mesh cluster, new tags pushed to upstream repositories are not synced to forked repositories. Two related issues have been identified:

      1. Lightweight tags pushed together with a branch (e.g. using git push && git push --tags) are not synced to forks. Tags pushed in isolation after the branch has already synced are unaffected.
      2. Annotated tags are not synced to forks at all, regardless of how they are pushed.

      Tags that existed before the migration to external Mesh are unaffected.

      This issue only affects installations using an external Mesh cluster. Instances using the default Mesh sidecar (backed by the shared NFS home directory) are not affected.

      The root cause is a bug in Bitbucket's fork sync logic where tags are not synced correctly when repositories are hosted on an external Mesh cluster. Lightweight tags can fail depending on the order in which pushes are processed, and annotated tags fail to sync entirely due to how they are handled differently from lightweight tags.

      Steps to Reproduce

      Scenario A: Lightweight tag pushed together with a branch

      1. Set up a Bitbucket DC instance with an upstream repository and at least one fork, with auto-sync enabled.
      2. Migrate the upstream repository and its fork(s) to an external Mesh cluster.
      3. On a local clone of the upstream repository, create a new commit and a lightweight tag:
        git commit --allow-empty -m "new commit"
        git tag v1.0
        
      4. Push both the branch and the tag together:
        git push && git push --tags
        
      5. Observe the fork repository in the Bitbucket UI.

      Scenario B: Annotated tag

      1. Set up a Bitbucket DC instance with an upstream repository and at least one fork, with auto-sync enabled.
      2. Migrate the upstream repository and its fork(s) to an external Mesh cluster.
      3. On a local clone of the upstream repository, push a new commit, then push an annotated tag:
        git commit --allow-empty -m "new commit"
        git push
        git tag -a v1.0 -m "version 1.0"
        git push --tags
        
      4. Observe the fork repository in the Bitbucket UI.

      Expected Results

      The new tag (e.g. v1.0) is visible in the forked repository, in sync with the upstream, for both scenarios.

      Actual Results

      Scenario A: The new commit is synced to the fork but the new lightweight tag is not.
      Scenario B: The new commit is synced to the fork but the annotated tag is not, even when pushed separately after the branch has fully synced.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Unassigned
              Reporter:
              Josh Aguilar
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: