Pin a release's image by digest, and refuse downgrades without --downgrade
After pulling a release, coreapps records its registry digest and runs image:version@sha256:..., so a re-pushed tag can't change an installed app; installing that release again with another digest is refused. An older release than the installed one needs --downgrade (coreapps install/plan, coreapp install), since it may not understand the newer one's data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -305,10 +305,21 @@ Steps:
|
||||
on the Core
|
||||
- [ ] Tokens per host+owner, if a Core needs several accounts on one host
|
||||
- [ ] Superpanel would manage these tokens
|
||||
- [ ] Downgrades: installing an older tag is allowed (`@v1.0.0`); an app's
|
||||
data may not survive that. Refuse, or warn?
|
||||
- [ ] Pin the image digest at install (from the registry at that moment)
|
||||
so a re-pushed tag can't change what's installed
|
||||
- Done 2026-12-03: downgrades and digests. Installing an older release
|
||||
than the installed one is refused unless `--downgrade` (coreapps
|
||||
install/plan, coreapp install; the plan says what it goes back from);
|
||||
a failed start still rolls back. After pulling a release, coreapps
|
||||
records its registry digest in the marker and `.env`
|
||||
(`IMAGE_DIGEST=@sha256:...`, written by coreapps, not `templatize`,
|
||||
which reads any `@...@` on a line as a variable), and the compose
|
||||
file runs `image:${IMAGE_VERSION}${IMAGE_DIGEST:-}`, so a re-pushed
|
||||
tag can't change an installed app, even on a recreate; installing the
|
||||
same release again with another digest is refused and the tag is put
|
||||
back on the installed image. Folder deploys have it empty. Tested on
|
||||
dev.fedcom.net with a registry on the Core and a `file://` repository
|
||||
(install, refusal, `--downgrade`, upgrade, re-pushed tag refused,
|
||||
recreate), with pub-test from gitea.federated.computer (pinned), and
|
||||
hello (empty)
|
||||
4. Email (2026-12-03): `needs = ["email"]` (`coreapp new --email`) gives
|
||||
the app its own mail account for sending: an LDAP entry
|
||||
`uid=coreapp-<name>,ou=people` with `objectClass: account`,
|
||||
|
||||
Reference in New Issue
Block a user