Skip to content

Incrementally copy features near the layer they're installed - #382

Merged
joshspicer merged 6 commits into
devcontainers:mainfrom
trxcllnt:fea/mount-feature-layers
Feb 7, 2023
Merged

joshspicer merged 6 commits into
devcontainers:mainfrom
trxcllnt:fea/mount-feature-layers

Conversation

@trxcllnt

@trxcllnt Paul Taylor (trxcllnt) commented Jan 21, 2023 •

Copy link
Copy Markdown
Contributor

This PR incrementally copies each feature's contents near the layer they're installed, so rebuilds of a devcontainer take full advantage of the build cache.

To illustrate the behavior I built a devcontainer, edited the source of the last feature in the image, then rebuilt it again. With the public devcontainer CLI, the image rebuilds all features even though only the last one changed. With this PR, the second build used the layer cache and started from the layer of the changed feature.

Fixes #291 and #313

@trxcllnt
Paul Taylor (trxcllnt) requested a review from a team as a code owner January 21, 2023 14:33
@trxcllnt

Copy link
Copy Markdown
Contributor Author
@jkeech

Copy link
Copy Markdown
Contributor

Paul Taylor (@trxcllnt) thanks for submitting this PR! This looks like a great improvement. I'd like Christof Marti (@chrmarti) to review, but just wanted to drop a comment saying it's on our radar and we should be getting to this soon. Thanks for your patience! 🙏

@theonlyfoxy

Copy link
Copy Markdown

It seems after changing dockerfile, Features installation is not using cache anymore. does this PR also fix that ?

@joshspicer

Copy link
Copy Markdown
Contributor

Very awesome! Just validated this continues to work as expected when rebased against main.

Validated that changing the contents of the final Feature (in this case a local Feature) preserves all previously cached layers, and the change is picked up 👍

image

@joshspicer
joshspicer merged commit d02379c into devcontainers:main Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants