feat(cache): pin the build-environment image in the escrow manifest#106
Merged
Conversation
An escrow archive restores data, but a rebuild years later also needs a runnable environment (emb, the Flutter SDK, a period host). Let the archive reference the container image that reconstructs it. - `emb cache export --image <ref>` records the build-environment image (from `emb cross --dockerfile`) in the manifest, warning when the ref is a mutable tag rather than a digest. - `emb cache import` reports the pinned image so the operator knows which environment to pull. Adds `isImageDigestPinned` and an `env_image` manifest field; README and tests updated. Signed-off-by: Joel Winarske <joel.winarske@linux.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.
Extends the escrow archive (#102) so it references the environment, not just the data. An archive restores bytes, but a rebuild years on also needs a runnable environment — emb, the Flutter SDK, a period-appropriate host. This lets the archive pin the container image that reconstructs it.
What
emb cache export --image <ref>records the build-environment image (the oneemb cross --dockerfileemits, baking emb + toolchain + sysroot) into the archive manifest asenv_image. It warns when<ref>is a mutable tag rather than a digest, since only a digest is a durable escrow anchor.emb cache importreports the pinned image so the operator knows which environment to pull before restoring the data.Structure
cache_archive.dart:archiveManifestgains an optionalenvImage; new pureisImageDigestPinned(ref)(matches…@sha256:<hex>).Test
dart analyze lib testclean;dart format --set-exit-if-changedclean.cache_archive_test.dartcovers theenv_imagefield (present/absent) andisImageDigestPinned(digest vs tag).real dpkg-deb/real debugfsenv failures.Docs
README
emb cachetable (export --image,importreporting) and the escrow paragraph explain data-vs-environment and cross-linkemb cross --dockerfile.