Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Mark-Range command: ensure that NS Favorite doesn't exceed the limit #2881

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

rtim75
Copy link
Contributor

@rtim75 rtim75 commented Sep 14, 2024

Fixes #1191

While the root cause of the issue, where the number of favorites exceeds the limit, is still unknown, I believe this is a nice check to have, when validating namespaces. And as pointed out in the #1191, it fixes the issue with mark-range not working and instead showing in the tooltip the namespace that exceeds the limit.

  • Increased the MaxFavoritesNS to cover all 0-9 numbers.
  • Tests are updated

Manually validated that configs are updating properly and the number of favorites doesn't exceed the limit.

Tested on MacOs.

> make test
?       github.com/derailed/k9s [no test files]
?       github.com/derailed/k9s/internal/config/mock    [no test files]
ok      github.com/derailed/k9s/cmd     3.981s
ok      github.com/derailed/k9s/internal        0.618s
ok      github.com/derailed/k9s/internal/client 1.895s
ok      github.com/derailed/k9s/internal/color  4.033s
ok      github.com/derailed/k9s/internal/config 1.241s
ok      github.com/derailed/k9s/internal/config/data    2.608s
ok      github.com/derailed/k9s/internal/config/json    4.345s
?       github.com/derailed/k9s/internal/perf   [no test files]
ok      github.com/derailed/k9s/internal/dao    1.324s
ok      github.com/derailed/k9s/internal/health 0.259s
?       github.com/derailed/k9s/internal/render/helm    [no test files]
ok      github.com/derailed/k9s/internal/model  4.526s
ok      github.com/derailed/k9s/internal/model1 1.220s
ok      github.com/derailed/k9s/internal/port   0.687s
ok      github.com/derailed/k9s/internal/render 2.912s
ok      github.com/derailed/k9s/internal/tchart 1.612s
ok      github.com/derailed/k9s/internal/ui     1.385s
ok      github.com/derailed/k9s/internal/ui/dialog      3.250s
ok      github.com/derailed/k9s/internal/view   2.166s
ok      github.com/derailed/k9s/internal/view/cmd       0.608s
ok      github.com/derailed/k9s/internal/vul    3.068s
ok      github.com/derailed/k9s/internal/watch  4.615s
ok      github.com/derailed/k9s/internal/xray   4.032s

Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rtim75 Good catch! Thank you for this update!

@derailed derailed merged commit 4a9f4c3 into derailed:master Sep 14, 2024
2 of 3 checks passed
thorbenbelow pushed a commit to thorbenbelow/k9s that referenced this pull request Nov 10, 2024
…mit (derailed#2881)

* ensure that number of favorite namespace is never exceeds hard limit

* remove newlines from files
@derailed derailed mentioned this pull request Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mark-Range bug
2 participants