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

no issue created when clippy toolstate breaks #61693

Closed
matthiaskrgr opened this issue Jun 9, 2019 · 13 comments
Closed

no issue created when clippy toolstate breaks #61693

matthiaskrgr opened this issue Jun 9, 2019 · 13 comments
Assignees
Labels
C-bug Category: This is a bug. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

#61672 broke clippy toolstate but there was no issue created automatically.

Probably linked to rls/clippy decoupling #61670

@matthiaskrgr
Copy link
Member Author

@rustbot modify labels: T-dev-tools T-infra

@rustbot rustbot added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 9, 2019
@jonas-schievink jonas-schievink added C-bug Category: This is a bug. I-nominated labels Jun 9, 2019
@ehuss
Copy link
Contributor

ehuss commented Jun 9, 2019

I don't think it is related to rls. clippy-driver has never opened an issue when it has broken in the past.

The logs say I/O error: HTTP Error 422: Unprocessable Entity which is GitHub's error message for "Sending invalid fields". Unfortunately the script doesn't print the response body.

I can't see anything unusual in the script to explain why it would fail only for clippy-driver. My best guess is that there is something wrong with the list of assignees. The API docs say you can assign up to 10, so the larger number shouldn't be a problem.

@kennytm I could add some more debug output to publish_toolstate.py to understand the 422 error. I could also try to run the code locally with my own github token to see what the error is, but I don't want to generate noise pinging people if it succeeds.

@kennytm
Copy link
Member

kennytm commented Jun 21, 2019

Apparently the GitHub API docs is wrong, unassignable users are causing the 422 errors instead of being silently dropped as documented.

No issues for clippy-driver because @llogiq, @mcarton and @phansch can't be assigned.

I think rustfmt will have the same issue because @topecongiro can't be assigned.

Additionally, no issues for #62003 because the assignees array included the PR author @christianpoveda, which also can't be assigned.

@kennytm kennytm added I-nominated and removed T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. labels Jun 22, 2019
@kennytm
Copy link
Member

kennytm commented Jun 22, 2019

(Re-nominating for what to do with the assignees field. )

@kennytm kennytm added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed I-nominated labels Jun 26, 2019
@kennytm
Copy link
Member

kennytm commented Jun 26, 2019

In yesterday's infra meeting, we have decided to fix this issue by separating the list of people to be assigned and mentioned, and also the PR author will no longer be assigned automatically.

This could be implemented by

  1. Copy the MAINTAINERS configuration into a new dictionary of lists of usernames ASSIGNEES containing only the assignable members:
    # List of people to ping when the status of a tool or a book changed.
    MAINTAINERS = {
    'miri': '@oli-obk @RalfJung @eddyb',
    'clippy-driver': '@Manishearth @llogiq @mcarton @oli-obk @phansch',
    'rls': '@Xanewok',
    'rustfmt': '@topecongiro',
    'book': '@carols10cents @steveklabnik',
    'nomicon': '@frewsxcv @Gankro',
    'reference': '@steveklabnik @Havvy @matthewjasper @ehuss',
    'rust-by-example': '@steveklabnik @marioidival @projektir',
    'embedded-book': (
    '@adamgreig @andre-richter @jamesmunns @korken89 '
    '@ryankurte @thejpster @therealprof'
    ),
    'edition-guide': '@ehuss @Centril @steveklabnik',
    }
  2. Do not compute assignees in issue(), instead, accept another argument into the function
    def issue(
    tool,
    status,
    maintainers,
    relevant_pr_number,
    relevant_pr_user,
    pr_reviewer,
    ):
    # Open an issue about the toolstate failure.
    assignees = [x.strip() for x in maintainers.split('@') if x != '']
    assignees.append(relevant_pr_user)
  3. Obtain the assignees here
    issue(
    tool, new, MAINTAINERS.get(tool, ''),
    relevant_pr_number, relevant_pr_user, pr_reviewer,
    )

@kennytm kennytm added the E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. label Jun 26, 2019
@ehuss
Copy link
Contributor

ehuss commented Jun 26, 2019

I'm curious if it is necessary to set the assignee field at all. If all the people are @ mentioned in the body, they should be sufficiently notified. Does setting the assignee field have any benefits that I'm not aware of? It seems like skipping all this would simplify it a lot. These issues typically get fixed very quickly anyways.

@kennytm
Copy link
Member

kennytm commented Jun 27, 2019

Assignees can reach the issues again from https://github.com/issues/assigned, but for mentions it will be gone once the notification is read.

@matthiaskrgr
Copy link
Member Author

Is there a reason for keeping the issue open?
I think this might be fixed? cc #62338

@RalfJung
Copy link
Member

RalfJung commented Aug 1, 2019

#62023 implemented the strategy that the author of the breaking PR does not get assigned any more. So creating issues should always work now.

However, we still assume all people listed in MAINTAINERS can be assigned. That seems reasonable; the list is manually curated and at least historically adding people to some team was not a high bar.

So, closing this issue as fixed.

@RalfJung RalfJung closed this as completed Aug 1, 2019
@ehuss
Copy link
Contributor

ehuss commented Aug 1, 2019

we still assume all people listed in MAINTAINERS can be assigned

I don't think this is true. There are people in MAINTAINERS that cannot be assigned. For example, for clippy llogiq and mcarton are not members of this repo. Given that, I'm a bit baffled how #62338 got opened. It seemed to assign the first two people, and then ignored the rest?

@RalfJung
Copy link
Member

RalfJung commented Aug 1, 2019

Oh. That sounds like fun.

Any reason they can't be added so the org so that they can be assigned? Seems reasonable that people maintaining tools important enough to be tracked this way are added to the org (AFAIK that doesn't even automatically entail any new powers).

@RalfJung RalfJung reopened this Aug 1, 2019
@RalfJung
Copy link
Member

RalfJung commented Aug 1, 2019

Otherwise my proposal would be to make MAINTAINERS a dictionary mapping tools to a pair of strings; the first will be assigned and the second just mentioned. That seems nicer to me than what @kennytm proposed, which would duplicate the tool list.

@RalfJung
Copy link
Member

I think this has been resolved by #64119.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants