Gerrit clone of a repo, missing tags?

408 views
Skip to first unread message

Jason Markley

unread,
Apr 24, 2012, 5:35:26 PM4/24/12
to repo-d...@googlegroups.com
I'm trying to have Jenkins do an update of the u-boot repo for me
periodically so that my gerrit repo is always up to date with what denx has.

When my jenkins job clones the gerrit repo, it doesn't seem to get the
objects associated with a particular set of tags and then also doesn't
get those tags.  One such tag is 'LABEL_2003_06_28_0050-stable'.  When i
try to do a git fetch --tags <denx> in the jenkins script, it fails with
the following:

error: unable to find 91a0ce965d5905c37fff45555b7e3113b9359c8f

which is the commit hash of the last commit associated with the
mentioned tag.


Is there a more specific access control permission in gerrit that i need
to give the jenkins user (besides read on /refs/*, which causes the
error to go away) in order to be able to give jenkins access to the
objects that this tag references?

The key point i think is that these objects are only referenced by the
tags, and are no longer referenced by any branches, so i don't think
(and it didn't work when i tried it) giving read access to /refs/heads/*
will do anything for what i'm trying to accomplish.

Is this a bug in Gerrit?  Maybe i'm just missing an access control
permission that's not mentioned in the access-control documentation?

Much thanks in advance.

-Jason

+ git fetch --tags git://git.denx.de/u-boot.git master --verbose

15:58:35  From git://git.denx.de/u-boot
15:58:35   * branch            master     -> FETCH_HEAD
15:58:35   = [up to date]      DENX-2005-10-29-2350 -> DENX-2005-10-29-2350
15:58:35   = [up to date]      LABEL_2002_11_05_0120 ->
LABEL_2002_11_05_0120
15:58:35   = [up to date]      LABEL_2002_11_05_1735 ->
LABEL_2002_11_05_1735
15:58:35   = [up to date]      LABEL_2002_11_10_2310 ->
LABEL_2002_11_10_2310
15:58:35   = [up to date]      LABEL_2002_11_11_2211 ->
LABEL_2002_11_11_2211
15:58:35   = [up to date]      LABEL_2002_11_18_0115 ->
LABEL_2002_11_18_0115
15:58:35   = [up to date]      LABEL_2002_11_22_0015 ->
LABEL_2002_11_22_0015
15:58:35   = [up to date]      LABEL_2002_12_03_2230 ->
LABEL_2002_12_03_2230
15:58:35   = [up to date]      LABEL_2002_12_07_0120 ->
LABEL_2002_12_07_0120
15:58:35   = [up to date]      LABEL_2002_12_21_0040 ->
LABEL_2002_12_21_0040
15:58:35   = [up to date]      LABEL_2002_12_28_1700 ->
LABEL_2002_12_28_1700
15:58:35   = [up to date]      LABEL_2003_01_11_1050 ->
LABEL_2003_01_11_1050
15:58:35   = [up to date]      LABEL_2003_01_14_0055 ->
LABEL_2003_01_14_0055
15:58:35   = [up to date]      LABEL_2003_02_28_0150 ->
LABEL_2003_02_28_0150
15:58:35   = [up to date]      LABEL_2003_03_06_0050 ->
LABEL_2003_03_06_0050
15:58:35   = [up to date]      LABEL_2003_03_06_0200 ->
LABEL_2003_03_06_0200
15:58:35   = [up to date]      LABEL_2003_03_06_1440 ->
LABEL_2003_03_06_1440
15:58:35   = [up to date]      LABEL_2003_03_06_2255 ->
LABEL_2003_03_06_2255
15:58:35   = [up to date]      LABEL_2003_03_14_2150 ->
LABEL_2003_03_14_2150
15:58:35   = [up to date]      LABEL_2003_03_25_1830 ->
LABEL_2003_03_25_1830
15:58:35   = [up to date]      LABEL_2003_03_26_1300 ->
LABEL_2003_03_26_1300
15:58:35   = [up to date]      LABEL_2003_03_27_1900 ->
LABEL_2003_03_27_1900
15:58:35   = [up to date]      LABEL_2003_04_05_0300 ->
LABEL_2003_04_05_0300
15:58:35   = [up to date]      LABEL_2003_04_15_1900 ->
LABEL_2003_04_15_1900
15:58:35   = [up to date]      LABEL_2003_05_03_1700 ->
LABEL_2003_05_03_1700
15:58:35   = [up to date]      LABEL_2003_05_12_2355 ->
LABEL_2003_05_12_2355
15:58:35   = [up to date]      LABEL_2003_05_20_1630 ->
LABEL_2003_05_20_1630
15:58:35   = [up to date]      LABEL_2003_05_20_2250 ->
LABEL_2003_05_20_2250
15:58:35   = [up to date]      LABEL_2003_05_22_2230 ->
LABEL_2003_05_22_2230
15:58:35   = [up to date]      LABEL_2003_05_23_0055 ->
LABEL_2003_05_23_0055
15:58:35   = [up to date]      LABEL_2003_05_23_1450 ->
LABEL_2003_05_23_1450
15:58:35   = [up to date]      LABEL_2003_05_30_1450 ->
LABEL_2003_05_30_1450
15:58:35   = [up to date]      LABEL_2003_05_31_2115 ->
LABEL_2003_05_31_2115
15:58:35   = [up to date]      LABEL_2003_06_04_0200 ->
LABEL_2003_06_04_0200
15:58:35   = [up to date]      LABEL_2003_06_05_2140 ->
LABEL_2003_06_05_2140
15:58:35   = [up to date]      LABEL_2003_06_16_0055 ->
LABEL_2003_06_16_0055
15:58:35   = [up to date]      LABEL_2003_06_22_1530 ->
LABEL_2003_06_22_1530
15:58:35   = [up to date]      LABEL_2003_06_26_2220 ->
LABEL_2003_06_26_2220
15:58:35   = [up to date]      LABEL_2003_06_27_2340 ->
LABEL_2003_06_27_2340
15:58:35  error: unable to find 91a0ce965d5905c37fff45555b7e3113b9359c8f
15:58:35  fatal: object 91a0ce965d5905c37fff45555b7e3113b9359c8f not found

Shawn Pearce

unread,
Apr 24, 2012, 9:49:12 PM4/24/12
to Jason Markley, repo-d...@googlegroups.com
On Tue, Apr 24, 2012 at 14:35, Jason Markley <jmar...@gmail.com> wrote:
> Is there a more specific access control permission in gerrit that i need
> to give the jenkins user (besides read on /refs/*, which causes the
> error to go away) in order to be able to give jenkins access to the
> objects that this tag references?
>
> The key point i think is that these objects are only referenced by the
> tags, and are no longer referenced by any branches, so i don't think
> (and it didn't work when i tried it) giving read access to /refs/heads/*
> will do anything for what i'm trying to accomplish.

You are running into a feature of Gerrit where it by default only
makes tags readable if they are reachable from a branch the user can
also read. This works well under the notion of some sort of mainline
that releases are derived from, and that the user can read. When the
release is merged into the mainline branch, the corresponding tags
just pop into view.

It sounds like you need to also grant read on refs/tags/* to the
Jenkins user so that it can read the refs/tags names that are not
reachable from a branch.

Reply all
Reply to author
Forward
0 new messages