Add support for imagefs and fix multi-stage cache probing#25
Merged
Conversation
mafredri
commented
Aug 26, 2024
mafredri
commented
Aug 26, 2024
mafredri
commented
Aug 26, 2024
mafredri
commented
Aug 26, 2024
johnstcn
reviewed
Aug 26, 2024
mtojek
reviewed
Aug 26, 2024
| args: args{ | ||
| dockerfile: ` | ||
| FROM scratch as target | ||
| COPY --from=alpine /etc/alpine-release /etc/alpine-release |
Member
There was a problem hiding this comment.
nit: have you tried implementing more tests?
- FROM three different image.
- Copy symlink.
- Overwriting a file FROM first image with the file FROM the second image.
- Image with cycle symlink inside.
Member
Author
There was a problem hiding this comment.
I enabled the disabled TestDoCacheProbe/MultiStage test and added a symlink copy. This tests the basics of cache probe for multi-stage. We'll do more integration testing in envbuilder.
johnstcn
approved these changes
Aug 27, 2024
Co-authored-by: Cian Johnston <cian@coder.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.
This PR adds support for
imagefswhich currently only supports pre-caching requested files. This means that Dockerfile instructions are resolved ahead of time to figure out which files to cache.This allows tar archives to be walked once and since files are hashed as-we-go, the implementation is also memory efficient.
Once envbuilder updates to this fork, tha issue coder/envbuilder#230 will be resolved.