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

implement cache limit validation #789

Merged

Conversation

hugomontero
Copy link
Contributor

@hugomontero hugomontero commented Jan 30, 2025

Description

Add cache limit to downloads
In case is required a new package download, then:

  • It will notify the user the cache is reached and might need to be cleaned.
  • Ask the user if we can proceed
  • In case the user accepts old files will be removed until the total size is below the cache limit.

How to Test

  • Attempt to download a new package version with downloads directory size greater than 10 GB

outcome:

  • Should be notified to remove some files in download folder.

Related Issues / Discussions

Story details: https://app.shortcut.com/particle/story/133461/allow-caching-downloaded-os-files

Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA
  • Problem and solution clearly stated
  • Tests have been provided
  • Docs have been updated
  • CI is passing

@hugomontero hugomontero marked this pull request as ready for review January 30, 2025 18:08
Copy link
Member

@monkbroc monkbroc left a comment

Choose a reason for hiding this comment

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

Looks good. I suggested some small tweaks

settings.js Outdated Show resolved Hide resolved
src/lib/download-manager.js Outdated Show resolved Hide resolved
src/lib/download-manager.js Outdated Show resolved Hide resolved
src/lib/download-manager.js Outdated Show resolved Hide resolved
src/lib/download-manager.js Show resolved Hide resolved
@hugomontero hugomontero requested a review from monkbroc January 31, 2025 21:54
Copy link
Member

@monkbroc monkbroc left a comment

Choose a reason for hiding this comment

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

Nice cleanups!

src/lib/download-manager.js Outdated Show resolved Hide resolved
@hugomontero hugomontero merged commit f9e469f into master Feb 4, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants