Skip to content

deb: skip pg_auto_failover community repo bootstrap on non-amd64 (unblock arm64 debs) - #1216

Open
ibrahim halatci (ihalatci) wants to merge 2 commits into
developfrom
ihalatci-arm64-deb-builder-fix
Open

deb: skip pg_auto_failover community repo bootstrap on non-amd64 (unblock arm64 debs)#1216
ibrahim halatci (ihalatci) wants to merge 2 commits into
developfrom
ihalatci-arm64-deb-builder-fix

Conversation

@ihalatci

@ihalatci ibrahim halatci (ihalatci) commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What / why

The deb builder image bootstrap unconditionally runs the PackageCloud community installer solely to add the pg_auto_failover repos:

# install packagecloud repos for pg_auto_failover
RUN curl https://install.citusdata.com/community/deb.sh | bash \
    && rm -rf /var/lib/apt/lists/*

On non-x86_64 arches that installer hard-aborts:

Unfortunately, the Citus repository does not contain packages for non-x86_64 architectures.

(exit 123), so the RUN fails before any debsign / build / publish. This is a bootstrap deadlock: we can't build arm64 packages because building the arm64 builder image itself refuses on arm64, because the community repo has no arm64 packages. It blocks all arm64 (.deb) legs — nightly and release.

Now that the org variable DEB_BUILD_MULTI_ARCH is true, the develop community-nightlies armed the gated arm64 legs, and every arm64 .deb leg fails at this step.

Evidence: run 33705146211, job Build package (debian/bookworm, arm64), step Build arm64 builder image — fails with the error above.

The fix

Guard the step on the Debian architecture so it runs only on amd64 and becomes a no-op elsewhere:

# install packagecloud repos for pg_auto_failover (amd64 only: the community
# repo has no non-x86_64 packages and its installer aborts on other arches)
RUN [ "$(dpkg --print-architecture)" != "amd64" ] || curl https://install.citusdata.com/community/deb.sh | bash \
    && rm -rf /var/lib/apt/lists/*

A || B | bash && C groups as ((A || (curl | bash)) && rm -rf …):

  • amd64: A is false → curl | bash runs exactly as before; if it fails the RUN still fails. amd64 behavior is byte-for-byte unchanged.
  • arm64 (and other non-amd64): A is true → curl | bash is skipped → rm -rf runs → the step succeeds as a no-op.

This step exists only for pg_auto_failover (per its comment) and is not needed for the citus arm64 build.

Scope

  • Source of truth: templates/Dockerfile-deb.tmpl.
  • Applied to all 10 deb dockerfiles + the template — the exact 11-file set touched by #1204, so the deb dockerfile family stays in lockstep with the template. The 6 matrix targets (debian-{bullseye,bookworm,trixie}, ubuntu-{jammy,noble,resolute}) are what os-list.csv / ./update_dockerfiles regenerate and what the arm64 build matrix actually builds; the other 4 (debian-buster, debian-stretch, ubuntu-bionic, ubuntu-focal) are kept consistent even though they are not currently in the build matrix.
  • Note: debian-stretch already used the older packagecloud.io/.../script.deb.sh installer URL (a pre-existing divergence from the template that deb: install jq from distro package so deb builder images work on arm64 #1204 did not normalize). Only the amd64 guard + comment were added there; its installer URL is left unchanged to keep this change minimal and focused on the arm64 fix.

Validation

  • No Docker build was run (Docker may be off); validation is the shell-logic reasoning plus the clean diff.
  • Verified A || B | bash && C precedence under /bin/sh (dash, the Dockerfile RUN shell):
    • arm64: installer skipped, rm runs, exit 0 (no-op success).
    • amd64 + installer success: installer runs, rm runs, exit 0 (unchanged).
    • amd64 + installer failure: installer runs, rm skipped, exit 1 (RUN still fails — unchanged).

Notes

  • Companion arm64-enablement fix to #1204 (the jq distro-package fix; same file family, base develop).
  • Broader arm64 context: citusdata/citus#8612.
  • amd64 is unchanged — the installer still runs on amd64 exactly as before.

ihalatci-msft and others added 2 commits September 3, 2026 12:49
The deb builder image bootstrap runs the PackageCloud community installer (install.citusdata.com/community/deb.sh) solely to add pg_auto_failover repos. On non-x86_64 arches that installer hard-aborts ("the Citus repository does not contain packages for non-x86_64 architectures", exit 123), failing the "Build arm64 builder image" step before any build/sign/publish and blocking all arm64 (.deb) legs.

Guard the step on `dpkg --print-architecture` so it runs only on amd64 and becomes a no-op elsewhere. amd64 behavior is unchanged: the installer still runs and a failure still fails the build.

Regenerated the 6 live deb dockerfiles from templates/Dockerfile-deb.tmpl. Companion arm64 fix to #1204.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… images

Apply the same amd64-only guard to the 4 deb dockerfiles that are not in os-list.csv / the arm64 build matrix (debian-buster, debian-stretch, ubuntu-bionic, ubuntu-focal) so the full deb dockerfile set stays in lockstep with templates/Dockerfile-deb.tmpl and matches the file set touched by #1204. stretch keeps its existing packagecloud.io installer URL; only the amd64 guard + comment are added.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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