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

Built-in shortcuts being overriden by plugins result in excessive logging #2605

Closed
savoie opened this issue Mar 7, 2024 · 0 comments
Closed

Comments

@savoie
Copy link

savoie commented Mar 7, 2024




Describe the bug
Using the override: true setting on a plugin spams frequent INFO-level logs:

log.Info().Msgf("Action %q has been overridden by plugin in %q", plugin.ShortCut, k)

To Reproduce
Steps to reproduce the behavior:

  1. Define a plugin with override: true that overrides a built-in shortcut.
  2. Open any one of the scopes in which the plugin overrides the built-in shortcut.
  3. View logs spamming info log lines every few seconds.

Historical Documents
I have a plugin definition that overrides the built-in "kill":

  nuke-pod:
    shortCut: Ctrl-K
    override: true
    scopes:
      - pods

My k9s logs are completely filled with

12:25PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:25PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:25PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:25PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"
12:26PM INF Action "Ctrl-K" has been overridden by plugin in "nuke-pod"

Expected behavior
This should more appropriately be a debug log line, and ideally would have reduced frequency (perhaps would only be logged on a change from the previous actions definitions, like a scope change or a change from the previous loaded plugin config file).

Versions (please complete the following information):

  • OS: MacOS Ventura 13.4.1
  • K9s: v0.32.3
  • K8s: v1.27.9
derailed added a commit that referenced this issue Mar 20, 2024
derailed added a commit that referenced this issue Mar 20, 2024
* [Bug] fix #2605

* [Bug] fix #2604

* [Bug] fix #2592

* [Bug] fix #2608

* [Bug] Fix #2612

* Rel v0.32.4
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

No branches or pull requests

1 participant