Repository navigation
test: support local runs of //rs/tests/nested:{guestos,hostos}_upgrade_from_latest_release_to_current - #12029
Merged
basvandijk merged 1 commit intoNov 5, 2026
Conversation
…e_from_latest_release_to_current
basvandijk
marked this pull request as ready for review
November 5, 2026 16:34
basvandijk
enabled auto-merge
November 5, 2026 16:35
r-birkner
approved these changes
Nov 5, 2026
basvandijk
disabled auto-merge
November 5, 2026 16:42
basvandijk
deleted the
bas/support-local-upgrade_from_latest_release_to_current
branch
November 5, 2026 16:57
basvandijk
added a commit
that referenced
this pull request
Nov 6, 2026
…e evaluation job (#12032) ## Why `bazel-test-all` (ci-main.yml, dind-large) is to be replaced by the implementation of `bazel-test-all-rbe` (ci-rbe-evaluation.yml: Namespace runner + Bazel Remote Execution, `_local` system-tests), as the first step of moving CI off the self-hosted dind runners. Three things the required job does are not yet done by the evaluation job and can only be validated by running them, so this PR makes the still non-blocking evaluation job rehearse them on every master push before the switch: * the `execlogs-bazel-build` execution log that `build-determinism` compares with `build-ic`'s; * the `Upload artifacts` step (`bazel run --check_up_to_date //:upload-artifacts`) on a Namespace runner, under Build-without-the-Bytes and through the Namespace bazel wrapper, including AWS OIDC role assumption from a Namespace container job; * the `_local` variants of the system-tests listed in `PULL_REQUEST_BAZEL_TARGETS`, which the evaluation job silently drops today (it excludes `farm_system_test` *after* the explicit targets are added). The required jobs keep their behaviour; only the mechanics of the artifact upload change (see below). ## What * **`.github/actions/upload-execlogs`** (new): the execlog2csv install/convert/upload steps of `.github/actions/bazel`, as a composite that both bazel actions call, so the execlog2csv pins and the list of known non-reproducible targets live in one place. * **`.github/actions/bazel-namespace`**: new `execlogs-artifact-name` input (the wrapper writes `--execution_log_compact_file` for build and test when it is set); the wrapper no longer writes a BEP file/profile for `bazel run` (a BEP records the client environment, and the artifact upload is a `bazel run`); the OIDC token request variables are unset before `run`, as in the dind action. * **`.github/actions/upload-artifacts`**: runner-agnostic (`bazel-action: bazel | bazel-namespace`) and credentials only where rclone runs. The uploader is built with `bazel run --script_path` (new `build-uploader.sh`; under Build-without-the-Bytes `bazel run --check_up_to_date` downloads the target's outputs and runfiles by the digests the build step recorded, and on Namespace it runs with `--experimental_remote_cache_eviction_retries=0`, so a lost blob fails on that output instead of a retry that re-resolves everything through fresh remote cache lookups) and run by a separate step, the only one whose environment holds the AWS/Cloudflare credentials, now passed as inputs instead of step `env`. Neither the BEP files nor Namespace's Build Event Service (to which `nsc bazel setup` streams every bazel command's events, client environment included) see them anymore. This relies on rules_python 2.4.6 (#12041): with 1.9.0, every `<name>.build_data.txt` had constant metadata, which bazel can only validate on disk, so under Build-without-the-Bytes every later command re-ran those `PyWriteBuildData` actions (21 in a Namespace test step; two are tools in the upload closure, which would have failed `--check_up_to_date`). `ci/src/artifacts/upload.bzl`: the generated run script gets its shebang on the first line, which the `exec` of the `--script_path` script needs (`bazel run` hid this by running it through bash). * **`ci-main.yml`**: the two upload call sites use the new inputs (`bazel-test-all` also passes its build step's options to `bazel run`); `build-determinism` prints how many artifacts the comparison covers and warns outside PRs when the cache side misses more than half of build-ic's artifacts (a build that bazel retried after a remote-cache eviction has a partial execution log). * **`ci-rbe-evaluation.yml`**: uploads `execlogs-bazel-build-rbe`; on release builds (master pushes) runs `Configure AWS credentials` (role assumption only: `output-credentials: false`, the session never leaves that step) and a `DRY_RUN=1` artifact upload with placeholder credentials and `--check_up_to_date` through the Namespace wrapper (`environment: upload-artifacts`, `id-token: write`; both steps `continue-on-error`). * **`ci-kickoff.yml`**: the evaluation also runs on dfinity/ic-private PRs, since the Namespace GitHub App was given access to that repository today (so that `bazel-test-all` needs no repository gate after the switch; note that ic-private PR code, undisclosed hotfixes included, then builds on Namespace and shares the workspace's RBE cache with public builds, like it shares DFINITY's cache today); temporary `rbe-build-determinism` shadow job comparing `execlogs-bazel-build-rbe` with `execlogs-build-ic` (fails on mismatches like ci-main's job; not a required check, so it doesn't block merging; a missing execution log is not a mismatch). * **`PULL_REQUEST_BAZEL_TARGETS`**: lists the `_local` variant next to every `_farm`/`_farm_colocate` entry (24 lines; the dind job drops the former, the evaluation job the latter, so this changes nothing for CI Main and makes the evaluation job run on PRs exactly the tests that become blocking). The two nested `*_upgrade_from_latest_release_to_current_local` entries are runnable since #12029. * **`ci/scripts/targets.py`**: `check` honours `--exclude_tags` like `test` does (CI doesn't pass it yet; the switch will pass `--exclude_tags=farm_system_test`, which then rejects `_farm*` entries) and its hint no longer suggests `_colocate`. ## Not in this PR The switch itself (rewriting `bazel-test-all`, deleting the evaluation workflow and the shadow job, `_local`-only `PULL_REQUEST_BAZEL_TARGETS`, githubstats job names) follows after a soak of the rehearsal: shadow determinism `No mismatches` with ~34k joined rows, green dry-run uploads with `--check_up_to_date`, green OIDC step, `_local` flakiness not worse than dind. ## Testing * `build-uploader.sh` + the generated script, locally with `--config=local` and `//:artifact-uploader`: `--check_up_to_date` after a build reports `0 total actions`, the dry run prints `VERSION: 0000…` and one well-formed `<sha256> ic/<version>/…` manifest line per file. This dry run is what found the shebang problem in `upload.bzl` (the uploader died under `/bin/sh` with `set: Illegal option -o pipefail`). * `ci/scripts/targets.py check` passes with the dual listing (all 48 system-test labels are non-manual); `check --exclude_tags=farm_system_test` fails on exactly the 24 `_farm*` lines with the new hint. * `bazel run //pre-commit:ruff-check`, `//pre-commit:shfmt-check`, `//:buildifier`; all changed YAML parses. * The Namespace upload path (`bazel run --check_up_to_date` without eviction retries) follows from reading the Bazel 9.2.0 sources and the profiles of a Namespace job, reviewed adversarially; `build-uploader.sh` was exercised with a stub bazel for every exit code. It first runs for real in the rehearsal on the first master push after merge. * This PR touches `.github/*`, so its own CI builds and tests `//...` on both jobs; the evaluation job shows the `execlogs-bazel-build-rbe` artifact and the shadow job's comparison. The upload/OIDC rehearsal and the dind upload mechanics only run on release builds: first master push after merge. ## First rehearsal result (this PR's run 42102800890) Both `bazel-test-all` jobs of this run built `//...` for the same commit, so their execution logs can be compared directly: **396 of 62,164 shared artifacts differ between dind and RBE** (the RBE log is complete: 62,169 rows, all with digests). Against build-ic, the shadow job finds 76 mismatches in 34,266 artifacts, all downstream of jemalloc, while the dind `Build Determinism` is clean. **Root cause of the release-relevant part: jemalloc's configure reads the CPU's virtual-address width.** `@@+http_archive+jemalloc` (`third_party/BUILD.jemalloc.bazel`) runs jemalloc 5.3.0's configure on the machine that executes the action. On x86-64 it takes `LG_VADDR` from CPUID leaf 0x80000008, which sizes jemalloc's radix tree, so the compiled code of `libjemalloc.a` changes with it. Reproduced locally: the unmodified build gives the dind digest (`3c2559eb…`), the same build with `--with-lg-vaddr=57` gives the RBE digest (`b8f113b5…`) exactly, so the Namespace workers report 57 bits where the dind machines report 48. The `tikv-jemalloc-sys` rlib only bundles that archive (`JEMALLOC_OVERRIDE`; its `build.rs` returns before it reads `JEMALLOC_SYS_WITH_LG_*`), and the replica, `pocket-ic-server`, `ic-boundary`, `ic-gateway`, the GuestOS/SetupOS images and the publish bundles inherit it. Fixed by #12033, which pins `--with-lg-vaddr=48 --with-lg-page=12 --with-lg-hugepage=21`. That build gives the dind digest again, so the shipped binaries did not change. The other leaves are outside build-ic's closure (no shipped artifact contains them) and do not block the switch: OpenSSL's `libcrypto.a` (build date and sandbox path), the `libsqlite3-sys` build-script environment (absolute path compiled into the build script) and the Go SDK `builder` (records `CGO_ENABLED`). With #12033 merged into this branch, the shadow job compares the same 34,266 artifacts with **no mismatches** (run of 27fb17f), so it now fails on mismatches like ci-main's `Build Determinism`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
No description provided.