You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the file ~/.local/share/k9s/clusters/[cluster]/[context]/config.yaml, there is a favorites list of the user's favorite namespaces. On the latest version of k9s (currently v0.32.7), this list is automatically filled with namespaces that the user visits, and it is limited to 9 items. However, in older versions of k9s, this wasn't enforced and the list could grow beyond 9 items. In those older versions, this resulted in bugs that prevented the user from being able to select multiple pods using CTRL + SPACE. The related issue is this one, and this is the pull request. The CTRL + SPACE bug is now resolved by the pull request.
However, there is still an inconsistency present in the code: when installing the latest k9s version, old cluster config files are still loaded as normal, even though they might contain more than 9 namespaces in the favorites section. In v0.32.7, when such a config file is loaded, the CTRL + SPACE bug does not happen, but when the cluster's config file is saved, it still contains more than 9 favorite namespaces. I believe this is inconsistent with k9s' invariants and that the favorite namespaces list should automatically be capped to 9 immediately upon loading the file, as well as when saving it again.
If the maintainers agree that this should be the expected behavior, I would like to claim this issue and resolve it in a pull request myself. The reason why I'm asking is because I need it for a school project, and because I actually use k9s a lot, so being able to contribute to the project is interesting to me, even if it's only a small fix such as this one.
To Reproduce
Connect to a cluster with 10 or more namespaces using an old k9s version (e.g. v0.32.5 or older)
Randomly enter and exit namespaces until more than 9 are accumulated in the config file (unfortunately, I haven't discovered how exactly this happens, but it will happen after some trial and error and it was fixed in the latest version anyway)
Reload k9s (still v0.32.5) and confirm that now CTRL + SPACE doesn't work in pods
Upgrade to latest k9s (v0.32.7, also tested with latest master, commit SHA 6b5d24f5741a1789fb97ba3e11f0ee868d93459d)
Randomly enter and exit namespaces again -> CTRL + SPACE will now work in pods
Checking the cluster config file, you will see that it still contains more than 9 namespaces in the favorites list
Expected behavior
The favorite namespaces list in the cluster config file should be reset to at most 9 namespaces after being opened by the latest k9s version.
Versions (please complete the following information):
OS: [Pop!_OS 22.04 LTS (Linux 6.9.3)]
K9s: [v0.32.7]
K8s: [v1.31.2]
The text was updated successfully, but these errors were encountered:
Describe the bug
In the file
~/.local/share/k9s/clusters/[cluster]/[context]/config.yaml
, there is afavorites
list of the user's favorite namespaces. On the latest version of k9s (currentlyv0.32.7
), this list is automatically filled with namespaces that the user visits, and it is limited to 9 items. However, in older versions of k9s, this wasn't enforced and the list could grow beyond 9 items. In those older versions, this resulted in bugs that prevented the user from being able to select multiple pods usingCTRL + SPACE
. The related issue is this one, and this is the pull request. TheCTRL + SPACE
bug is now resolved by the pull request.However, there is still an inconsistency present in the code: when installing the latest k9s version, old cluster config files are still loaded as normal, even though they might contain more than 9 namespaces in the favorites section. In
v0.32.7
, when such a config file is loaded, theCTRL + SPACE
bug does not happen, but when the cluster's config file is saved, it still contains more than 9 favorite namespaces. I believe this is inconsistent with k9s' invariants and that the favorite namespaces list should automatically be capped to 9 immediately upon loading the file, as well as when saving it again.If the maintainers agree that this should be the expected behavior, I would like to claim this issue and resolve it in a pull request myself. The reason why I'm asking is because I need it for a school project, and because I actually use k9s a lot, so being able to contribute to the project is interesting to me, even if it's only a small fix such as this one.
To Reproduce
v0.32.5
or older)v0.32.5
) and confirm that nowCTRL + SPACE
doesn't work inpods
v0.32.7
, also tested with latest master,commit SHA 6b5d24f5741a1789fb97ba3e11f0ee868d93459d
)CTRL + SPACE
will now work inpods
Expected behavior
The favorite namespaces list in the cluster config file should be reset to at most 9 namespaces after being opened by the latest k9s version.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: