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

cmd/gopherbot: move "ping-early-issues" task to relui #58856

Closed
dmitshur opened this issue Mar 3, 2023 · 3 comments
Closed

cmd/gopherbot: move "ping-early-issues" task to relui #58856

dmitshur opened this issue Mar 3, 2023 · 3 comments
Assignees
Labels
Builders x/build issues (builders, bots, dashboards) NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Mar 3, 2023

Pinging issues with "early-in-cycle" is a task that we do once every 6 months, after the development of a new major Go version starts. Right now it's implemented as a task in gopherbot that needs to be explicitly run with -only-run=ping-early-issues flag (and provide a URL of the reopening announcement via the openTreeURLs map).

Now that we have relui, this task can move there. Not only is it slightly easier to trigger the task via a web UI, it also eliminates the need of setting up credentials for running goperbot on a local workstation. Having it in relui also opens future opportunities like eventually making it a part of a larger "reopen tree for development" workflow, etc.

This is the tracking issue for moving the task to relui. To avoid bringing in the maintner dependency into relui, I'll also rewrite it to use GitHub API v4 (GraphQL) instead and use it as an opportunity to see what that looks like.

CC @golang/release.

@dmitshur dmitshur added Builders x/build issues (builders, bots, dashboards) NeedsFix The path to resolution is known, but the work has not been done. labels Mar 3, 2023
@dmitshur dmitshur added this to the Unreleased milestone Mar 3, 2023
@dmitshur dmitshur self-assigned this Mar 3, 2023
@gopherbot
Copy link

Change https://go.dev/cl/473160 mentions this issue: cmd/relui: add a "ping early-in-cycle issues" workflow

@gopherbot
Copy link

Change https://go.dev/cl/473159 mentions this issue: cmd/gopherbot: replace maintner with GitHub API v4 in ping-early-issues

gopherbot pushed a commit to golang/build that referenced this issue Jul 19, 2023
Do this here first to make the diff easier to see.
The next CL in stack moves it to relui.

Notably the GraphQL implementation here is missing the "avoid duplicate
comments" safety net implemented in maintner-powered addGitHubComment.
With maintner, it costs no API calls to check all comments in a GitHub
issue for a past comment. When using the GitHub API, this unfortunately
costs more API quota and needs to be implemented explicitly, adding to
the verbosity of the implementation.

For golang/go#58856.

Change-Id: I2757697e561cb00d041f65ba846d902c0de35e22
Reviewed-on: https://go-review.googlesource.com/c/build/+/473159
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
gopherbot pushed a commit to golang/build that referenced this issue Jul 19, 2023
When adding a dedicated relui workflow, it was tempting to make it fancy
with each issue being a sub-task, etc. But we wouldn't want that if/when
this task joins others as part of a "reopen the dev tree" workflow, so
keep it a simple atomic (and safe to re-run) task. This is similar to
how pushing issues or checking for release blockers is one atomic task.

For golang/go#58856.

Change-Id: Idc8ef3cd62b7bb98c97b37d38ef9cdc2beccc24c
Reviewed-on: https://go-review.googlesource.com/c/build/+/473160
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
@dmitshur
Copy link
Contributor Author

This is done and worked to ping early issues in the Go 1.22 milestone recently.

This was also a bit of an exercise to see if GitHub's GraphQL API can help when moving away from maintner as a dependency. My conclusion is that it helps a bit, but using maintner (if it works) is still so much nicer and simpler.

There's a harmless TODO in code to decide "if it's worth moving the GraphQL query/mutation". I had the idea of possibly moving the query into GitHubClientInterface, but that really means moving the entire task's implementation there. I don't think it's worth it now, but can revisit this later.

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
Archived in project
Development

No branches or pull requests

2 participants