Skip to content

Conversation

@alexeagle
Copy link
Collaborator

See comments in tools/run_binary/main.go

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 65 to 69
ctx.actions.run(
outputs = outputs,
inputs = inputs,
executable = ctx.executable.tool,
executable = ctx.executable.tool_launcher,
arguments = [args],

Choose a reason for hiding this comment

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

P1 Badge Keep running the user-specified tool

The run_binary action now executes only ctx.executable.tool_launcher and never references ctx.executable.tool. Because the tool attribute is no longer added to the action’s inputs or invoked, every run_binary target will invoke the launcher binary regardless of what tool the rule declares, and the declared tool will not even be built when the action runs. This completely regresses the behavior of run_binary and breaks all existing usages of the rule.

Useful? React with 👍 / 👎.

Comment on lines 30 to 32
// Load wasm code by reading /Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/tool_/tool.wasm
wasmCode, err := os.ReadFile("/Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/tool_/tool.wasm")
if err != nil {

Choose a reason for hiding this comment

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

P1 Badge Don’t hard-code developer path to the WASM binary

The new launcher reads a WASM module from the absolute path /Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/tool_/tool.wasm. That path only exists on the author’s workstation, so the launcher will fail immediately on any other machine, workspace location, or remote executor. There is currently no way for Bazel to tell the launcher which tool to run, making the wrapper unusable for any run_binary target.

Useful? React with 👍 / 👎.

Comment on lines 51 to 52
_, err = spawnFunc.Call(store, "bazel-out/darwin_arm64-fastbuild/bin/path/to/package/output.txt")
if err != nil {

Choose a reason for hiding this comment

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

P1 Badge Output path is hard-coded to one platform

The launcher calls the WASM export with the literal path "bazel-out/darwin_arm64-fastbuild/bin/path/to/package/output.txt". This ignores the outs and args declared on the run_binary rule and forces every action to write to a darwin/arm64 fastbuild path, even when the build is running on Linux, on a different configuration, or produces a different file. As written the wrapper cannot produce the outputs requested by the Bazel action, so every run_binary target will either fail or write to the wrong location.

Useful? React with 👍 / 👎.

@aspect-workflows
Copy link

aspect-workflows bot commented Nov 16, 2025

Bazel 8 (Test)

⚠️ Buildkite build #252 failed.

//lib/tests/run_binary_expansions:expansions failed to build

run_binary failed: error executing RunBinary command (from target //lib/tests/run_binary_expansions:expansions) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/tools/run_binary/run_binary_/run_binary bazel-out/k8-fastbuild/bin/lib/tests/run_binary_expansions/expansions_out ... (remaining 19 arguments skipped)
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Failed to read wasm code: open /Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/wasm_tool_/wasm_tool.wasm: no such file or directory

//lib/tests/run_binary:dir_a failed to build

run_binary failed: error executing SomeAction command (from target //lib/tests/run_binary:dir_a) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/tools/run_binary/run_binary_/run_binary bazel-out/k8-fastbuild/bin/lib/tests/run_binary/dir_a_out
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Failed to read wasm code: open /Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/wasm_tool_/wasm_tool.wasm: no such file or directory

//lib/tests/stamping:run_stamper failed to build

run_binary failed: error executing RunBinary command (from target //lib/tests/stamping:run_stamper) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/tools/run_binary/run_binary_/run_binary bazel-out/k8-fastbuild/bin/lib/tests/stamping/stamped
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Failed to read wasm code: open /Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/wasm_tool_/wasm_tool.wasm: no such file or directory

//path/to/package:package failed to build

run_binary failed: error executing RunBinary command (from target //path/to/package:package) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/tools/run_binary/run_binary_/run_binary bazel-out/k8-fastbuild/bin/path/to/package/output.txt
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Failed to read wasm code: open /Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/wasm_tool_/wasm_tool.wasm: no such file or directory

💡 To reproduce the build failures, run

bazel build //lib/tests/run_binary_expansions:expansions //lib/tests/run_binary:dir_a //lib/tests/stamping:run_stamper //path/to/package:package

Bazel 9 (Test)

⚠️ Buildkite build #252 failed.

//lib/tests/run_binary_expansions:expansions failed to build

run_binary failed: error executing RunBinary command (from _run_binary rule target //lib/tests/run_binary_expansions:expansions) bazel-out/k8-opt-exec/bin/tools/run_binary/run_binary_/run_binary bazel-out/k8-fastbuild/bin/lib/tests/run_binary_expansions/expansions_out ... (remaining 19 arguments skipped)
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Failed to read wasm code: open /Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/wasm_tool_/wasm_tool.wasm: no such file or directory

//lib/tests/stamping:run_stamper failed to build

run_binary failed: error executing RunBinary command (from _run_binary rule target //lib/tests/stamping:run_stamper) bazel-out/k8-opt-exec/bin/tools/run_binary/run_binary_/run_binary bazel-out/k8-fastbuild/bin/lib/tests/stamping/stamped
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Failed to read wasm code: open /Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/wasm_tool_/wasm_tool.wasm: no such file or directory

//path/to/package:package failed to build

run_binary failed: error executing RunBinary command (from _run_binary rule target //path/to/package:package) bazel-out/k8-opt-exec/bin/tools/run_binary/run_binary_/run_binary bazel-out/k8-fastbuild/bin/path/to/package/output.txt
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Failed to read wasm code: open /Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/wasm_tool_/wasm_tool.wasm: no such file or directory

//lib/tests/run_binary:dir_a failed to build

run_binary failed: error executing SomeAction command (from _run_binary rule target //lib/tests/run_binary:dir_a) bazel-out/k8-opt-exec/bin/tools/run_binary/run_binary_/run_binary bazel-out/k8-fastbuild/bin/lib/tests/run_binary/dir_a_out
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Failed to read wasm code: open /Users/alexeagle/Projects/bazel-lib/bazel-bin/path/to/package/wasm_tool_/wasm_tool.wasm: no such file or directory

💡 To reproduce the build failures, run

bazel build //lib/tests/run_binary_expansions:expansions //lib/tests/stamping:run_stamper //path/to/package:package //lib/tests/run_binary:dir_a

Bazel 7 (Test)

e2e/api_entries

All tests were cache hits

1 test (100.0%) was fully cached saving 23ms.


Bazel 8 (Test)

e2e/api_entries

All tests were cache hits

1 test (100.0%) was fully cached saving 23ms.


Bazel 9 (Test)

e2e/api_entries

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Bazel 7 (Test)

e2e/copy_action

All tests were cache hits

1 test (100.0%) was fully cached saving 20ms.


Bazel 8 (Test)

e2e/copy_action

All tests were cache hits

1 test (100.0%) was fully cached saving 21ms.


Bazel 9 (Test)

e2e/copy_action

All tests were cache hits

1 test (100.0%) was fully cached saving 33ms.


Bazel 7 (Test)

e2e/copy_to_directory

All tests were cache hits

6 tests (100.0%) were fully cached saving 309ms.


Bazel 8 (Test)

e2e/copy_to_directory

All tests were cache hits

6 tests (100.0%) were fully cached saving 295ms.


Bazel 9 (Test)

e2e/copy_to_directory

All tests were cache hits

6 tests (100.0%) were fully cached saving 263ms.


Bazel 7 (Test)

e2e/coreutils

All tests were cache hits

4 tests (100.0%) were fully cached saving 204ms.


Bazel 8 (Test)

e2e/coreutils

All tests were cache hits

4 tests (100.0%) were fully cached saving 260ms.


Bazel 9 (Test)

e2e/coreutils

All tests were cache hits

4 tests (100.0%) were fully cached saving 271ms.


Bazel 7 (Test)

e2e/external_copy_to_directory

All tests were cache hits

1 test (100.0%) was fully cached saving 20ms.


Bazel 8 (Test)

e2e/external_copy_to_directory

All tests were cache hits

1 test (100.0%) was fully cached saving 21ms.


Bazel 9 (Test)

e2e/external_copy_to_directory

All tests were cache hits

1 test (100.0%) was fully cached saving 33ms.


Bazel 7 (Test)

e2e/smoke

All tests were cache hits

4 tests (100.0%) were fully cached saving 415ms.


Bazel 8 (Test)

e2e/smoke

All tests were cache hits

4 tests (100.0%) were fully cached saving 636ms.


Bazel 9 (Test)

e2e/smoke

All tests were cache hits

4 tests (100.0%) were fully cached saving 725ms.


Bazel 7 (Test)

e2e/write_source_files

All tests were cache hits

1 test (100.0%) was fully cached saving 30ms.


Bazel 8 (Test)

e2e/write_source_files

All tests were cache hits

1 test (100.0%) was fully cached saving 28ms.


Bazel 9 (Test)

e2e/write_source_files

All tests were cache hits

1 test (100.0%) was fully cached saving 35ms.

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