-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 namespace suggestion error on context switch #2315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wjiec Thank you for these updates Jayson!
namespaces are already cached in a lru map.
internal/view/app.go
Outdated
@@ -55,6 +55,7 @@ type App struct { | |||
showHeader bool | |||
showLogo bool | |||
showCrumbs bool | |||
namespaces []string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely not a good idea to cache the namespaces here as the list will change over the course of the session.
0885704
to
88c309e
Compare
If the namespace is already cached in lru map, then we just refetch it every time? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wjiec Thank you for the updates Jayson!!
Yes I think that is fine for the time being.
I do think namespaceNames and contextNames should live in the client package.
There is a similar call client.NamespaceNames available but we should replace with your impl.
We can do thsese in a separate PR.
This PR is used to supplement what was missing in #2285 and fixes a few issues.