Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-13674

Mirror appends a numeric suffix to the clone URL when a repo is deleted and recreated on the upstream while the mirror was down

XMLWordPrintable

      Issue Summary

      Mirror appends a numeric suffix (e.g. "-01") to the repo slug in the clone URL when a repo is deleted and then recreated on the upstream while the mirror is not running.

      This can also occur in case there were network or communication issues between the upstream and the mirror when the repo was deleted and recreated.

       

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Set up a mirror
      2. Create new project and a new repo
        sample project: "test-proj"
        sample repo slug: "test-repo"
      3. Add the "test-proj" to the list of mirrored projects
        Repo "test-repo" gets sync'd to the mirror
        The clone URL from the mirror is: "ssh://git@bbmirror:7999/bitbucketdc/test-proj/test-repo.git"
      4. Shut down the mirror
      5. Delete the repository "test-repo"
      6. Recreate the repository in the same project. Use the same repo slug "test-repo"
      7. Start up the mirror
        The recreated "test-repo" gets sync'd to the mirror
        However, the clone URL is now: "ssh://git@bbmirror:7999/bitbucketdc/test-proj/test-repo-01.git"
        A numeric suffix, "-01" was appended to the slug in the mirror clone URL

      Expected Results

      The mirror clone URL will be the same as the upstream clone URL, without the numeric suffix.

      For the sample above, it should still be: "ssh://git@bbmirror:7999/bitbucketdc/test-proj/test-repo.git"

      Actual Results

      A numeric suffix ("-01") is appended to the slug in the mirror clone URL, e.g. "ssh://git@bbmirror:7999/bitbucketdc/test-proj/test-repo-01.git"

      Workaround

      To update the mirror clone URL and remove the numeric suffix:

      • Temporarily move the repo to a project that is not being mirrored
        This will delete the repo from the mirror
      • Afterwards, move back the repo to the mirrored project
        This will re-sync the repo to the mirror
        The mirror clone URL should now be the same as the upstream clone URL, without the numeric suffix

              mgoyal2@atlassian.com Manish
              jmariano@atlassian.com JP Mariano
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: