Skip to content

ci: register shell toolchains in WORKSPACE Go fixtures - #288

Merged
tonyredondo merged 1 commit into
fix/rules-go-runtime-profile-configfrom
fix/windows-workspace-shell-toolchain
Oct 28, 2026
Merged

tonyredondo merged 1 commit into
fix/rules-go-runtime-profile-configfrom
fix/windows-workspace-shell-toolchain

Conversation

@tonyredondo

@tonyredondo tonyredondo commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Incorporated unchanged into #287 by fast-forward to fdb447c5. GitHub automatically marked this PR as merged into its base branch; nothing has been merged into main and no merge commit was created. #286 now depends directly on #287 and retains 511cf449. The active stack is #287 → #286. The original rationale and validation are retained below.

Problem

Windows WORKSPACE bootstrap fails on main before the Go test runs:

@@bazel_tools//tools/test:collect_coverage
No suitable shell toolchain found

main CI shows this with Bazel 8.8.2. The generated WORKSPACE calls go_rules_dependencies(), which makes rules_shell available, but never registers its shell toolchains. Bzlmod gets that registration through module setup; the WORKSPACE fixture needs explicit initialization.

Change

Call the public rules_shell_dependencies() and rules_shell_toolchains() macros after go_rules_dependencies(). Both local and archive consumers use this path, including the Windows disabled-to-enabled bootstrap smoke.

The regression runs the actual WORKSPACE writer for both fetch modes. It checks dependency/load order and requires toolchain registration exactly once. The fix is eight lines in the harness; the rest of the diff adds the regression and its runfiles dependencies.

Bazel stays at 8.8.2. The Go forks, instrumentation, payload handling and public onboarding helpers are unchanged.

Validation

  • The regression failed for both fetch modes before the fix and passes after it.
  • On the rebased branch fdb447c5, all 36 focused profile/WORKSPACE tests pass. Bash syntax, CI-equivalent ShellCheck, Buildifier and git diff --check pass.
  • Fresh CI: all 55 jobs pass. The checkout is merge revision c2c3911a, combining this head with ci: fix runtime patch profiles and Go smoke fixtures #287 at 33057eb9.
  • Native Windows disabled-to-enabled bootstrap transitions pass for all four maintained rules_go versions in both WORKSPACE and Bzlmod: eight combinations. The harness requires no metadata/cache/payloads while disabled and a successful instrumented test with payloads when enabled.
  • Both runtime patch profiles pass their functional and reproducibility smokes for every maintained upstream on x86-64 and ARM64. The core, all six companions, examples and hermetic lane also pass.

Current review and merge gates are tracked in #287. No test timeout or assertion was relaxed. The local branch and worktree are retained at fdb447c5. GitHub's automatic branch-deletion setting removed the remote head branch after marking this PR merged; its commit remains in #287 and can be recovered locally.

@tonyredondo
tonyredondo requested a review from a team as a code owner October 28, 2026 16:53

@datadog-prod-us1-4 datadog-prod-us1-4 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Both generated WORKSPACE fetch paths initialize shell dependencies before registering shell toolchains, with ordering supported by the maintained Go forks. Native Windows launcher execution remains unvalidated.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 71acda3

@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: fdb447c | Docs | Give us feedback!

@tonyredondo
tonyredondo changed the base branch from main to fix/rules-go-runtime-profile-config October 28, 2026 18:01
@tonyredondo
tonyredondo force-pushed the fix/windows-workspace-shell-toolchain branch from 71acda3 to fdb447c Compare October 28, 2026 18:02

@datadog-prod-us1-4 datadog-prod-us1-4 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Generated WORKSPACE consumers initialize rules_shell after go_rules_dependencies() and register its toolchains once for both fetch modes. Native Windows launcher execution still needs CI confirmation.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 71acda3

@tonyredondo
tonyredondo merged commit fdb447c into fix/rules-go-runtime-profile-config Oct 28, 2026
61 checks passed
@tonyredondo
tonyredondo deleted the fix/windows-workspace-shell-toolchain branch October 28, 2026 19:31
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.

1 participant