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

Add gha problem matcher #112787

Merged
merged 1 commit into from
Jun 20, 2023
Merged

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jun 19, 2023

These regexes capture rustfmt errors, panics and regular Rust errors in CI and automatically add messages in the diff view. This should make it simpler to quickly see what went wrong without having to scroll through CI logs.

We can fine tune the regexes or add more matchers after having a look at how it actually works in practice

The relevant documentation can be found at https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md

r? @jyn514

@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jyn514 (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 19, 2023
@jyn514
Copy link
Member

jyn514 commented Jun 19, 2023

can you move this to the existing matcher at src/ci/github-actions/problem_matchers.json please?

@jyn514 jyn514 added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 19, 2023
@oli-obk oli-obk force-pushed the gha_tinder_for_problems branch from c1903af to 7c7cc12 Compare June 19, 2023 10:33
@rustbot rustbot added the A-testsuite Area: The testsuite used to check the correctness of rustc label Jun 19, 2023
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 19, 2023

ah whoops, thanks!

@jyn514
Copy link
Member

jyn514 commented Jun 19, 2023

this looks good :) i worry a little that we won't notice when the regexes get outdated but the failure mode is just that the logs won't show up on the pr anymore so i don't mind merging this speculatively and fixing it later if it breaks.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 19, 2023

📌 Commit 7c7cc12 has been approved by jyn514

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 19, 2023
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 19, 2023

i worry a little that we won't notice when the regexes get outdated but the failure mode is just that the logs won't show up on the pr anymore so i don't mind merging this speculatively and fixing it later if it breaks.

yea... I have looked into it, but gha is untestable without significant effort (writing github API queries to check if some dummy branches emit those messages)

jyn514 added a commit to jyn514/rust that referenced this pull request Jun 19, 2023
…=jyn514

Add gha problem matcher

These regexes capture rustfmt errors, panics and regular Rust errors in CI and automatically add messages in the diff view. This should make it simpler to quickly see what went wrong without having to scroll through CI logs.

We can fine tune the regexes or add more matchers after having a look at how it actually works in practice

The relevant documentation can be found at https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md

r? `@jyn514`
@ehuss
Copy link
Contributor

ehuss commented Jun 19, 2023

I'm concerned this is going to generate a lot of false positives. For example, on this PR with a passing build, it generates 6 pages of errors for me. Is there some way to limit those, or maybe suppress the output in the tests that generate them?

@jyn514
Copy link
Member

jyn514 commented Jun 19, 2023

imo we should fix the libtest framework to properly capture the panics :/ i think it's related to thread spawning? i could have sworn there was a PR to fix it a couple years ago but maybe it didn't get merged for some reason.

@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 19, 2023

We can remove the panic regex for now.

@jyn514
Copy link
Member

jyn514 commented Jun 19, 2023

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 19, 2023
@oli-obk oli-obk force-pushed the gha_tinder_for_problems branch from 7c7cc12 to 13aa0dc Compare June 19, 2023 15:34
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 19, 2023

I replaced the panic regex with one for internal compiler errors. Let's see what CI says

@jyn514
Copy link
Member

jyn514 commented Jun 19, 2023

I don't see any popups in the diff.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 19, 2023

📌 Commit 13aa0dc has been approved by jyn514

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 19, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 20, 2023
…mpiler-errors

Rollup of 8 pull requests

Successful merges:

 - rust-lang#112232 (Better error for non const `PartialEq` call generated by `match`)
 - rust-lang#112499 (Fix python linting errors)
 - rust-lang#112596 (Suggest correct signature on missing fn returning RPITIT/AFIT)
 - rust-lang#112606 (Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses)
 - rust-lang#112781 (Don't consider TAIT normalizable to hidden ty if it would result in impossible item bounds)
 - rust-lang#112787 (Add gha problem matcher)
 - rust-lang#112799 (Clean up "doc(hidden)" check)
 - rust-lang#112803 (Format the examples directory of cg_clif)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7808265 into rust-lang:master Jun 20, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants