From f521b4c5c18a5a38d4c653a062bc297db1873522 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Wed, 27 Dec 2023 10:21:07 +0300 Subject: [PATCH 1/2] suppress change-tracker warnings in containers Signed-off-by: onur-ozkan --- src/ci/run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ci/run.sh b/src/ci/run.sh index 5700172fd3ec4..9b28c7ed50c67 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -47,6 +47,11 @@ source "$ci_dir/shared.sh" export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse +# suppress change-tracker warnings on CI +if [ "$CI" != "" ]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set change-id=99999999" +fi + if ! isCI || isCiBranch auto || isCiBranch beta || isCiBranch try || isCiBranch try-perf || \ isCiBranch automation/bors/try; then RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings --enable-verbose-tests" @@ -241,7 +246,7 @@ fi if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then rm -f config.toml - $SRC/configure --set rust.parallel-compiler + $SRC/configure --set change-id=99999999 --set rust.parallel-compiler # Save the build metrics before we wipe the directory if [ "$HAS_METRICS" = 1 ]; then From 8dd6faca463bfd35a7c47353de69c40d6e054855 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Tue, 26 Dec 2023 15:46:39 +0300 Subject: [PATCH 2/2] don't return suggestion message if no changes detected Signed-off-by: onur-ozkan --- src/bootstrap/src/bin/main.rs | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/bootstrap/src/bin/main.rs b/src/bootstrap/src/bin/main.rs index b1ab8dae535db..a44e7c75a1403 100644 --- a/src/bootstrap/src/bin/main.rs +++ b/src/bootstrap/src/bin/main.rs @@ -158,25 +158,27 @@ fn check_version(config: &Config) -> Option { let changes = find_recent_config_change_ids(id); - if !changes.is_empty() { - msg.push_str("There have been changes to x.py since you last updated:\n"); - - for change in changes { - msg.push_str(&format!(" [{}] {}\n", change.severity.to_string(), change.summary)); - msg.push_str(&format!( - " - PR Link https://github.com/rust-lang/rust/pull/{}\n", - change.change_id - )); - } + if changes.is_empty() { + return None; + } + + msg.push_str("There have been changes to x.py since you last updated:\n"); - msg.push_str("NOTE: to silence this warning, "); + for change in changes { + msg.push_str(&format!(" [{}] {}\n", change.severity.to_string(), change.summary)); msg.push_str(&format!( - "update `config.toml` to use `change-id = {latest_change_id}` instead" + " - PR Link https://github.com/rust-lang/rust/pull/{}\n", + change.change_id )); + } - if io::stdout().is_terminal() && !config.dry_run() { - t!(fs::write(warned_id_path, latest_change_id.to_string())); - } + msg.push_str("NOTE: to silence this warning, "); + msg.push_str(&format!( + "update `config.toml` to use `change-id = {latest_change_id}` instead" + )); + + if io::stdout().is_terminal() && !config.dry_run() { + t!(fs::write(warned_id_path, latest_change_id.to_string())); } } else { msg.push_str("WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.\n");