Skip to content

Conversation

@malt3
Copy link
Collaborator

@malt3 malt3 commented Oct 22, 2025

image_push, image_load, and multi_deploy all need to symlink an img tool that can run on the host.
Previously, we used a transition that would change the target platform of the img toolchain. This is effectively a no-op, since any img toolchain can target any platform.
Now, we use a little trick to add an extra exec platform (the host platform) at the beginning of the list of available exec platforms for the img tool.
This should result in the right img tool (executable on the host) being selected.

@aspect-workflows
Copy link

aspect-workflows bot commented Oct 22, 2025

Bazel 8 (Test)

2 test targets passed

Targets
//img/private/release/gazelle_plugin:release_files_test [k8-fastbuild] 202ms
//util:buildifier.check [k8-fastbuild]                                 1s

Total test execution time was 2s. 13 tests (86.7%) were fully cached saving 1s.


Integration Tests (Test)

⚠️ Buildkite build #439 failed.

Failed tests (2)
//e2e:generic_bazel_7_4_0                🔗
//e2e:generic_bazel_9_0_0-pre_20250921_2 🔗

💡 To reproduce the test failures, run

bazel test //e2e:generic_bazel_7_4_0 //e2e:generic_bazel_9_0_0-pre_20250921_2

Buildifier

@malt3 malt3 force-pushed the run_on_host_transition branch from a017b20 to fe6e042 Compare October 22, 2025 19:58
@malt3 malt3 changed the title deploy rules: set "extra_execution_platforms" for symlinked deploy tool transition deploy rules: Use extra execution group to obtain "bazel run" tool Oct 22, 2025
malt3 added 2 commits October 22, 2025 22:08
Any img tool can target any platform. The selection of different tools happens only via exec_compatible_with.
Exec groups allow us to get multiple variants of the img tool:

- The default exec group can be used at build time to build artifacts in actions
- The host exec group provides an img tool that works with "bazel run"
@malt3 malt3 force-pushed the run_on_host_transition branch from fe6e042 to ebb3d06 Compare October 22, 2025 20:08
@malt3 malt3 marked this pull request as ready for review October 22, 2025 20:09
@malt3 malt3 merged commit 6f44825 into main Oct 22, 2025
10 of 11 checks passed
@malt3 malt3 deleted the run_on_host_transition branch October 22, 2025 21:25
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