Skip to content

ci,scripts: bootstrap the Rust toolchain in check-system-test-trigger - #15105

Draft
avi-starkware wants to merge 1 commit into
main-v0.14.4from
avi/ci/hybrid-trigger-bootstrap
Draft

avi-starkware wants to merge 1 commit into
main-v0.14.4from
avi/ci/hybrid-trigger-bootstrap

Conversation

@avi-starkware

@avi-starkware avi-starkware commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Problem

check-system-test-trigger in hybrid_system_test.yaml runs scripts/check_test_trigger.py, which calls cargo tree --depth 0 via scripts/tests_utils.py::get_workspace_tree(). The job installs Python but never a Rust toolchain, so cargo resolves to whatever rustup state the runner image happens to carry.

On PR #15026 that state was broken, deterministically. Three attempts of run 34341989783 on three different runners (nsc-runner-ksra8te9v8m3i, -u4nb253qddbkm, -92iapg1b1s7bo) all failed the same way:

info: syncing channel updates for 1.96-x86_64-unknown-linux-gnu
info: downloading component rust-std
error: 'cargo' is not installed for the toolchain '1.96-x86_64-unknown-linux-gnu'.

A passing run of the same job on another branch (34336680140) shows syncing channel updates and then ~50 s of work; the failing runs spend ~7 s and only fetch rust-std. rustup is finding a 1.96 toolchain it considers already installed and topping up the target, but the install has no cargo component.

Fix

Use ./.github/actions/bootstrap in the job, the same way main.yml, merge_queue_ci.yml and main_nightly.yml already do for every other job that runs these scripts. That installs the toolchain pinned by rust-toolchain.toml explicitly instead of relying on ambient runner state.

Bootstrap's namespace_cache step already mounts the python cache volume, so the job's own nscloud-cache-action step is dropped rather than mounting it twice.

tests_utils.py carried two RUSTC_WRAPPER="" overrides with TODO(Yoav): Remove this once hybrid_system_test uses bootstrap. This PR is that condition, so both overrides are removed. Bootstrap installs sccache (via install_cargo_tools.sh) and .cargo/config.toml already sets rustc-wrapper = "sccache" for every other cargo invocation, so no new requirement is introduced.

Verification

  • python -c 'import yaml; ...' parses the workflow; the job's steps are now: checkout → bootstrap → setup-python → pip install → check.
  • black -l 100 -t py37 --check and isort -c (the py_code_style.py flags) pass on scripts/tests_utils.py.
  • Locally, get_workspace_tree() and get_package_dependencies() run without the override (115 workspace packages resolved).
  • This PR edits .github/workflows/hybrid_system_test.yaml, which is in the job's path_triggers, so check-system-test-trigger runs for real here (no optimizer skip) and should return should_run=true, exercising the full path.

🤖 Generated with Claude Code

The job runs check_test_trigger.py, which shells out to `cargo tree`, but never installed a
toolchain, so it depended on whatever rustup state the runner image carried and failed with
"'cargo' is not installed for the toolchain '1.96'" on three consecutive runners. It now uses
the same bootstrap action as every other job that runs these scripts, which also lets the
RUSTC_WRAPPER workaround in tests_utils.py go, as its TODO asked.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants