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

x/build: start using Gerrit hashtags for managing open CLs #24836

Open
bradfitz opened this Issue Apr 13, 2018 · 16 comments

Comments

Projects
None yet
5 participants
@bradfitz
Member

bradfitz commented Apr 13, 2018

In chat with @andybons @FiloSottile @bcmills and @ianlancetaylor yesterday, I proposed we start using Gerrit's "hashtags" support, now that our hosted Gerrit supports it (notedb support is active for us) and PolyGerrit (the new web UI) supports it.

After discussion, we settled on using tags:

so, how about: "wait-author", "wait-release", "wait-issue", "wait-$PERSON"
where $PERSON is some substring of a name/email in the reviewer set.
and if somebody is named "Issue Release" and their email is issue@release.com, then you have to use their full email in $PERSON
we can mass remove the "wait-release" labels when tree opens

While triaging today, I found we should also add support for:

wait-cl-NNNNN -- this CL is blocked until NNN is resolved

I started looking into adding hashtag support to maintner and gopherbot.

Tracking that work here, then documenting all this on the wiki.

@bradfitz bradfitz self-assigned this Apr 13, 2018

@gopherbot gopherbot added this to the Unreleased milestone Apr 13, 2018

@gopherbot gopherbot added the Builders label Apr 13, 2018

@gopherbot

This comment has been minimized.

gopherbot commented Apr 13, 2018

Change https://golang.org/cl/106795 mentions this issue: gerrit: add support for hashtags

@FiloSottile

This comment has been minimized.

Member

FiloSottile commented Apr 13, 2018

Also wait-issue-NNNNN. I guess the number can be implicit when the issue is linked from the commit message.

@bradfitz

This comment has been minimized.

Member

bradfitz commented Apr 13, 2018

@FiloSottile, yup, I just found that too and just tagged an issue with that, for a CL that had an open proposal but wasn't mentioned in the commit message.

gopherbot pushed a commit to golang/build that referenced this issue Apr 13, 2018

gerrit: add support for hashtags
Tested in one-off local tool:

   func main() {
       gc := gerrit.NewClient("https://go-review.googlesource.com/", gerrit.GitCookiesAuth())
       ....

Updates golang/go#24836

Change-Id: I231e3afb4a27e41f9b56968e3e97fa1c31fd8d84
Reviewed-on: https://go-review.googlesource.com/106795
Reviewed-by: Andrew Bonventre <andybons@golang.org>
@gopherbot

This comment has been minimized.

gopherbot commented Apr 15, 2018

Change https://golang.org/cl/107297 mentions this issue: maintner: add hashtag mutation accessors on GerritMeta

gopherbot pushed a commit to golang/build that referenced this issue Apr 16, 2018

maintner: add hashtag mutation accessors on GerritMeta
Updates golang/go#24836

Change-Id: Id529f12dba54366d49feb112662473ca214ba2f6
Reviewed-on: https://go-review.googlesource.com/107297
Reviewed-by: Chris Broadfoot <cbro@golang.org>
@gopherbot

This comment has been minimized.

gopherbot commented Apr 16, 2018

Change https://golang.org/cl/107305 mentions this issue: maintner: track hashtag edits on GerritMeta, make HashtagEdits method faster

@bcmills

This comment has been minimized.

Member

bcmills commented Apr 16, 2018

I think I must be missing something, but how do I add hashtags from the Gerrit UI?

@bradfitz

This comment has been minimized.

Member

bradfitz commented Apr 16, 2018

@bcmills, left bar of the PolyGerrit UI:
screen shot 2018-04-16 at 3 56 12 pm

@bradfitz

This comment has been minimized.

Member

bradfitz commented Apr 16, 2018

Or for the old UI, that little icon on the right:
screen shot 2018-04-16 at 3 57 11 pm

gopherbot pushed a commit to golang/build that referenced this issue Apr 17, 2018

maintner: track hashtag edits on GerritMeta, make HashtagEdits method…
… faster

Updates golang/go#24836

Change-Id: I75cae7de574af7525964bdf420328d3e553a044c
Reviewed-on: https://go-review.googlesource.com/107305
Reviewed-by: Andrew Bonventre <andybons@golang.org>
@bcmills

This comment has been minimized.

Member

bcmills commented Apr 17, 2018

I see the ADD HASHTAG button on my own changes, but not on other changes. Is that expected?

screenshot 2018-04-17 at 11 05 57

@bradfitz

This comment has been minimized.

Member

bradfitz commented Apr 17, 2018

Yes. We haven't modified the default permissions yet to give our Approvers group edit access.

@bradfitz

This comment has been minimized.

Member

bradfitz commented Apr 17, 2018

Sent change modifying our Gerrit config in https://go-review.googlesource.com/c/All-Projects/+/107556

[access "refs/heads/*"]
...
	editTopicName = group approvers
	label-Run-TryBot = +0..+1 group approvers
	label-Run-TryBot = +0..+1 group may-start-trybots
	label-TryBot-Result = -1..+1 group trybot-result-changers
	editHashtags = group approvers

... adding that last line.

@bradfitz

This comment has been minimized.

Member

bradfitz commented Apr 17, 2018

@bcmills, submitted.

@gopherbot

This comment has been minimized.

gopherbot commented Apr 19, 2018

Change https://golang.org/cl/108218 mentions this issue: cmd/gopherbot: remove the wait-author hashtags from CLs when author replies

@gopherbot

This comment has been minimized.

gopherbot commented Apr 19, 2018

Change https://golang.org/cl/108219 mentions this issue: devapp: hide CLs with hashtag wait-author

gopherbot pushed a commit to golang/build that referenced this issue Apr 20, 2018

cmd/gopherbot: remove the wait-author hashtags from CLs when author r…
…eplies

Updates golang/go#24836

Change-Id: I65dd57290634b31b112062dca9fafa76b2cc7153
Reviewed-on: https://go-review.googlesource.com/108218
Reviewed-by: Andrew Bonventre <andybons@golang.org>

gopherbot pushed a commit to golang/build that referenced this issue Apr 23, 2018

devapp: hide CLs with hashtag wait-author
Updates golang/go#24836

Change-Id: I9964dc7ec2de21201b9258709803623482aa4104
Reviewed-on: https://go-review.googlesource.com/108219
Reviewed-by: Andrew Bonventre <andybons@golang.org>
@gopherbot

This comment has been minimized.

gopherbot commented May 17, 2018

Change https://golang.org/cl/113536 mentions this issue: devapp: also hide open reviews with the tag "wait-release"

gopherbot pushed a commit to golang/build that referenced this issue May 17, 2018

devapp: also hide open reviews with the tag "wait-release"
Updates golang/go#24836

Change-Id: I7b739a54dec374d60e66bf083cd41c1879500ed3
Reviewed-on: https://go-review.googlesource.com/113536
Reviewed-by: Bryan C. Mills <bcmills@google.com>
@ALTree

This comment has been minimized.

Member

ALTree commented Aug 2, 2018

@bradfitz is there some note/doc explaining how these "Gerrit hashtags" are used in the Go project? I searched the wiki for "hashtag" but I couldn't find anything.

I've seen people tagging CLs (mostly with wait-release) but I still don't understand what exactly means to do that, what's the full list of the available hashtags, how hashtags are supposed to be used, how they integrate with the infrastructure and the dashboards, and whether wait-release supersedes the old R=go1.12 syntax.

defer added a commit to defer/gerrit-events that referenced this issue Oct 9, 2018

Add hashtags-changed event
With the arrival of NoteDB[1], gerrit now supports hashtags on changes
which might open interesting use-cases, like go's use of hashtags for
managing CL[2].

This patch adds support for the hashtag changed event.

[1] https://gerrit-review.googlesource.com/Documentation/note-db.html
[2] golang/go#24836

defer added a commit to defer/gerrit-events that referenced this issue Oct 9, 2018

Add hashtags-changed event
With the arrival of NoteDB[1], gerrit now supports hashtags on changes
which might open interesting use-cases, like go's use of hashtags for
managing CL[2].

This patch adds support for the hashtag changed event.

[1] https://gerrit-review.googlesource.com/Documentation/note-db.html
[2] golang/go#24836
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment