Image: no workflow starts the image before publishing it, and the start check depends on GeoNames answering #1143
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#1143
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What exists today
.forgejo/workflows/dev-image.yml:134-162builds, scans withscripts/scan-image.sh, then builds both platforms and pushes;image.yml(build, scan,release_tools.py check, push,verify-image) is the same shape. Neither ever runs a container. The gates are CI on the commit, the scan and, for a release, that the registry serves the digest. Ragnar follows:dev, so the first start of a new dev image happens there.scripts/check-image.shalready does the boot test: it reads the compose files (:37-40), builds (:46), starts the image with a published port and waits 60 s for/healthz(:50-73), then starts it as a deployment does and waits up to 180 s for Docker's own health check (:82-109).image.yml:5andCONTRIBUTING.md:797describe it as something run by hand where a daemon exists; thedockerrunner that both image workflows use is exactly such a place. The script builds its own image, so a workflow would need it to accept an existing tag (it takesTAGas$1but always builds).The GeoNames part of the candidate holds:
docker/entrypoint.sh:31-36runspython manage.py fetch_geonamesbeforeexec gunicornwhenevergeonames-cities1000.txtis missing from the volume, which on a fresh container it always is.check-image.shsets neitherPOSTULO_SKIP_GEONAMES=1nor a volume, so each of its two containers downloads and imports the city table before it answers. That puts download.geonames.org inside the check and eats into the first container's 60 s budget; a slow mirror fails the check for a reason that has nothing to do with the image.What would change
check-image.sh: pass-e POSTULO_SKIP_GEONAMES=1to bothdocker runcalls, and take an option (for exampleCHECK_IMAGE_BUILD=0or a--no-buildflag) to check a tag that is already built.dev-image.ymlandimage.yml: a step after the scan, "Start it and wait for it to be healthy", runningscripts/check-image.sh --no-build postulo:dev-scan(orpostulo:scan), before the multi-platform push. It checks the amd64 image only; the arm64 build is the same Dockerfile, so this catches what the candidate is about. With I1 (one builder, #1033 item 5) the checked image is also the published amd64 one.tests/test_image_build.pyasserts that the step exists and sits before the push.What it saves or protects
medium (reliability): an image that builds and scans clean but cannot start (an entrypoint, a settings check, a migration on an empty volume) is stopped before
:devor a release tag moves, for about a minute of the docker runnerAccessibility
none
Decisions
:devand is otherwise where a start-up failure is first seen (#580, an unhealthy container behind a 400 on its own health check, is the kindcheck-image.shwas extended to catch).Found by the efficiency and reliability audit of 2026-10-30 (finding I8; index postulo/postulo#1108). Checked against
mainatdaee30b15(2026-10-30).