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

Remove invalid zip files in NetKAN #3156

Merged

Conversation

DasSkelett
Copy link
Member

Problem

Invalid zip files that fail the ZipValid check fill up the bot's disk over time. The tempfiles but never get removed or moved into the cache, thus filling the disk with every indexer run.
In contrast, files failing to download at all get removed immediately, and files failing inflation later on are still stay in the cache and don't get redownloaded for the next try.

Changes

Simply remove the file if it fails the ZipValid check.

This has a downside when using netkan manually, if one would want to investigate the zip file after netkan fails (I remember my comment...). Now you have to download the file manually again to check it out.
I tried to think of an easy solution, like keeping the file if --debug is set, but as of right now we don't save that anywhere globally accessible in netkan.
I think it's worth it though, and not every mod is as big as HumanStuff, so redownloading the file manually isn't much of a deal usually.

@DasSkelett DasSkelett added Bug Something is not working as intended Pull request Netkan Issues affecting the netkan data labels Sep 23, 2020
Copy link
Member

@HebaruSan HebaruSan left a comment

Choose a reason for hiding this comment

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

Here's hoping that restarting the container will also purge the temp folder.

@DasSkelett DasSkelett merged commit 0195a05 into KSP-CKAN:master Sep 23, 2020
@DasSkelett DasSkelett deleted the fix/netkan-remove-invalid-zips branch September 23, 2020 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Netkan Issues affecting the netkan data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants