This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-5573-ad10b7f2b3c8110ce36379e2f538a8f6554fb494
in repository https://gitbox.apache.org/repos/asf/texera.git

commit 400f1cdaff960eedbb696a6501aee3dc84a9c453
Author: Jiadong Bai <[email protected]>
AuthorDate: Tue Jun 9 13:43:28 2026 -0700

    fix(build): download protoc matching target arch in image builds (#5573)
    
    ### What changes were proposed in this PR?
    
    The three service Dockerfiles (`texera-web-application`,
    `computing-unit-master`, `computing-unit-worker`) always downloaded the
    `linux-x86_64` `protoc` release, so the build-time Python proto
    regeneration failed on ARM64 image builds with `protoc: No such file or
    directory` (exit 127). This selects the `protoc` asset by architecture
    from `uname -m` (`x86_64`/`amd64` → `x86_64`, `aarch64`/`arm64` →
    `aarch_64`, unknown → fail fast), so both platforms build.
    
    ### Any related issues, documentation, discussions?
    
    Closes #5571
    
    ### How was this PR tested?
    
    - Confirmed protoc 3.19.4 publishes a `linux-aarch_64` asset and that
    the URL the fix builds resolves (HTTP 200).
    - Confirmed the `case` selection under `/bin/sh` maps `x86_64`/`amd64` →
    `x86_64`, `aarch64`/`arm64` → `aarch_64`, and exits non-zero on an
    unknown architecture.
    - The original failure was isolated to this single download line (the
    AMD64 image already builds), so the targeted fix addresses the failing
    step on ARM64.
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Opus 4.8 (1M context)
    
    Co-authored-by: Bob Bai <[email protected]>
---
 bin/computing-unit-master.dockerfile  | 7 ++++++-
 bin/computing-unit-worker.dockerfile  | 7 ++++++-
 bin/texera-web-application.dockerfile | 7 ++++++-
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/bin/computing-unit-master.dockerfile 
b/bin/computing-unit-master.dockerfile
index aece464438..12d026ee54 100644
--- a/bin/computing-unit-master.dockerfile
+++ b/bin/computing-unit-master.dockerfile
@@ -55,7 +55,12 @@ RUN apt-get update && apt-get install -y \
 COPY bin/protoc-version.txt bin/protoc-version.txt
 COPY bin/python-proto-gen.sh bin/python-proto-gen.sh
 RUN PROTOC_VERSION=$(cat bin/protoc-version.txt) \
-    && curl -fsSL -o /tmp/protoc.zip 
"https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip";
 \
+    && case "$(uname -m)" in \
+         x86_64 | amd64) PROTOC_ARCH=x86_64 ;; \
+         aarch64 | arm64) PROTOC_ARCH=aarch_64 ;; \
+         *) echo "Unsupported architecture: $(uname -m)" >&2 && exit 1 ;; \
+       esac \
+    && curl -fsSL -o /tmp/protoc.zip 
"https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip";
 \
     && unzip -o /tmp/protoc.zip -d /usr/local \
     && chmod +x /usr/local/bin/protoc \
     && rm /tmp/protoc.zip \
diff --git a/bin/computing-unit-worker.dockerfile 
b/bin/computing-unit-worker.dockerfile
index fc80998888..fc89c0f352 100644
--- a/bin/computing-unit-worker.dockerfile
+++ b/bin/computing-unit-worker.dockerfile
@@ -55,7 +55,12 @@ RUN apt-get update && apt-get install -y \
 COPY bin/protoc-version.txt bin/protoc-version.txt
 COPY bin/python-proto-gen.sh bin/python-proto-gen.sh
 RUN PROTOC_VERSION=$(cat bin/protoc-version.txt) \
-    && curl -fsSL -o /tmp/protoc.zip 
"https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip";
 \
+    && case "$(uname -m)" in \
+         x86_64 | amd64) PROTOC_ARCH=x86_64 ;; \
+         aarch64 | arm64) PROTOC_ARCH=aarch_64 ;; \
+         *) echo "Unsupported architecture: $(uname -m)" >&2 && exit 1 ;; \
+       esac \
+    && curl -fsSL -o /tmp/protoc.zip 
"https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip";
 \
     && unzip -o /tmp/protoc.zip -d /usr/local \
     && chmod +x /usr/local/bin/protoc \
     && rm /tmp/protoc.zip \
diff --git a/bin/texera-web-application.dockerfile 
b/bin/texera-web-application.dockerfile
index efaee5699a..276253ec4f 100644
--- a/bin/texera-web-application.dockerfile
+++ b/bin/texera-web-application.dockerfile
@@ -70,7 +70,12 @@ RUN apt-get update && apt-get install -y \
 COPY bin/protoc-version.txt bin/protoc-version.txt
 COPY bin/python-proto-gen.sh bin/python-proto-gen.sh
 RUN PROTOC_VERSION=$(cat bin/protoc-version.txt) \
-    && curl -fsSL -o /tmp/protoc.zip 
"https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip";
 \
+    && case "$(uname -m)" in \
+         x86_64 | amd64) PROTOC_ARCH=x86_64 ;; \
+         aarch64 | arm64) PROTOC_ARCH=aarch_64 ;; \
+         *) echo "Unsupported architecture: $(uname -m)" >&2 && exit 1 ;; \
+       esac \
+    && curl -fsSL -o /tmp/protoc.zip 
"https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip";
 \
     && unzip -o /tmp/protoc.zip -d /usr/local \
     && chmod +x /usr/local/bin/protoc \
     && rm /tmp/protoc.zip \

Reply via email to