atuinsh / atuin

✨ Magical shell history

Home Page:https://atuin.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Out of disk space makes atuin unusable

tripleo1 opened this issue · comments

What did you expect to happen?

atuin should proceed as usual.

What happened?

atuin is not able to read/write config file, and so bash does not work right.

Atuin doctor output

...

Code of Conduct

  • I agree to follow this project's Code of Conduct

Hmm, I don't think this is something that can be fixed by atuin. If there's no space on the filesystem, there are many other weird side effects that are worse than atuin not working.

You can't run any commands that use the filesystem in write mode. But even some commands that only read the filesystem use a RW filepointer which could result in the said command not working.
Basically the entire OS is stuck at that point.

When there is no space on the filesystem you have to free up space, otherwise atuin not working is the least of your problems. Why would you want to record commands, if you can't issue any commands?

If you cannot issue commands, you cannot record commands.

To clarify - does Atuin stop you from issuing commands at all, or is the problem that Atuin does not function?

The latter would be expected behaviour, as there's not much we can do when your system is out of disk space.

I'm afraid that's pretty out of scope.

Out of space on which disk? What if the user is using some sort of vfs? Or a compressed filesystem?

How much free space is acceptable? Should we only stop when it hits 0?

If Atuin is merely not functioning correctly when out of disk space (erroring, etc), and is not preventing the user from using their shell to fix their system, then I'm pretty happy with the behaviour as-is.

Running out of disk is a pretty severe event that should be avoided for the general functioning of any system.

I'd rather not add a disk space check to every operation we perform.