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 post-merge analysis CI workflow #138013

Merged
merged 1 commit into from
Mar 8, 2025

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Mar 4, 2025

This PR adds a post-merge analysis workflow, which was discussed here.

The workflow currently analyzes test suite results from bootstrap metrics. It downloads metrics for all known jobs in the parent and current (HEAD) commit, compares them and prints a truncated diff. It then posts this diff to the merged PR as a comment. Later I also want to add other statistics to the analysis, e.g. changes in CI/bootstrap step durations.

It can be tested locally e.g. using this:

cargo run --release --manifest-path src/ci/citool/Cargo.toml post-merge-report 3cb02729ab3c6583a3b1d1845c5e22b674f04b8d fd17deacce374a4185c882795be162e17b557050

This uses a slightly older commit as a parent, to have more results in the diff (normally the diff won't be so large).

CC @jieyouxu

r? @marcoieni

@rustbot
Copy link
Collaborator

rustbot commented Mar 4, 2025

⚠️ Warning ⚠️

  • These commits modify submodules.

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Mar 4, 2025
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 5, 2025

☔ The latest upstream changes (presumably #138021) made this pull request unmergeable. Please resolve the merge conflicts.

@Kobzol Kobzol force-pushed the ci-post-merge-analysis branch from c40b798 to 6ec42d7 Compare March 5, 2025 07:34
@Kobzol Kobzol marked this pull request as ready for review March 5, 2025 07:41
@Kobzol
Copy link
Contributor Author

Kobzol commented Mar 5, 2025

Rebased.

@rustbot ready

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 5, 2025

☔ The latest upstream changes (presumably #138058) made this pull request unmergeable. Please resolve the merge conflicts.

@Kobzol Kobzol force-pushed the ci-post-merge-analysis branch from 6ec42d7 to f04a2cc Compare March 7, 2025 08:25
@Kobzol
Copy link
Contributor Author

Kobzol commented Mar 7, 2025

Rebased.

@Kobzol Kobzol force-pushed the ci-post-merge-analysis branch from f04a2cc to d5da6b7 Compare March 7, 2025 08:43
Copy link
Member

@marcoieni marcoieni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very small details that don't matter, I'll approve this PR as it is now


for job in &job_db.auto_jobs {
eprintln!("Downloading metrics of job {}", job.name);
let metrics_parent = match download_job_metrics(&job.name, parent) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could simplify this match with something like this:
download_job_metrics(&job.name, parent).inspect_err( eprintln!()).ok()

Comment on lines +41 to +43
r#"Did not find metrics for job `{}` at `{}`: {error:?}.
Maybe it was newly added?"#,
job.name, parent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
r#"Did not find metrics for job `{}` at `{}`: {error:?}.
Maybe it was newly added?"#,
job.name, parent
r#"Did not find metrics for job `{}` at `{parent}`: {error:?}.
Maybe it was newly added?"#,
job.name

@marcoieni
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 7, 2025

📌 Commit d5da6b7 has been approved by marcoieni

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 Mar 7, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang#137337 (Add verbatim linker to AIXLinker)
 - rust-lang#137363 (compiler: factor Windows x86-32 ABI impl into its own file)
 - rust-lang#137537 (Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do)
 - rust-lang#137606 (add a "future" edition)
 - rust-lang#137957 (Remove i586-pc-windows-msvc)
 - rust-lang#138000 (atomic: clarify that failing conditional RMW operations are not 'writes')
 - rust-lang#138013 (Add post-merge analysis CI workflow)
 - rust-lang#138033 (rustdoc: Add attribute-related tests for rustdoc JSON.)
 - rust-lang#138137 (setTargetTriple now accepts Triple rather than string)
 - rust-lang#138173 (Delay bug for negative auto trait rather than ICEing)
 - rust-lang#138184 (Allow anyone to relabel `CI-spurious-*`)
 - rust-lang#138187 (remove clones)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f1051ed into rust-lang:master Mar 8, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 8, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2025
Rollup merge of rust-lang#138013 - Kobzol:ci-post-merge-analysis, r=marcoieni

Add post-merge analysis CI workflow

This PR adds a post-merge analysis workflow, which was discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Reporting.20test.20suite.20statistics.20after.20merge).

The workflow currently analyzes test suite results from bootstrap metrics. It downloads metrics for all known jobs in the parent and current (HEAD) commit, compares them and prints a truncated diff. It then posts this diff to the merged PR as a comment. Later I also want to add other statistics to the analysis, e.g. changes in CI/bootstrap step durations.

It can be tested locally e.g. using this:
```
cargo run --release --manifest-path src/ci/citool/Cargo.toml post-merge-report 3cb0272 fd17dea
```
This uses a slightly older commit as a parent, to have more results in the diff (normally the diff won't be so large).

CC `@jieyouxu`

r? `@marcoieni`
@Kobzol Kobzol deleted the ci-post-merge-analysis branch March 8, 2025 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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