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(coloring): invalid color application for rows with VALID column #3137

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aaronschweig
Copy link

@aaronschweig aaronschweig commented Feb 18, 2025

During usage of k9s we saw one specific CRD of ours always show up in an error color despite it being fully ready an healthy
Screenshot 2025-02-18 at 19 56 00

After some investigation I found, that the error color is applied by the default ColoringFunc in case the resource is deemed not valid. After finding the code for this, I figured that the logic in case a "VALID" column seems to be incorrect, as it deems the resource invalid if its something else than an empty string.

I tried fixing it in this PR and also added some tests to this previously untested helper function

With the adjusted logic, the rendering seems to be correct!

Screenshot 2025-02-18 at 20 07 09

Signed-off-by: aaronschweig <aaron.schweig@gmail.com>
Signed-off-by: aaronschweig <aaron.schweig@gmail.com>
Signed-off-by: aaronschweig <aaron.schweig@gmail.com>
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.

1 participant