mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 22:35:42 +00:00
Fix sporadic warmup binary build failure in CI (#5797)
The warmup binary was being copied from a hardcoded bazel-bin path that doesn't work reliably with cross-compilation and remote caching. When the binary was cached but not materialized locally, the cp command would fail. Fix by: - Create a warmup_tar pkg_tar target that packages the warmup binary - Use tar extraction instead of cp, which forces Bazel to materialize the output file before the command runs - Rename the binary from warmup_linux_amd64 to warmup in the tar Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,11 +68,11 @@ jobs:
|
||||
//ci:eagle_server_image \
|
||||
//ci:admin_server_image \
|
||||
//ci:jfr_sidecar_image \
|
||||
//src/main/go/net/eagle0/warmup:warmup_linux_amd64
|
||||
//ci:warmup_tar
|
||||
|
||||
# Copy warmup binary to scripts/ for deployment
|
||||
# Extract warmup binary from tar for deployment
|
||||
mkdir -p scripts/bin
|
||||
cp bazel-bin/src/main/go/net/eagle0/warmup/warmup_linux_amd64_/warmup_linux_amd64 scripts/bin/warmup
|
||||
tar -xf bazel-bin/ci/warmup_tar.tar -C scripts/bin --strip-components=1
|
||||
|
||||
# Save all image paths before any other bazel command changes bazel-bin symlink
|
||||
EAGLE_PATH=$(readlink -f bazel-bin/ci/eagle_server_image)
|
||||
@@ -201,9 +201,9 @@ jobs:
|
||||
|
||||
- name: Build warmup tool
|
||||
run: |
|
||||
bazel build //src/main/go/net/eagle0/warmup:warmup_linux_amd64
|
||||
bazel build //ci:warmup_tar
|
||||
mkdir -p scripts/bin
|
||||
cp bazel-bin/src/main/go/net/eagle0/warmup/warmup_linux_amd64_/warmup_linux_amd64 scripts/bin/warmup
|
||||
tar -xf bazel-bin/ci/warmup_tar.tar -C scripts/bin --strip-components=1
|
||||
|
||||
- name: Copy config files to droplet
|
||||
run: |
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load", "oci_push")
|
||||
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
|
||||
|
||||
#
|
||||
# Deployment artifacts (tools needed on the host, not in containers)
|
||||
#
|
||||
|
||||
pkg_tar(
|
||||
name = "warmup_tar",
|
||||
srcs = ["//src/main/go/net/eagle0/warmup:warmup_linux_amd64"],
|
||||
package_dir = "bin",
|
||||
remap_paths = {
|
||||
"/warmup_linux_amd64": "/warmup",
|
||||
},
|
||||
)
|
||||
|
||||
#
|
||||
# Shared utilities layer (busybox for nc, wget, etc.)
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user