Gerrit Search over SSH limits to rowCount = 500

36 views
Skip to first unread message

Cliff Hanger

unread,
Apr 16, 2020, 2:51:20 PM4/16/20
to Repo and Gerrit Discussion
Hi,

So I am doing a simple Gerrit search to find all the changes where were merged in the last 30 days in master:

ssh gerrit.com gerrit query project:gerrit status:merged branch:master limit:1000 -- -age:30d

The above however doesn't seem to increase the limit beyond 500 for rowCount.  So, is the above the correct way to increase the limit? 

Also, the "--no-limit" option as mention in https://gerrit-review.googlesource.com/Documentation/cmd-query.html doesn't seem to work

ssh gerrit.com gerrit query project:gerrit status:merged branch:master --no-limit -- -age:30d
fatal
: "--no-limit" is not a valid option


Note:
What I really want to do?
  • I want to actually find the delta between when all the changes had all the bits (Code-Review bit, Verified bit, etc). In simple words, when the change was "submittable and mergeable" to when the change got merged. 
  • My approach was to first find all the changes that got merged in the last n days and then get the highest data/time from approval["grantedOn"] from ["currentPatchSet"]["approvals"] for all these changes.
  • If anybody has a better approach in mind, please let me know.

Any help would be really appreciated.


Thank You,
Ishan

Nasser Grainawi

unread,
Apr 16, 2020, 3:05:06 PM4/16/20
to Cliff Hanger, Repo and Gerrit Discussion

On Apr 16, 2020, at 12:51 PM, Cliff Hanger <cliffha...@gmail.com> wrote:

Hi,

So I am doing a simple Gerrit search to find all the changes where were merged in the last 30 days in master:

ssh gerrit.com gerrit query project:gerrit status:merged branch:master limit:1000 -- -age:30d

The above however doesn't seem to increase the limit beyond 500 for rowCount.  So, is the above the correct way to increase the limit? 

Also, the "--no-limit" option as mention in https://gerrit-review.googlesource.com/Documentation/cmd-query.html doesn't seem to work

It wasn’t added until 3.0 and you mention using 2.16.7 below. It would do what you want, except for the issues being discussed at https://gerrit-review.googlesource.com/c/gerrit/+/250256


ssh gerrit.com gerrit query project:gerrit status:merged branch:master --no-limit -- -age:30d
fatal
: "--no-limit" is not a valid option


Note:
What I really want to do?
  • I want to actually find the delta between when all the changes had all the bits (Code-Review bit, Verified bit, etc). In simple words, when the change was "submittable and mergeable" to when the change got merged. 
  • My approach was to first find all the changes that got merged in the last n days and then get the highest data/time from approval["grantedOn"] from ["currentPatchSet"]["approvals"] for all these changes.
  • If anybody has a better approach in mind, please let me know.

Any help would be really appreciated.


Thank You,
Ishan


--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/d7c96551-d0ac-4b7c-a0e7-ed2deac42f65%40googlegroups.com.

Luca Milanesio

unread,
Apr 16, 2020, 4:46:48 PM4/16/20
to Cliff Hanger, Luca Milanesio, Repo and Gerrit Discussion

On 16 Apr 2020, at 19:51, Cliff Hanger <cliffha...@gmail.com> wrote:

Hi,

So I am doing a simple Gerrit search to find all the changes where were merged in the last 30 days in master:

ssh gerrit.com gerrit query project:gerrit status:merged branch:master limit:1000 -- -age:30d

The above however doesn't seem to increase the limit beyond 500 for rowCount.  So, is the above the correct way to increase the limit? 

Also, the "--no-limit" option as mention in https://gerrit-review.googlesource.com/Documentation/cmd-query.html doesn't seem to work

ssh gerrit.com gerrit query project:gerrit status:merged branch:master --no-limit -- -age:30d
fatal
: "--no-limit" is not a valid option


There is a specific permission for query limits:

Not a surprise that by default is limited to 500 items, the ones you get :-)

Luca.


Note:
What I really want to do?
  • I want to actually find the delta between when all the changes had all the bits (Code-Review bit, Verified bit, etc). In simple words, when the change was "submittable and mergeable" to when the change got merged. 
  • My approach was to first find all the changes that got merged in the last n days and then get the highest data/time from approval["grantedOn"] from ["currentPatchSet"]["approvals"] for all these changes.
  • If anybody has a better approach in mind, please let me know.

Any help would be really appreciated.


Thank You,
Ishan


Cliff Hanger

unread,
Apr 16, 2020, 5:46:21 PM4/16/20
to Repo and Gerrit Discussion
  1. What is the best way to know when a change was ready with "is:submittable and is:mergeable" ? 
  2. For the submit time of a particular CR I found:
    • approvals:
            type: SUBM
            value: 1
            grantedOn: 2002-04-16 12:05:12 UTC


    • Is the above the best way to know when a change was submitted? 

Note:

I got QueryLimit to work with the below update in All-Projects:


[capability]
        queryLimit = 0..1000 group Admins


Thank You,
Ishan

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.

Nasser Grainawi

unread,
Apr 16, 2020, 5:53:43 PM4/16/20
to Cliff Hanger, Repo and Gerrit Discussion

On Apr 16, 2020, at 3:46 PM, Cliff Hanger <cliffha...@gmail.com> wrote:

  1. What is the best way to know when a change was ready with "is:submittable and is:mergeable" ? 
Not sure on this one. We’ve spitballed ideas on how to track this with the task plugin, but nothing implemented.

  1. For the submit time of a particular CR I found:
    • approvals:
            type: SUBM
            value: 1
            grantedOn: 2002-04-16 12:05:12 UTC


    • Is the above the best way to know when a change was submitted? 
AFAIK, yes.


More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/f4b8b83c-2e5f-4732-94c0-668644aca99f%40googlegroups.com.

Cliff Hanger

unread,
Apr 16, 2020, 7:13:08 PM4/16/20
to Repo and Gerrit Discussion
Regarding: "What is the best way to know when a change was ready with "is:submittable and is:mergeable" ? "
  • We use rebase rather than merge commits 
    • What I was considering is that if the latest patch-set(eg: Patchset 5) contains "SUBM" approval then the patchset before that(Patchset 4) is the one which was ready(in most cases), but then the issue that I face is that this patchset(Patchset 4) also shows SUBM approval if I use "--patch-sets --all-approvals". 
      • Is this a bug? because it seems like.
      • Is there a way to show all the approvals per patchset? 
    • Also, why not update the approvals section in terms of which patchset it got the approval at. Eg:
    •    approvals:
            type: Code-Review
            description: Code-Review
            value: 1
            grantedOn: 2000-04-11 11:05:12 UTC
            patchSet: 2
                   by:
              name: Ishan 
              email: is...@abc.xyz
              username: ishan

    • Not sure on this one. We’ve spitballed ideas on how to track this with the task plugin, but nothing implemented.
      • Really looking forward to having this as well.

--Ishan
Reply all
Reply to author
Forward
0 new messages