feat: add free disk space startup check #351

Open
cravl-dev wants to merge 3 commits from cravl-dev/fix-331 into master
cravl-dev commented 2023-06-08 18:04:17 +02:00 (Migrated from github.com)

Closes #331 by adding a startup check for at least 5GB of free space in ${HOME}.

Closes #331 by adding a startup check for at least 5GB of free space in ${HOME}.
dw-0 commented 2023-06-24 20:25:16 +02:00 (Migrated from github.com)

I like the idea and it seems like a rather easy approach and solution to the issue.
Though im not sure if we should do this check everytime after starting KIAUH.
Imagine user has everthing installed and just want to update a component. He would then be shown the message and the script exits, leaving the user unable to do anything. Even uninstalling something to free space up would be impossible.

I think the check should be done somewhere later. Maybe in the install and update menu itself? we could check if any component is already installed, and if its a completely clean system that has no klipper, moonraker etc installed, we could assume the dependencies are also missing and show the warning in red. i would still allow the user to proceed i think. he has been warned, right?
a second case would be to check if anything is installed at all, and if it is but the available disk space is below 5gb, we could print the message in yellow for signaling something like "hey you're likely running out of disk space soon". but let the user proceed here as well.
last but not least: is $HOME really the correct directory to check? don't system packages go onto another partition usually? i don't know that from the top of my head right now.

I like the idea and it seems like a rather easy approach and solution to the issue. Though im not sure if we should do this check everytime after starting KIAUH. Imagine user has everthing installed and just want to update a component. He would then be shown the message and the script exits, leaving the user unable to do anything. Even uninstalling something to free space up would be impossible. I think the check should be done somewhere later. Maybe in the install and update menu itself? we could check if any component is already installed, and if its a completely clean system that has no klipper, moonraker etc installed, we could assume the dependencies are also missing and show the warning in red. i would still allow the user to proceed i think. he has been warned, right? a second case would be to check if anything is installed at all, and if it is but the available disk space is below 5gb, we could print the message in yellow for signaling something like "hey you're likely running out of disk space soon". but let the user proceed here as well. last but not least: is $HOME really the correct directory to check? don't system packages go onto another partition usually? i don't know that from the top of my head right now.
cravl-dev commented 2023-06-29 00:28:35 +02:00 (Migrated from github.com)

I'm converting this to a draft while I mess with it some more, I have a couple test cases that still aren't working right and I want to refactor a bit to simplify things.

I'm converting this to a draft while I mess with it some more, I have a couple test cases that still aren't working right and I want to refactor a bit to simplify things.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin cravl-dev/fix-331:cravl-dev/fix-331
git checkout cravl-dev/fix-331
Sign in to join this conversation.