Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Feb 7, 2023

Conversation

trxcllnt
Copy link
Contributor

@trxcllnt trxcllnt commented Jan 21, 2023

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 trxcllnt requested a review from a team as a code owner January 21, 2023 14:33
@trxcllnt
Copy link
Contributor Author

cc: @chrmarti

@jkeech
Copy link
Contributor

jkeech commented Jan 27, 2023

@trxcllnt thanks for submitting this PR! This looks like a great improvement. I'd like @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

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

@joshspicer
Copy link
Member

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature layers should be fully independent
4 participants