posit-dev / posit-dev/images-shared

devVersions arch token hardcoded to amd64/x86_64 — breaks RedHat-family arm64 dev builds

Open
#666 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cvp:0 docker tdp:2
Dominant language
Python
Stars
2
Forks
0
Avg merge
4d 13h
Merged PRs (30d)
22

Description

Problem

_make_resolver_metadata hardcodes arch_identifier based on OS family, with no per-platform branch at all:

arch_identifier = "amd64"
if _os.family == OSFamilyEnum.REDHAT_LIKE:
    arch_identifier = "x86_64"

architecture_generalized_download_url then does a naive string-replace of whichever token appears in the resolved concrete URL with the literal placeholder $TARGETARCH, relying on Docker's build-time ARG TARGETARCH to refill it. That only works for Debian-like OSes because Docker's TARGETARCH vocabulary (amd64/arm64) happens to equal Debian's dpkg vocabulary. RedHat's real convention (x86_64/aarch64) diverges from Docker's for both architectures, so any multi-platform RedHat-family devVersion produces a 404 regardless of whether the artifact exists.

Confirmed directly against the CDN for package-manager (both the failing 2026.06.0 dev build and the already-released 2026.05.0):

Token Result
rpm/amd64/...amd64.rpm 404
rpm/arm64/...arm64.rpm 404
rpm/x86_64/...x86_64.rpm 200
rpm/aarch64/...aarch64.rpm 200

There's a standing FIXME acknowledging the gap:

# FIXME: This does not take into account RHEL-based OS notations (x86_64 or aarch64). These may need to be set at
#        buildtime using bash expressions.

SUSE_LIKE isn't special-cased either, despite also producing .rpm (packageSuffix) — it would silently fall through to the amd64 default.

Where

  • posit_bakery/config/image/posit_product/main.py: _make_resolver_metadata (arch_identifier hardcoding), ReleaseChannelResult.architecture_generalized_download_url (the generalize step)
  • Called from dev_version/channel.py (_resolve_os_urls, get_url_by_os) and duplicated in dev_version/base.py, gated on platforms != DEFAULT_PLATFORMS

Trigger

Surfaced by posit-dev/images-package-manager#103 adding RHEL 10 as a multi-platform devVersion OS:

Possible directions

  • Replace the hardcoded default with an explicit family × platform → arch-token map, so aarch64 is derived instead of assumed.
  • Or: keep $TARGETARCH as the Containerfile-side placeholder, but resolve it via a build-time OS-family-aware translation (bash case statement mapping amd64/arm64x86_64/aarch64 for RPM), matching what the FIXME already suggests.
  • Extend the existing artifact-availability probe (HEAD request / ArtifactNotAvailableError, same file) to run per-platform when generalization is used, so a wrong token 404s at bakery build --plan time instead of deep in a Docker build.

Related

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in posit_bakery/config/image/posit_product/main.py by reading _make_resolver_metadata and ReleaseChannelResult.architecture_generalized_download_url, then trace their callers in dev_version/channel.py and dev_version/base.py. Compare Debian, RedHat-family, and SUSE platform handling and the existing artifact-availability probe. Done means multi-platform RPM URLs use x86_64/aarch64 where required and invalid URLs are detected before the Docker build.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.