Repository navigation
build(postgres): rebuild weekly instead of bumping pins - #250
Merged
Merged
Conversation
Exact apt pins go stale because apt.postgresql.org drops old builds, and keeping them current needed a bump script, a bot pull request, a token workaround, and a CLA exception. That is more machinery than a two-host alpha needs. Follow postgres:18-trixie and the current pgdg packages instead, and rebuild every Monday. Scheduled and manual runs skip the layer cache so package updates actually land, verify both platforms as before, and publish :18 only when the SBOM package list differs from the published image, so an unchanged rebuild never restarts Postgres on a host. The summary shows the package diff that replaces the bump pull request. Each run tags its images with the run ID, so a rebuild of the same commit never overwrites an earlier image and every publish stays a rollback target. Publishes now queue instead of cancelling each other. WAL-G, pgvector, and pgvectorscale stay pinned by checksum or commit. Remove postgres-bump.sh, postgres-image-bump.yml, and the github-actions[bot] CLA allowlist entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Resolve the postgres:18-trixie digest once and build both platforms on it, labelled with org.opencontainers.image.base.digest. - Count a changed base digest as a change, not only changed packages. - Refuse to publish when amd64 and arm64 differ in PostgreSQL or extension packages. - Fail closed when the published image's SBOM cannot be read. - Drop the layer cache: a cached apt layer hid updates and let a push roll packages back. Native builds take a few minutes. - Gate manual runs like scheduled ones; only a push always publishes. - Add run_attempt to the run tag so a re-run never overwrites an image that may already be promoted. - Correct the concurrency comment and drop an unused env variable. Co-Authored-By: Claude Opus 5.5 <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.
What this changes
This replaces the weekly pin-bump pull request (#248, #249) with a weekly rebuild:
postgres:18-trixieanddebian:trixie-slimby tag, and installs the pgdg extensions without version pins. WAL-G, pgvector and pgvectorscale stay pinned by checksum or commit.postgres-image.yml:no-cache; a cachedaptlayer would hide every package update. They still write the cache, so the next push stays fast.18-<sha>-<run_id>), so a weekly rebuild of the same commit never overwrites an earlier image, and every published image stays a rollback target.cancel-in-progress: false).:18only if the SBOM package list differs from the published:18, so an unchanged rebuild never restarts Postgres on a host. The run summary shows the package diff, which replaces the bump PR as the record of what changed.postgres-bump.sh,postgres-image-bump.yml, and thegithub-actions[bot]CLA allowlist entry.Why this is correct
:18against itself: unchanged.:18: changed, and the diff shows exactlypostgresql-1818.6→18.7 and postgis 3.6.4→3.7.0 on both platforms.postgres-verify.sh.just checkpasses.actionlintpasses, and shellcheck passes on everyrunblock.The schedule and the publish-only-when-changed path can first run after merge. Merging also runs a push build, which publishes, because a push always publishes.
Effect on the safety envelope
PostgreSQL minor releases and pgdg extension updates now reach hosts that follow
:18within a week, without a pull request, each time behind the per-platform verify step. Services with backups on are unaffected: they run a pinned digest and change only through a refresh candidate (internal/app/service_image_state.go:116). No change toob.Checklist
just checkpasses locally.just checkverifies this).🤖 Generated with Claude Code