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

x/build/cmd/gopherbot: when closing backport issues, ignores "Fixes" vs "For"/"Updates" verb before issue mention #29599

Open
katiehockman opened this issue Jan 7, 2019 · 3 comments
Labels
Builders x/build issues (builders, bots, dashboards) NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@katiehockman
Copy link
Contributor

katiehockman commented Jan 7, 2019

Gopherbot closes backport issues once it detects that an associated commit has been merged. This works well if the backport only requires one commit, but causes issues when there are multiple. Gopherbot should only close the issue if the "Fixes #" label exists in the commit message.

See #29565 for an example of Gopherbot in action.

One possible solution would be to add a new field to the GerritCL type that indicates whether or not this CL "fixes" the issue, or just updates/relates to it.

@golang/osp-team

@gopherbot gopherbot added this to the Unreleased milestone Jan 7, 2019
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Jan 7, 2019
@katiehockman katiehockman added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 7, 2019
@katiehockman
Copy link
Contributor Author

This is something I may pick up myself, but didn't have time to grab last week.

@dmitshur
Copy link
Contributor

dmitshur commented Jan 7, 2019

Gopherbot should only close the issue if the "Fixes #" label exists in the commit message.

That makes sense. Gopherbot shouldn't close the issue when the commit message says "Updates #nnn".

Currently, gopherbot looks for any kind of issue mention ("#nnn") simply because that's the only information that maintner exposes. In order to resolve this issue, maintner needs to be modified to expose additional information. There is an existing TODO comment in the maintner code that talks about what needs to be done to implement this:

https://github.com/golang/build/blob/6a02381872d7cdf7146a8560231970f0d3ef645b/maintner/github.go#L2502-L2506

One possible solution would be to add a new field to the GerritCL type that indicates whether or not this CL "fixes" the issue, or just updates/relates to it.

There is a maintner.GitHubIssueRef type, perhaps that information can go there. (Although doing that might require us to change the signature of the GerritCL.References method.)

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 7, 2019
@dmitshur dmitshur changed the title x/build/cmd/gopherbot: gopherbot closes backport issues after first merge x/build/cmd/gopherbot: when closing backport issues, ignores "Fixes" vs "Updates" verb before issue mention May 11, 2020
@dmitshur dmitshur changed the title x/build/cmd/gopherbot: when closing backport issues, ignores "Fixes" vs "Updates" verb before issue mention x/build/cmd/gopherbot: when closing backport issues, ignores "Fixes" vs "For"/"Updates" verb before issue mention Oct 29, 2020
@dmitshur
Copy link
Contributor

See #42277 for another occurrence.

CC @golang/release, @ianlancetaylor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) NeedsFix The path to resolution is known, but the work has not been done.
Projects
Status: Planned
Development

No branches or pull requests

3 participants