diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-19 08:17:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-19 08:17:16 +0100 |
| commit | 09c28f8d3d8afd640fe2fe550dd57b8c07bd5f49 (patch) | |
| tree | 29c9cc4a4f8214d3a94520a60f3ca034e11de411 | |
| parent | 67d3e5e53fac8a2e923f0e938463482d47a63610 (diff) | |
| parent | 9dac4797beefe846fee0568bb6b1bd38a677425d (diff) | |
| download | rust-09c28f8d3d8afd640fe2fe550dd57b8c07bd5f49.tar.gz rust-09c28f8d3d8afd640fe2fe550dd57b8c07bd5f49.zip | |
Rollup merge of #138656 - Kobzol:post-merge-unnest, r=marcoieni
Remove double nesting in post-merge workflow
See [this](https://github.com/rust-lang/rust/pull/138630#issuecomment-2732224491) :)
Can be tested with:
```bash
#!/bin/bash
PARENT_COMMIT=493c38ba371929579fe136df26eccd9516347c7a
SHA=259fdb521200c9abba547302fc2c826479ef26b2
printf "<details>\n<summary>What is this?</summary>\n" >> output.log
printf "This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.\n" >> output.log
printf "</details>\n\n" >> output.log
cargo run --release post-merge-report ${PARENT_COMMIT} ${SHA} >> output.log
```
I think that it's better to leave the notice in CI, to avoid generating it in citool, which can also be executed locally.
r? `@marcoieni`
| -rw-r--r-- | .github/workflows/post-merge.yml | 7 | ||||
| -rw-r--r-- | src/ci/citool/src/main.rs | 9 |
2 files changed, 4 insertions, 12 deletions
diff --git a/.github/workflows/post-merge.yml b/.github/workflows/post-merge.yml index de31c28cc90..94553608a2f 100644 --- a/.github/workflows/post-merge.yml +++ b/.github/workflows/post-merge.yml @@ -35,13 +35,12 @@ jobs: cd src/ci/citool - printf "*This is an experimental post-merge analysis report. You can ignore it.*\n\n" > output.log - printf "<details>\n<summary>Post-merge report</summary>\n\n" >> output.log + printf "<details>\n<summary>What is this?</summary>\n" >> output.log + printf "This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.\n" >> output.log + printf "</details>\n\n" >> output.log cargo run --release post-merge-report ${PARENT_COMMIT} ${{ github.sha }} >> output.log - printf "</details>\n" >> output.log - cat output.log gh pr comment ${HEAD_PR} -F output.log diff --git a/src/ci/citool/src/main.rs b/src/ci/citool/src/main.rs index 9e4b558d77a..5a84ecb5e47 100644 --- a/src/ci/citool/src/main.rs +++ b/src/ci/citool/src/main.rs @@ -20,7 +20,7 @@ use crate::cpu_usage::load_cpu_usage; use crate::datadog::upload_datadog_metric; use crate::jobs::RunType; use crate::metrics::{JobMetrics, download_auto_job_metrics, download_job_metrics, load_metrics}; -use crate::utils::{load_env_var, output_details}; +use crate::utils::load_env_var; const CI_DIRECTORY: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/.."); const DOCKER_DIRECTORY: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../docker"); @@ -175,13 +175,6 @@ fn postprocess_metrics( fn post_merge_report(db: JobDatabase, current: String, parent: String) -> anyhow::Result<()> { let metrics = download_auto_job_metrics(&db, &parent, ¤t)?; - output_details("What is this?", || { - println!( - r#"This is an experimental post-merge analysis report that shows differences in -test outcomes between the merged PR and its parent PR."# - ); - }); - println!("\nComparing {parent} (parent) -> {current} (this PR)\n"); output_test_diffs(metrics); |
