Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gerrit: support "mergeable" queries #47702

Open
mvdan opened this issue Aug 14, 2021 · 3 comments
Open

gerrit: support "mergeable" queries #47702

mvdan opened this issue Aug 14, 2021 · 3 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mvdan
Copy link
Member

mvdan commented Aug 14, 2021

From https://gerrit-review.googlesource.com/Documentation/user-search.html, I can see:

is:mergeable

True if the change has no merge conflicts and could be merged into its destination branch.

Mergeability of abandoned changes is not computed. This operator will not find any abandoned but mergeable changes.

This operator only works if Gerrit indexes 'mergeable'. See indexMergeable for details.

If I try to use it on go-review.googlesource.com, I get an error:

Error 400 (Bad Request): 'is:mergeable' operator is not supported by server

Could we enable this index? It would be very useful when filtering/searching CLs. For example, if I'm looking for CLs of mine which need updating due to merge conflicts, or when I'm looking through CLs for packages I maintain and which don't have merge conflicts - and could thus be tested and merged if they look good.

@mknyszek mknyszek added this to the Unreleased milestone Aug 16, 2021
@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 16, 2021
@mknyszek
Copy link
Contributor

Huh. We don't have explicit owners for Gerrit, but I'll take a stab at who might know how to do this.

CC @dmitshur @toothrot ?

@dmitshur
Copy link
Contributor

From looking at other Gerrit instances like https://gerrit-review.googlesource.com/q/is:mergeable, https://chromium-review.googlesource.com/q/is:mergeable, it appears that this option is not generally enabled elsewhere either.

The Go project generally follows Gerrit defaults, as features that are not enabled by default may have caveats, making enabling and supporting them challenging. A possible alternative path here is to redirect this to be a feature request for the Gerrit project. If a new release of Gerrit begins to support this kind of search query by default, the Go project and other Gerrit instances would all benefit.

I don't mean to rule out the possibility of us making an exception for this, and we can consider this, but I want to point out it's generally harder to enable optional Gerrit features and that we don't do it often.

@mvdan
Copy link
Member Author

mvdan commented Aug 17, 2021

I don't have a problem with this being redirected as a Gerrit feature request, but ultimately I'm only concerned about this being available on go-review.googlesource.com, so I feel like this issue should stay open until we decide it's not a good idea or it's deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants