feat(ci): Publish distroless image under the default tag - #8301
Draft
oioki wants to merge 1 commit into
Draft
Conversation
Point the unsuffixed ghcr tags at the distroless build so every consumer of the default image — self-hosted, nightly, and craft releases — gets the distroless variant. The previous default image is still published, now under the -distroful suffix, so it stays available as a fallback. The unsuffixed <sha> tag is the single choke point downstream: it feeds :nightly, the self-hosted end-to-end job, and craft, which retags <sha> into the versioned release and :latest. Retargeting the assemble job therefore switches everyone at once, with no .craft.yml change needed. Wire the assemble and self-hosted-end-to-end jobs to the distroless builds so the self-hosted e2e suite exercises the distroless image against the real compose stack before craft can cut a release from it. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Point the unsuffixed ghcr tags at the distroless build, so every consumer of the default image — self-hosted,
nightly, and craft releases — gets the distroless variant. The previous default image is still published under a-distrofulsuffix as a fallback.Distroless has run in production (all SaaS and single-tenant regions, services and migration jobs) for over a month without issues. This extends it to everyone else.
<sha>,nightly<sha>-distroful,nightly-distroful<sha>-distroless,-debugvariantsWhy
assembleis the only leverThe unsuffixed
<sha>tag is the choke point: it feeds:nightly, theself-hosted-end-to-endjob, and craft, which retags<sha>into the versioned release and:latest. Retargetingassembleswitches everyone at once, with no.craft.ymlchange — craft's status contexts keep their job names, andassemblenow transitively gates on the distroless builds so a release can't be cut before that manifest exists.Note this is a workflow change, not a Dockerfile one; both build stages already exist and are unchanged. arm64 is covered — the distroless multiplatform build already produces both architectures.
Self-hosted compatibility (checked against getsentry/self-hosted @ de88f0b)
Distroless has no shell, so I audited self-hosted for shell dependencies. It's clean:
["CMD", "python3", ...]using only stdliburllib— nocurl/wget/shell. The shared file-healthcheck anchor is inlinepython3, explicitly written to work across images.command:values (rust-consumer,replacer,subscriptions-scheduler-executor,accepted-outcomes-consumer) are plain subcommands, and each resolves under the distroless Python entrypoint'ssnuba/cli/<name>.pylookup. No shell form, noentrypoint:overrides.docker exec … bashagainst snuba anywhere in the repo; the custom-CA setup usesdocker create/docker cp, not in-container shell.Two residual notes: users who manually
docker exec -it snuba-… bashto debug will need the-debug(busybox) variant instead, which is worth a release note; and it's worth confirming the DHI base ships/etc/ssl/certs, since the custom-CA flow copies that baseline out of the image.Follow-ups, deliberately not here
-distrolessexplicitly, so production is already distroless and the plain AR tag is vestigial. Renaming it needs a grep of getsentry/terraform first.-distrofulcovers<sha>andnightly, but craft only publishes the plain tag as versioned releases, so a user pinned to a version would have to pin by sha. A craft target for-distrofulwould close that if we want a true escape hatch.applicationstage and its build jobs can be dropped.