k9s
k9s copied to clipboard
Ctrl-C SIGINT makes k9s to lose state, recently used namespaces
Describe the bug Conversation started in https://github.com/derailed/k9s/issues/2560 Ctrl-C SIGINT makes k9s to lose state, recently used namespaces.
To Reproduce
- open k9s
- navigate to different namespaces, using different methods (e.g.
:ns
or:po ns
), to build "recently used namespaces list"/favorites. - exit k9s with ctrl-c
- reopen k9s
- observe "recently used namespaces" list is reset - contains only
all, default
namespaces
Repeat above steps, except on step 3 use :q
instead of ctrl-c. In that case, the recently used ns list
is preserved between restarts.
Expected behavior
Personally, I did not even know/remember about :q
and for years used ctrl-c to exit k9s.
I hope this is a fixable Signal interception/processing bug in k9s 🙏
Versions (please complete the following information):
- OS: macos 14.3.1 (same on macos 12)
- K9s: 0.32.0
Hate this, I just upgraded and I used to use CTRL+C to exit out and it always worked, but the latest upgrade keeps clearing everything after I ctrl+c out of it, ugh
Wow, so this is why k9s has been intolerable to use over the past while. I'm honestly not sure it ever would have occurred to me that ^C was the reason for k9s not remembering the last view between restarts, but yep, confirmed.
oh wow!!! hard affected by this!!!
Yikes! I am baffled by folks expecting a savage SIGINT to entail a gracious
exit??
The recommended
k9s gracious exit is :q
. There is lots of house keeping that k9s performs when exiting.
That said, I am responsible for having changed how the configuration are persisted and can sympathies with the mental wiring but in true unix philosophy when a process is brutally interrupted, regarding the OS all bets should be off.
Given the disruption, we will persist the configs on this particular signal, but I am not super keen on enforcing this behavior.
I use ctrl+c for top, pg_top, etc. I didn't even know there was a gracious exit command.
@derailed I'm not sure what you are talking about. I believe you have tons of experience (hence your opinions, and attempts to explain smthing) in IT as well as other guys here and I do. One of the examples, for last few years, all go/rust projects I've been working with (web, grpc, ... some svc) were always implementing signal handling. Before go/rust hypecrap, it always existed in many apps. And of course there were app which were not implementing it too. (if it was a "web" service, they are usually wrapped with something similar to tini).
I'm not sure which other app exits with :q
without any other options except VIM-for-noobs ...(but even it has ZZ and ZQ shortcuts)
Ok can we please have shift+z+z
????? :q
is annoying to type...
jesus..........
SIGKILL is savage, SIGINT is just expedient. :)
Generally speaking I expect console apps to handle SIGINT gracefully and quickly -- flush buffers, release locks, clean up tmp files, etc. -- and not leave a trail of debris in their wake. I truly don't consider ^C to be brutal at all.