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/maintner/maintnerd, x/build/maintner: changes are hard to review and test #37603

Open
dmitshur opened this issue Mar 2, 2020 · 1 comment
Labels
Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Mar 2, 2020

This issue is to note that it is currently difficult and time-intensive to review changes to the maintner server. Changes to the server are risky and can cause crashes, or worse, incorrect data to be written. Many services depend on the maintner server being stable and correct.

It has some tests, but they're not enough to provide sufficient confidence. Manual testing is not easy. There isn't a staging instance that's actively used.

This issue is to track progress on making it easier and safer to make changes to maintner. It has known bugs that need to be resolved, and Gerrit and GitHub APIs may change, so not making any changes will not be viable indefinitely.

/cc @cagedmantis @toothrot

@dmitshur dmitshur added Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 2, 2020
@dmitshur dmitshur added this to the Backlog milestone Mar 2, 2020
@gopherbot
Copy link

Change https://golang.org/cl/216438 mentions this issue: maintner: handle deleted issues in githubRepoPoller.syncIssues

@dmitshur dmitshur changed the title x/build/maintner/maintnerd, x/build/maintner: changes are hard to review x/build/maintner/maintnerd, x/build/maintner: changes are hard to review and test Mar 2, 2020
gopherbot pushed a commit to golang/build that referenced this issue Mar 2, 2020
For an issue that does not exist, GitHub API returns the message
"Not Found", or when an issue is deleted, "This issue was deleted".

From https://developer.github.com/v3/issues/#get-a-single-issue:

> If the issue was transferred to or deleted from a repository
> where the authenticated user lacks read access, the API
> returns a 404 Not Found status. If the issue was deleted
> from a repository where the authenticated user has read
> access, the API returns a 410 Gone status.

Start checking ge.Response.StatusCode for http.StatusNotFound
or http.StatusGone rather than using the Message field, because
it is more robust and a closer match to GitHub API documentation.

An example GitHub API request which returns 410 Gone status is
https://api.github.com/repos/sourcegraph/sourcegraph/issues/2921.

Updates golang/go#37603

Change-Id: Ifb77fed722d720ecbeae9b5f196f200f8097a67f
Reviewed-on: https://go-review.googlesource.com/c/build/+/216438
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
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) 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

2 participants