New issue
Advanced search Search tips

Issue 723782 link

Starred by 0 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

gerrit: inspect does not properly parse CL syntax (e.g. foo:12345 and *12345)

Project Member Reported by ayatane@chromium.org, May 17 2017

Issue description

Reference CL: https://chromium-review.googlesource.com/c/506896/

The syntax "gerrit inspect '*12345'" doesn't work.

Needs more investigation as to which commands it doesn't work for and/or why the feature is broken.
 

Comment 1 by vapier@chromium.org, May 17 2017

Status: Available (was: Untriaged)
Summary: gerrit: inspect does not properly parse CL syntax (e.g. foo:12345 and *12345) (was: gerrit tool syntax for internal CLs doesn't work)
looking at the code, i'm pretty sure this is only for the "inspect" command, and it seems to have always been broken (or the pub->priv logic was handled in more core layers for us, but i'm not sure about that).  for all the other commands, we parse the CL # directly, but for inspect, we pass it directly as a query.

we could rework UserActInspect to call GetGerrit directly on each CL, and then pass that down to FilteredQuery/etc... as an optional arg.
One (some?) of the interaction commands should also be affected, which was how I encountered this initially.  I'm not sure which ones exactly, but I was using assign, verify, ready, and abandon to automate some things.

Comment 3 by vapier@chromium.org, May 17 2017

reading the code, these should work for sure because they explicitly call GetGerrit() on each CL argument:
- abandon
- assign
- deletedraft
- message
- ready
- restore
- review
- reviewers
- sethashtags
- submit
- topic
- trybotready
- verify

these ones don't take CL numbers, so wouldn't be relevant:
- account
- deps
- mine
- search
- todo

that leaves:
- inspect

so if you could dig up that bad command that wasn't using inspect, that'd be interesting.
Ah, maybe it's just inspect.  I was using deps and the discrepancy in interface behavior is confusing:

% /usr/local/google/home/ayatane/chromiumos/chromite/bin/gerrit --raw deps '*377112'
% /usr/local/google/home/ayatane/chromiumos/chromite/bin/gerrit --raw -i deps '377112'
*377112

Comment 5 by vapier@chromium.org, May 18 2017

the idea with the raw format was so you could mingle multiple GoB in a single command (like marking a batch of CLs that span multiple instances)
Project Member

Comment 6 by sheriffbot@chromium.org, May 18 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment