Skip to content

Do not trust bootstrap about git hash availability - #149377

Draft
jieyouxu wants to merge 3 commits into
rust-lang:mainfrom
jieyouxu:git-hash-availability
Draft

jieyouxu wants to merge 3 commits into
rust-lang:mainfrom
jieyouxu:git-hash-availability

Conversation

@jieyouxu

@jieyouxu jieyouxu commented Nov 27, 2025 •

Copy link
Copy Markdown
Member

Since the bootstrap implementation can contain bugs. See #132845 and #132875.

Instead, we use RUSTC_TEST_GIT_HASH env var that is directly set by CI, or by the user locally, to control when the tests/run-make/version-verbose-commit-hash gets run. Note that locally, setting RUSTC_TEST_GIT_HASH=1 only forces the test to run; the test will only pass if git hash is available, i.e. explicitly opt-in, or using a non-dev channel.

Fixes #132875.

r? ghost

try-job: aarch64-apple
try-job: test-various

@rustbot rustbot added A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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 Nov 27, 2025
@jieyouxu

This comment was marked as outdated.

@rust-bors

This comment has been minimized.

rust-bors Bot added a commit that referenced this pull request Nov 27, 2025
Do not trust bootstrap about git hash availability

try-job: aarch64-apple
try-job: test-various
@rust-log-analyzer

This comment was marked as outdated.

@jieyouxu

This comment was marked as outdated.

@rust-bors

This comment was marked as resolved.

Since the bootstrap implementation can contain bugs.

Instead, we use `RUSTC_TEST_GIT_HASH` env var that is directly set by
CI, or by the user locally.
@jieyouxu
jieyouxu force-pushed the git-hash-availability branch from 299c1fe to 39e27c1 Compare November 27, 2025 10:59
@jieyouxu

Copy link
Copy Markdown
Member Author

@bors try

rust-bors Bot added a commit that referenced this pull request Nov 27, 2025
Do not trust bootstrap about git hash availability

try-job: aarch64-apple
try-job: test-various
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 8523b25 (8523b250b8a0af9b70f36e2f1a9bfc84176e5e43, parent: 7b9905edb4df3aeaabd0d6cd0d4c09b183d7d965)

To always run `tests/run-make/version-verbose-commit-hash` in test jobs.
@jieyouxu
jieyouxu force-pushed the git-hash-availability branch from 39e27c1 to 536faa9 Compare November 28, 2025 09:27
@jieyouxu

Copy link
Copy Markdown
Member Author

@bors try

@rust-bors

rust-bors Bot commented Nov 28, 2025 •

Copy link
Copy Markdown
Contributor

⌛ Trying commit 536faa9 with merge 122f76c…

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/19759629162

rust-bors Bot added a commit that referenced this pull request Nov 28, 2025
Do not trust bootstrap about git hash availability

try-job: aarch64-apple
try-job: test-various
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@jieyouxu

Copy link
Copy Markdown
Member Author

@bors try cancel

@rust-bors

rust-bors Bot commented Nov 28, 2025

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@rust-bors

rust-bors Bot commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The run-make/version-verbose-commit-hash test doesn't reliably detect when the commit hash is missing

3 participants