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

Enlarge cache based on disk size #98

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Jul 26, 2024

Problem

KSP-CKAN/NetKAN#10129 took 1h 50m to validate, because for each of the 19 files it validated, it re-downloaded 3 GiB of mod files.

Cause

If you go through the logs of the various installation test steps in detail, some mods do show up as (cached), but others don't, and different ones are cached in each step. This is consistent with overflowing the limit and having the oldest downloads purged after installation.

The limit is currently 5000 MiB, but the GitHub runners are documented to have a capacity of 14 GiB currently.

Changes

Now we set the limit to the free space plus the current size of the cache minus one gigabyte. This should allow more downloads to accumulate before they get purged, up to closer to the size of the container.

Copy link
Member

@techman83 techman83 left a comment

Choose a reason for hiding this comment

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

This looks like a good approach to me!

@HebaruSan HebaruSan merged commit f4845f7 into KSP-CKAN:master Jul 27, 2024
2 checks passed
@HebaruSan HebaruSan deleted the fix/cache-limit branch July 27, 2024 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants