I have a scenario (described) below where not all tags are being cloned from Gerrit when exclusive -1 READ access controls are set to any branch in that repo or parent project. I have experienced this on both v2.1.8 and v2.4.2. Is this expected behavior or a possible bug?
- Create an empty Gerrit manifest project, grant required read and push permissions to read, clone & push. For this test you can use l
ocal permission or a parent project (I used a parent project)
- Clone the manifest project && add a (simple) default.xml with a few projects, push it to the manifest Gerrit project
- Create some tags (eg. v1-regular_tag & v1-annotated_tag), regular and annotated - push them to the manifest project
- Test your manifest project using repo init/sync
- Make a change to the default.xml
- Commit the change
- Create an annotated tag for this change (eg. v2-annotated_tag)
- Push back the tag only to the manifest project (eg. git push origin tag v2-annotated_tag)
- Remove or create a new workspace && repo init your manifest file using the latest tag created previously (eg. repo init --manifest-url=ssh://
example.com:29418/test/manifest.git --manifest-branch=refs/tags/v2-annotated_tag)
- The repo init works as expected
- Add the following access controls to the parent project (or local manifest project) "Exclusive" READ -1 Registered Users refs/heads/branch1, this can be any branch name and the branch does NOT have to exist in the manifest project. The group can be and group name and your account can be in that group or not.
- Remove or create a new workspace && repo init your manifest file using the latest tag created previously (eg. repo init --manifest-url=ssh://
example.com:29418/test/manifest.git --manifest-branch=refs/tags/v2-annotated_tag)
- The repo init will not work, it will return an error like this:
error: revision refs/tags/v2-annotated_tag in manifests not found
- Similiar behaviors can be seen using git clone and cloning the manifest file then looking at the list of tags, the latest tag that you created by pushing the tag only (along with any other tags created/pushed in this same manner) will not be seen in the cloned repo.
- Take Gerrit out of the mix and clone or repo init from a Gerrit mirror (non Gerrit Slave) and this issue is not seen. The v2-annotated_tag tag can be seen.