Skip to content

Commit ce0f158

Browse files
authored
Use correct platform for container_push pusher binary (#2372)
Summary: Use correct platform for `container_push` pusher binary I'm not sure why upstream switched this to [target](bazelbuild/rules_docker@e48c7cc), but this fails on our current GitHub runners ([build link](https://github.com/pixie-io/pixie/actions/runs/25715727034/job/75507683014)): ``` Target //k8s/vizier:vizier_images_push up-to-date: bazel-bin/k8s/vizier/vizier_images_push INFO: Elapsed time: 817.792s, Critical Path: 223.45s INFO: 5492 processes: 430 remote cache hit, 48 internal, 5014 processwrapper-sandbox. INFO: Build completed successfully, 5492 total actions INFO: INFO: Running command line: bazel-bin/k8s/vizier/vizier_images_push INFO: Streaming build results to: https://app.buildbuddy.io/invocation/27eff3a9-fc64-4408-8ca4-1c57014fb23d /github/home/.cache/bazel/_bazel_root/56ec069a32c4abebc78228236a835895/execroot/px/bazel-out/k8-opt/bin/k8s/vizier/vizier_images_push.runfiles/px/k8s/vizier/vizier_images_push.0.push: line 31: /github/home/.cache/bazel/_bazel_root/56ec069a32c4abebc78228236a835895/execroot/px/bazel-out/k8-opt/bin/k8s/vizier/vizier_images_push.runfiles/px/../io_bazel_rules_docker/container/go/cmd/pusher/pusher_/pusher: cannot execute binary file: Exec format error ``` Relevant Issues: N/A Type of change: /kind bugfix Test Plan: vizier-release job tested with a similar change. I ccidentally used `cfg = "host"` on the latest build but should have same effect. Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 44d42f1 commit ce0f158

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/container/push.bzl b/container/push.bzl
2+
index baef9c2..942741d 100644
3+
--- a/container/push.bzl
4+
+++ b/container/push.bzl
5+
@@ -205,7 +205,7 @@ container_push_ = rule(
6+
),
7+
"_pusher": attr.label(
8+
default = "//container/go/cmd/pusher",
9+
- cfg = "target",
10+
+ cfg = "exec",
11+
executable = True,
12+
allow_files = True,
13+
),
14+
diff --git a/contrib/push-all.bzl b/contrib/push-all.bzl
15+
index c7e7f72..fd6518b 100644
16+
--- a/contrib/push-all.bzl
17+
+++ b/contrib/push-all.bzl
18+
@@ -126,7 +126,7 @@ container_push = rule(
19+
),
20+
"_pusher": attr.label(
21+
default = Label("//container/go/cmd/pusher"),
22+
- cfg = "target",
23+
+ cfg = "exec",
24+
executable = True,
25+
allow_files = True,
26+
),

bazel/repositories.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def _pl_deps():
253253
_bazel_repo("rules_foreign_cc")
254254
_bazel_repo("io_bazel_rules_k8s")
255255
_bazel_repo("io_bazel_rules_closure")
256-
_bazel_repo("io_bazel_rules_docker", patches = ["//bazel/external:rules_docker.patch", "//bazel/external:rules_docker_arch.patch"], patch_args = ["-p1"])
256+
_bazel_repo("io_bazel_rules_docker", patches = ["//bazel/external:rules_docker.patch", "//bazel/external:rules_docker_arch.patch", "//bazel/external:rules_docker_pusher_cfg.patch"], patch_args = ["-p1"])
257257
_bazel_repo("rules_python")
258258
_bazel_repo("rules_pkg")
259259
_bazel_repo("com_github_bazelbuild_buildtools")

0 commit comments

Comments
 (0)