Clean up TempDirForURL directories for --build-context and ADD git#6881
Clean up TempDirForURL directories for --build-context and ADD git#6881Honny1 wants to merge 1 commit into
Conversation
e943e22 to
a61ea1e
Compare
|
PTAL @podman-container-tools/buildah-maintainers CI failure seems to be unrelated. + I cannot rerun CI. |
|
debian jobs are unable to find docker.io deb |
It seems to be a problem. cc @timcoding1988 |
nalind
left a comment
There was a problem hiding this comment.
Question about a test, and a possible call to os.RemoveAll("").
| DownloadedCache string | ||
| // DownloadedTempDir is the os.MkdirTemp root returned by TempDirForURL | ||
| // when a URL-based additional build context is downloaded. | ||
| // Populated only when IsURL and the context has been downloaded. |
There was a problem hiding this comment.
It might be simpler to describe this as a temporary directory that should be (will be) removed when the build context is no longer needed, and that it may be different from DownloadedCache, because the implication that it's only deleted if the additional build context was a URL isn't enforced.
| FROM alpine | ||
| COPY --from=ctx myproject/file.txt /file.txt | ||
| RUN cat /file.txt | ||
| RUN --mount=type=bind,src=myproject,from=ctx2,target=/mnt,z ls /mnt |
There was a problem hiding this comment.
Whether or not this produces any intended output doesn't seem to be checked later.
#6889 this will fix it. you can rebase after my fix merged. |
b676f7e to
d1adc98
Compare
|
PTAL @podman-container-tools/buildah-maintainers @podman-container-tools/buildah-reviewers CI failure seems to be unrelated. |
nalind
left a comment
There was a problem hiding this comment.
One non-blocking nit, otherwise LGTM.
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
|
I have resolved the non-blocking comment. I think we are good to go. @podman-container-tools/buildah-maintainers @podman-container-tools/buildah-reviewers |
URL-based
--build-contextdownloads and ADD git clones left temporary directories under$TMPDIRafter builds. This PR removes them inexecutor.cleanup()and after ADD git handling, and adds bats checks viaassert_no_tempdir_leaks.What type of PR is this?
/kind bug
/kind cleanup
What this PR does / why we need it:
How to verify it
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?