ci,scripts: bootstrap the Rust toolchain in check-system-test-trigger - #15105
Draft
avi-starkware wants to merge 1 commit into
Draft
avi-starkware wants to merge 1 commit into
avi-starkware wants to merge 1 commit into
Conversation
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>
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
check-system-test-triggerinhybrid_system_test.yamlrunsscripts/check_test_trigger.py, which callscargo tree --depth 0viascripts/tests_utils.py::get_workspace_tree(). The job installs Python but never a Rust toolchain, socargoresolves 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:A passing run of the same job on another branch (34336680140) shows
syncing channel updatesand then ~50 s of work; the failing runs spend ~7 s and only fetchrust-std. rustup is finding a 1.96 toolchain it considers already installed and topping up the target, but the install has nocargocomponent.Fix
Use
./.github/actions/bootstrapin the job, the same waymain.yml,merge_queue_ci.ymlandmain_nightly.ymlalready do for every other job that runs these scripts. That installs the toolchain pinned byrust-toolchain.tomlexplicitly instead of relying on ambient runner state.Bootstrap's
namespace_cachestep already mounts the python cache volume, so the job's ownnscloud-cache-actionstep is dropped rather than mounting it twice.tests_utils.pycarried twoRUSTC_WRAPPER=""overrides withTODO(Yoav): Remove this once hybrid_system_test uses bootstrap.This PR is that condition, so both overrides are removed. Bootstrap installs sccache (viainstall_cargo_tools.sh) and.cargo/config.tomlalready setsrustc-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 --checkandisort -c(thepy_code_style.pyflags) pass onscripts/tests_utils.py.get_workspace_tree()andget_package_dependencies()run without the override (115 workspace packages resolved)..github/workflows/hybrid_system_test.yaml, which is in the job'spath_triggers, socheck-system-test-triggerruns for real here (no optimizer skip) and should returnshould_run=true, exercising the full path.🤖 Generated with Claude Code