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: semantically recognize Go<VERSION> in backport messages instead of opening backports for all #34887

Closed
odeke-em opened this issue Oct 14, 2019 · 4 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@odeke-em
Copy link
Member

Coming here from issue #34878 (comment) in which I used <BOT> please backport this issue to Go1.13. but the bot opened up issues to Go1.12 and Go1.13 and then afterwards I commented to try to close other issues which then caused another set of backporting issues to be opened #34883 #34884.

This issue is to request that we understand not only 1.13 but also Go1.13 which I typed because I wasn't fully aware of the syntax. Thanks @bradfitz for encouraging me to file a bug about this in #34881 (comment).

@gopherbot gopherbot added this to the Unreleased milestone Oct 14, 2019
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Oct 14, 2019
@bradfitz
Copy link
Contributor

The current code always does past two releases, unless you want it to do three, I guess:

                majorReleases, err := b.getMajorReleases(ctx)
                if err != nil {
                        return err
                }
                var selectedReleases []string
                for _, r := range majorReleases {
                        if strings.Contains(backportComment.Body, r) {
                                selectedReleases = append(selectedReleases, r)
                        }
                }
                if len(selectedReleases) == 0 {
                        // Only backport to major releases unless explicitly
                        // asked to backport to the upcoming release.
                        selectedReleases = majorReleases[:len(majorReleases)-1]
                }

@bradfitz
Copy link
Contributor

So perhaps the feature request here is to add a way to only backport to the most recent.

@julieqiu julieqiu added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 15, 2019
@dmitshur
Copy link
Contributor

/cc @cagedmantis Another issue you could look at.

@dmitshur
Copy link
Contributor

dmitshur commented Mar 4, 2020

the bot opened up issues to Go1.12 and Go1.13

A number like "1.13" is enough. There isn't a need for a space in front or after. This is because getMajorReleases returns strings like []string{"1.9", "1.10", "1.11"}.

The reason gopherbot opened both issues is because it looks in the entire comment body, and you had mentioned 1.12 in the paragraphs above, before asking gopherbot.

Improving that is tracked in issue #27489.

which then caused another set of backporting issues to be opened

This is a separate issue and is tracked in #32533.

I'll close this because all of the problems described here are covered by more specific existing issues.

@dmitshur dmitshur closed this as completed Mar 4, 2020
@golang golang locked and limited conversation to collaborators Mar 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge 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

5 participants