Repository navigation
feat: an image for stacks with no Python in them - #38
Closed
AlexeyShalaev wants to merge 1 commit into
Closed
AlexeyShalaev wants to merge 1 commit into
AlexeyShalaev wants to merge 1 commit into
Conversation
ghcr.io/bedrock-python/pg-partsmith runs the CLI as its entrypoint, so a Go, Ruby or Node service maintains its partitions from a CronJob, a Compose service or an init container without taking a Python dependency. Size is the first thing a team evaluating this reads, so it is a build failure and not a note: the venv is built in a stage that is thrown away -- pip, the build backend and every __pycache__ with it -- and CI checks the result against a budget on every pull request. It runs as UID 65532 and the image is scanned on both the pull request and the release. The image is published from the release workflow with the version off the tag, as the exact version and a moving minor, and never as latest: a scheduled job following latest would cross a major on its own, at 02:15, with DROP in its hands. CI refuses to publish an image whose --version disagrees with the tag it is being pushed under. The init-container case needs no flag: apply without --allow-destructive creates and retires nothing. The operator page states the grants this thing needs and asks for a dedicated role, because it issues DDL and nobody should have to work that out from the source.
Member
Author
|
Folded into #43, one PR for the whole epic; this branch stays for history. |
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.
Part 2 of #32:
ghcr.io/bedrock-python/pg-partsmith.The entrypoint is the command itself, so a Compose service or a CronJob names only what it wants done. It runs as UID 65532, and the venv is built in a stage that is thrown away — pip, the build backend and every
__pycache__with it.Size is treated as a feature. It is checked against a budget on every pull request and a regression fails the build. Measured locally: 244 MB on
python:3.13-slim, budget 280 MB. Alpine would be smaller, and I deliberately did not take it: the test suite runs on glibc, and shipping operators a musl build nothing in CI exercises is not a trade worth ~120 MB.Published from the release workflow with the version off the tag, as the exact version and a moving minor. Never
latest— a scheduled job following it would cross a major on its own, at 02:15, withDROPin its hands. CI refuses to publish an image whose--versiondisagrees with its tag, which is the "one number" promise made mechanical. Trivy scans on both the pull request and the release.On the epic's base-image-rebuild wrinkle: I have not implemented a
-r1scheme yet, since nothing needs it until the first CVE lands. Worth deciding before it does.The operator page states what this container can do to a database — it issues DDL — with the minimum grants for the read-only commands, and the wider ones detach and drop need. It also says plainly that
planexecutes anySqlPredicatein a retention rule: read-only, but your statement, running with these credentials.