Skip to content

fix: run executable zip action with execution Python to better support windows building#3890

Merged
rickeylev merged 2 commits into
bazel-contrib:mainfrom
dzbarsky:codex/hermetic-python-zip-action
Jul 3, 2026
Merged

fix: run executable zip action with execution Python to better support windows building#3890
rickeylev merged 2 commits into
bazel-contrib:mainfrom
dzbarsky:codex/hermetic-python-zip-action

Conversation

@dzbarsky

@dzbarsky dzbarsky commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The legacy self-executable zip action invokes cat through run_shell. The
action does not declare cat, and a Windows-hosted Bazel invocation cannot use
that action reliably when the selected execution platform is Linux.

Run the existing exe_zip_maker through actions_run instead. This selects the
helper and Python runtime from the execution configuration, preserves the
prelude-plus-zip output format, and removes the ambient shell utility
dependency. A news entry documents the fix.

The Bazel integration that motivated this fix is
bazelbuild/bazel#30121.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the creation of self-executable Python zip files to use the execution platform's Python runtime instead of relying on a shell command (cat). Specifically, it replaces ctx.actions.run_shell with actions_run executing a dedicated _exe_zip_maker tool, which enables Windows-hosted Bazel invocations to run the action remotely on Linux. There are no review comments, so no additional feedback is provided.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

The legacy self-executable zip action used run_shell and an undeclared cat binary, so a Windows-hosted Bazel invocation could not run the action remotely on Linux.

Run the existing exe_zip_maker through actions_run so the helper and Python runtime come from the execution configuration.
@dzbarsky dzbarsky force-pushed the codex/hermetic-python-zip-action branch from 1716b1b to e9d5ffc Compare July 3, 2026 04:12
@dzbarsky dzbarsky marked this pull request as ready for review July 3, 2026 10:58
@dzbarsky dzbarsky requested review from aignas and rickeylev as code owners July 3, 2026 10:58
@rickeylev rickeylev changed the title fix: run executable zip action with execution Python fix: run executable zip action with execution Python to better support windows building Jul 3, 2026
@rickeylev rickeylev enabled auto-merge July 3, 2026 14:12
@github-actions github-actions Bot mentioned this pull request Jul 3, 2026
12 tasks
@rickeylev rickeylev added this pull request to the merge queue Jul 3, 2026
Merged via the queue into bazel-contrib:main with commit 1d99f70 Jul 3, 2026
6 checks passed
github-actions Bot pushed a commit that referenced this pull request Jul 3, 2026
…t windows building (#3890)

The legacy self-executable zip action invokes `cat` through `run_shell`.
The
action does not declare `cat`, and a Windows-hosted Bazel invocation
cannot use
that action reliably when the selected execution platform is Linux.

Run the existing `exe_zip_maker` through `actions_run` instead. This
selects the
helper and Python runtime from the execution configuration, preserves
the
prelude-plus-zip output format, and removes the ambient shell utility
dependency. A news entry documents the fix.

The Bazel integration that motivated this fix is

[bazelbuild/bazel#30121](bazelbuild/bazel#30121).

---------

Co-authored-by: Richard Levasseur <richardlev@gmail.com>
(cherry picked from commit 1d99f70)

Work towards #3867
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