canonical / craft-providers

Python interfaces for instantiating and executing builds for a variety of target environments.
https://canonical-craft-providers.readthedocs-hosted.com/en/latest/
GNU Lesser General Public License v3.0
6 stars 22 forks source link

check the storage space before trying to spin container #657

Open dariuszd21 opened 1 month ago

dariuszd21 commented 1 month ago

What needs to get done

Check if there is sufficient storage space (e.g. in percentage) before creating the container, so it will not weirdly error out during the build.

Why it needs to get done

Currently we just run the container and it may fail in the random moment if the whole storage space is occupied or almost occupied. We should at least warn the user to clear out some space before build

lengau commented 1 month ago

I'm not sure how we could feasibly do this or whether it's craft-providers's problem. Maybe craft-application should warn if the user has, say, <2 gigs remaining in the relevant place?