-
Notifications
You must be signed in to change notification settings - Fork 2k
Clean cache after smoke test #2207
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
Clean cache after smoke test #2207
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (3)
- Dockerfile-alpine.template: Language not supported
- Dockerfile-debian.template: Language not supported
- Dockerfile-slim.template: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the cleanup was only for yarn? I tested node --version
& npm --version
locally, and also inserted one additional line into the Dockerfile to build the image as below:
&& echo "run \`ls -al /tmp/\`" 1>&2 && ls -al /tmp/ 1>&2 && echo 1>&2 \
None of the results look like we need this cleanup for node and npm smoke tests,
I am not sure which one generated the cache, but it does exist in /tmp after smoke test in layer. This is also reported in #2199. The patch removed /tmp/* , and cache files disappear. |
@KobayashiAzusa you are right, I verified your thought, and I somehow inserted the test command at the wrong place, this is a good catch, thanks! |
Fun fact: there's no such issue with v18, v20, or even v21, but v22 and v23. That's why I couldn't reproduce the issue the first time. #2199 was very helpful in helping me notice that difference! |
This won't hurt those versions that are not affected anyway. |
Description
Remove /tmp/node-compile-cache after smoke tests
Motivation and Context
The Node.js image, during the build process in the RUN layer, executed Node.js and generated the /tmp/node-compile-cache directory without deleting it. According to subsequent build steps, this directory was deleted in the next RUN, therefore it doesn't exist in the final image (though it's only marked as deleted in the current RUN layer - the original files still reside in the historical layers).
Testing Details
Example Output(if appropriate)
Types of changes
Checklist