Skip to content

Commit a6d8c9c

Browse files
RalfJungehuss
authored andcommitted
more toolstate comments
1 parent 0e1cd59 commit a6d8c9c

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

src/bootstrap/toolstate.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,11 @@ fn prepare_toolstate_config(token: &str) {
330330
Err(_) => false,
331331
};
332332
if !success {
333-
panic!("git config key={} value={} successful (status: {:?})", key, value, status);
333+
panic!("git config key={} value={} failed (status: {:?})", key, value, status);
334334
}
335335
}
336336

337-
// If changing anything here, then please check that src/ci/publish_toolstate.sh is up to date
337+
// If changing anything here, then please check that `src/ci/publish_toolstate.sh` is up to date
338338
// as well.
339339
git_config("user.email", "[email protected]");
340340
git_config("user.name", "Rust Toolstate Update");
@@ -382,7 +382,9 @@ fn commit_toolstate_change(current_toolstate: &ToolstateData) {
382382
let message = format!("({} CI update)", OS.expect("linux/windows only"));
383383
let mut success = false;
384384
for _ in 1..=5 {
385-
// Update the toolstate results (the new commit-to-toolstate mapping) in the toolstate repo.
385+
// Upload the test results (the new commit-to-toolstate mapping) to the toolstate repo.
386+
// This does *not* change the "current toolstate"; that only happens post-landing
387+
// via `src/ci/docker/publish_toolstate.sh`.
386388
change_toolstate(&current_toolstate);
387389

388390
// `git commit` failing means nothing to commit.

src/ci/publish_toolstate.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ GIT_COMMIT_MSG="$(git log --format=%s -n1 HEAD)"
2323
cd rust-toolstate
2424
FAILURE=1
2525
for RETRY_COUNT in 1 2 3 4 5; do
26-
# The purpose is to publish the new "current" toolstate in the toolstate repo.
26+
# The purpose of this is to publish the new "current" toolstate in the toolstate repo.
27+
# This happens post-landing, on master.
28+
# (Publishing the per-commit test results happens pre-landing in src/bootstrap/toolstate.rs).
2729
"$(ciCheckoutPath)/src/tools/publish_toolstate.py" "$GIT_COMMIT" \
2830
"$GIT_COMMIT_MSG" \
2931
"$MESSAGE_FILE" \

src/tools/publish_toolstate.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4-
# This script publishes the new "current" toolstate in the toolstate repo (not to be
5-
# confused with publishing the test results, which happens in
6-
# `src/ci/docker/x86_64-gnu-tools/checktools.sh`).
7-
# It is set as callback for `src/ci/docker/x86_64-gnu-tools/repo.sh` by the CI scripts
8-
# when a new commit lands on `master` (i.e., after it passed all checks on `auto`).
4+
# This script computes the new "current" toolstate for the toolstate repo (not to be
5+
# confused with publishing the test results, which happens in `src/bootstrap/toolstate.rs`).
6+
# It gets called from `src/ci/publish_toolstate.sh` when a new commit lands on `master`
7+
# (i.e., after it passed all checks on `auto`).
98

109
from __future__ import print_function
1110

0 commit comments

Comments
 (0)