Skip to content

Refresh template bases and rebuild when image digests change - #64

Open
czpython wants to merge 1 commit into
mainfrom
codex/issue-781-template-digests
Open

czpython wants to merge 1 commit into
mainfrom
codex/issue-781-template-digests

Conversation

@czpython

@czpython czpython commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

POST /templates now refreshes the base image before it selects a template. The saved base_image_ref pins the pulled registry digest, so a moved tag creates a new template and the asynchronous build uses that exact image. The pull sends the registry credentials for an image on REGISTRY_HOST. An image that no registry holds is a local build, and its image ID pins it. Docker Sandboxes also receives the refreshed base archive for hosts that use no template, once for each reference. Unused older templates follow the existing janitor policy.

The request and response shapes stay unchanged; the digest is internal to the template record. Pull or store failures return 502; providers without template support return 400. The migration preserves existing template records and adds the resolved reference to the unique key. Deploy this service and run its migrations before the companion installer change at czpython/druks#810 for czpython/druks#781.

Operational limits: pulls and sbx loads complete before the POST response, so the caller timeout must cover them. A database downgrade needs duplicate digest generations removed first because the previous unique key cannot represent them. The exe provider still leaves remote registry cleanup to the registry.

@czpython
czpython force-pushed the codex/issue-781-template-digests branch from c1fbdd6 to bd05e2f Compare October 3, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant