-
Notifications
You must be signed in to change notification settings - Fork 45
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
fix directory leak leading to out of disk #161
Conversation
Are you able to sign-off your commits? https://github.com/anchore/stereoscope/blob/main/CONTRIBUTING.md#sign-off-your-work |
@slimdevl I'm not entirely sure why DCO isn't passing, it looks right. Did you use |
I manually added those fields as recommended by the guide. Let me see if I can get the |
Signed-off-by: Joseph Barnett <[email protected]> Signed-off-by: [email protected] <[email protected]>
Signed-off-by: Joseph Barnett <[email protected]> Signed-off-by: [email protected] <[email protected]>
This worked like magic, thanks @kzantow ! |
Signed-off-by: Alex Goodman <[email protected]>
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.
Great find! I think promoting the temp dir generator to the image makes sense. I've pushed a few of adjustments:
- update the comment for the package Cleanup() function to clearly indicate that this is deprecated
- restore the root temp directory generator (to facilitate the package Cleanup function)
- Added both removal of the contentCacheDir and cleanup of the tmp directory generator in the Image object. This way someone constructing their own image object could in theory provider a temp dir generator that did not create the contentCacheDir and everything would still work.
* fix tmpDirGenerator chain of responsibility associated with anchore#132 Signed-off-by: Joseph Barnett <[email protected]> Signed-off-by: [email protected] <[email protected]> * reduce log message to debug Signed-off-by: Joseph Barnett <[email protected]> Signed-off-by: [email protected] <[email protected]> * restore global cleanup function Signed-off-by: Alex Goodman <[email protected]> --------- Signed-off-by: Joseph Barnett <[email protected]> Signed-off-by: [email protected] <[email protected]> Signed-off-by: Alex Goodman <[email protected]> Co-authored-by: Alex Goodman <[email protected]>
Issue 132
Why
When using stereoscope as a library, for long running processes, the relationship between the providers may cause files in temp to not get cleaned up after
image.Image.Cleanup
is called.What
image.Image.Cleanup
to owntmpDirGenerator
and perform cleanup any directories related to the image.How Tested