Gerrit set-reviewers reports "no such change" for short change-id, but works with change number

Bug #1160659 reported by Ian Wienand on 2013-03-27
This bug report is a duplicate of:  Bug #979227: convert gerrit's mysql tables to utf8. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Triaged
Wishlist
Unassigned

Bug Description

This may be user-error, but I'm not sure why. It seems like the change-id doesn't map to the change number for some of the draft changes I created recently.

[iwienand@fedora17 devstack]$ ssh -p 29418 review.openstack.org gerrit set-reviewers --add <user> Ida19130c
fatal: "Ida19130c" no such change
[iwienand@fedora17 devstack]$ ssh -p 29418 review.openstack.org gerrit set-reviewers --add <user> 25456

I created a big bunch of changes just with a simple "git review", but for some reason, just a few of them don't show up under their change id's.

---
fatal: "Ida19130c" no such change
Id1da6955
If97501fd
Ibf74e722
fatal: "I4a68b830" no such change
fatal: "I89aa507a" no such change
I55650563
I6a9d4a7b
I32fdff8e
I50c8a639
Ieea7aa21
I9cd70e7f
---

Jeremy Stanley (fungi) wrote :

Have you tried using the full 40-digit change ID instead of the 8-digit abbreviated one? I know that Gerrit (at least the version we're on) has trouble matching short hex CIDs in at least some places. I've compared examples of working and non-working entries above in the database backend and don't see anything immediately unusual about them.

As an aside, I recommend against the draft feature in Gerrit. It's not secure (draft changes can still be found by browsing its gitweb interface), and is lacking corresponding events in its event stream to allow it to play nice with automated testing. Instead, setting a work-in-progress on the change should be sufficient for most common cases (either with the Work In Progress button in the WebUI or via the SSH CLI https://review.openstack.org/Documentation/cmd-review.html ).

Ian Wienand (iwienand) wrote :

> Have you tried using the full 40-digit change ID instead of the 8-digit abbreviated one?

I did just try that and it works, so it's probably as you suggest an issue with the short-id.

> As an aside, I recommend against the draft feature in Gerrit.

OK, I'm not really worried about security and I'll take that into account.

Clark Boylan (cboylan) wrote :

I am going to initially set this to wishlist priority that Gerrit handle short change ids in more cases; however, we may end up closing this as won't fix as the full change id works.

Changed in openstack-ci:
status: New → Triaged
milestone: none → havana
importance: Undecided → Wishlist
summary: - Gerrit set-reviewers reports "no such change" for change-id, but works
- with change number
+ Gerrit set-reviewers reports "no such change" for short change-id, but
+ works with change number
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers