Skip to content

Add post-merge analysis CI workflow - #138013

Merged
bors merged 1 commit into
rust-lang:masterfrom
Kobzol:ci-post-merge-analysis
Mar 8, 2025
Merged

Add post-merge analysis CI workflow#138013
bors merged 1 commit into
rust-lang:masterfrom
Kobzol:ci-post-merge-analysis

Conversation

@Kobzol

@KobzolKobzol commented Mar 4, 2025

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

⚠️Warning⚠️

  • These commits modify submodules.

@rustbotrustbot 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

bors commented Mar 5, 2025

Copy link
Copy Markdown
Collaborator

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

@Kobzol
Kobzolforce-pushed the ci-post-merge-analysis branch from c40b798 to 6ec42d7CompareMarch 5, 2025 07:34
@Kobzol
Kobzol marked this pull request as ready for review March 5, 2025 07:41
@Kobzol

Copy link
Copy Markdown
MemberAuthor

Rebased.

@rustbot ready

@rust-log-analyzer

This comment has been minimized.

@bors

bors commented Mar 5, 2025

Copy link
Copy Markdown
Collaborator

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

@Kobzol
Kobzolforce-pushed the ci-post-merge-analysis branch from 6ec42d7 to f04a2ccCompareMarch 7, 2025 08:25
@Kobzol

Copy link
Copy Markdown
MemberAuthor

Rebased.

@Kobzol
Kobzolforce-pushed the ci-post-merge-analysis branch from f04a2cc to d5da6b7CompareMarch 7, 2025 08:43

@marcoienimarcoieni left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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 forjob `{}` at `{parent}`:{error:?}.
Maybe it was newly added?"#,
job.name

@marcoieni

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Mar 7, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit d5da6b7 has been approved by marcoieni

It is now in the queue for this repository.

@borsbors 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
@jhprattjhpratt mentioned this pull request Mar 8, 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:masterMar 8, 2025
@rustbotrustbot 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 3cb0272fd17dea
```
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
Comment threadsrc/ci/citool/src/merge_report.rs
@KobzolKobzol mentioned this pull request Mar 13, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 14, 2025
…r=jieyouxu
Improve post-merge workflow
Contains various fixes for the post-merge workflow implemented in rust-lang#138013, which were suggested on Zulip. This PR changes the grouping of test diffs and ignores doctests, as they are too noisy.
I'll post an example output (before/after this PR) in comments below.
r? `@jieyouxu`
fmease added a commit to fmease/rust that referenced this pull request Mar 14, 2025
…r=jieyouxu
Improve post-merge workflow
Contains various fixes for the post-merge workflow implemented in rust-lang#138013, which were suggested on Zulip. This PR changes the grouping of test diffs and ignores doctests, as they are too noisy.
I'll post an example output (before/after this PR) in comments below.
r? ``@jieyouxu``
fmease added a commit to fmease/rust that referenced this pull request Mar 14, 2025
…r=jieyouxu
Improve post-merge workflow
Contains various fixes for the post-merge workflow implemented in rust-lang#138013, which were suggested on Zulip. This PR changes the grouping of test diffs and ignores doctests, as they are too noisy.
I'll post an example output (before/after this PR) in comments below.
r? ```@jieyouxu```
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 15, 2025
Rollup merge of rust-lang#138454 - Kobzol:post-merge-workflow-fixes, r=jieyouxu
Improve post-merge workflow
Contains various fixes for the post-merge workflow implemented in rust-lang#138013, which were suggested on Zulip. This PR changes the grouping of test diffs and ignores doctests, as they are too noisy.
I'll post an example output (before/after this PR) in comments below.
r? ```@jieyouxu```
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-infraRelevant 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.

6 participants

@Kobzol@rustbot@rust-log-analyzer@bors@marcoieni@klensy