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

Disable cache on feature build when --build-no-cache is passed #790

Merged

Conversation

robjackstewart
Copy link
Contributor

@robjackstewart robjackstewart commented Apr 2, 2024

Changes

Add --no-cache arg to the docker build command that extends the base image with the feature images when --build-no-cache is passed.

Context

The build will always use a cached feature image if it has one. This was making it impossible to replicate a problem in our CI process caused by this issue. Our CI pipeline was failing to install the Azure CLI, but building locally worked fine. The CI pipeline uses GitHub actions, so no cache of the build was available, however, I had cached versions of the image locally and passing the --build-no-cache continued to use the cache. I had to remove all the images via docker images -q "vsc-$MY_IMAGE*" | xargs docker rmi -f order to get a build representative of my CI environment working locally.

Closes #508

@robjackstewart robjackstewart requested a review from a team as a code owner April 2, 2024 11:45
@robjackstewart robjackstewart changed the title Disable cache on feature build when specified Disable cache on feature build when --build-no-cache is passed Apr 2, 2024
Copy link
Member

@samruddhikhandale samruddhikhandale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes make sense to me, left one comment.

src/spec-node/containerFeatures.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Left a comment.

src/spec-node/containerFeatures.ts Outdated Show resolved Hide resolved
@robjackstewart
Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link
Contributor

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@robjackstewart
Copy link
Contributor Author

@chrmarti or @samruddhikhandale, may you please approve the run of the CI pipeline? 😸

@robjackstewart
Copy link
Contributor Author

@chrmarti or @samruddhikhandale, may you please approve the run of the CI pipeline? 😸

The pipeline failed to install dependencies for the windows run. This is unlikely to be related to my changes.

@samruddhikhandale samruddhikhandale merged commit 6710d4c into devcontainers:main Apr 15, 2024
19 checks passed
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.

Switch --no-cache Doesn't Appear to Prevent Cache
3 participants