about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-01-03 16:08:24 +0100
committerGitHub <noreply@github.com>2024-01-03 16:08:24 +0100
commit907922b4728132c2e5b052f7e13d35d5b5b02ae3 (patch)
tree4f45c28ede064138e54c41c8b26b69e8e6fffe9c
parent893b6f6538a0e3d038e33d3aa2527e0c4514540f (diff)
parent8dd6faca463bfd35a7c47353de69c40d6e054855 (diff)
downloadrust-907922b4728132c2e5b052f7e13d35d5b5b02ae3.tar.gz
rust-907922b4728132c2e5b052f7e13d35d5b5b02ae3.zip
Rollup merge of #119298 - onur-ozkan:silence-change-tracker-warning-for-ci, r=Mark-Simulacrum
suppress change-tracker warnings in CI containers

Fixes #119296
-rw-r--r--src/bootstrap/src/bin/main.rs32
-rwxr-xr-xsrc/ci/run.sh7
2 files changed, 23 insertions, 16 deletions
diff --git a/src/bootstrap/src/bin/main.rs b/src/bootstrap/src/bin/main.rs
index f06760ac01b..b97f73aa652 100644
--- a/src/bootstrap/src/bin/main.rs
+++ b/src/bootstrap/src/bin/main.rs
@@ -149,25 +149,27 @@ fn check_version(config: &Config) -> Option<String> {
 
         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");
diff --git a/src/ci/run.sh b/src/ci/run.sh
index e48fac1a087..dc0d5e02cb1 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"
@@ -237,7 +242,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