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

Running Job is shown in red, like the failed ones in the Jobs view #2686

Closed
gdubicki opened this issue Apr 30, 2024 · 8 comments
Closed

Running Job is shown in red, like the failed ones in the Jobs view #2686

gdubicki opened this issue Apr 30, 2024 · 8 comments

Comments

@gdubicki
Copy link




Describe the bug

On the Jobs view for a CronJob, the jobs that are failed (the ones on the bottom of the below screenshot) look the same as the running one (on the top on the below screenshot).

This is erroneous in my opinion, as the color red should not be used for non-failed resources.

To Reproduce

Steps to reproduce the behavior:

  1. Have a CronJob with some failed and some successful and a running job
  2. Go to this CronJob and "enter" it to show its list of Jobs

Expected behavior

I expect the running, non-failed Job to be shown in a different color than red - blue or green perhaps?

Screenshots

Screenshot 2024-04-30 at 14 05 43

Versions (please complete the following information):

  • OS: macOS Sonoma 14.4.1 (23E224)
  • K9s: v0.32.4
  • K8s: v1.29.4-gke.1043000
@gdubicki
Copy link
Author

Slightly related to #725?

@KasperHeyndrickx
Copy link
Contributor

Not exactly a regression, but I did some testing and up until v0.31.8 the job would stay green even when it failed.
image

Behavior changed here in internal/render/job.go

After this all pending, running and failing jobs are displayed in red

KasperHeyndrickx added a commit to KasperHeyndrickx/k9s that referenced this issue May 11, 2024
@gdubicki
Copy link
Author

Thanks for the PR #2698, @KasperHeyndrickx!

@KasperHeyndrickx
Copy link
Contributor

Do you know if I should ping someone to get an approval for the github workflow?

@gdubicki
Copy link
Author

Do you know if I should ping someone to get an approval for the github workflow?

I don’t know. I can’t find easy way to see the repo’s maintainers, but here are core members listed: https://github.com/derailed/k9s?tab=readme-ov-file#meet-the-core-team

@gdubicki
Copy link
Author

The PR helped fix my problem. Using the build from it:

Screenshot 2024-05-12 at 11 39 55

@KasperHeyndrickx
Copy link
Contributor

Thanks for confirming!

derailed pushed a commit that referenced this issue May 18, 2024
* fix: job color based on failures (#2686)

* fix: don't show error when job succeeds in next attempt
@gdubicki
Copy link
Author

gdubicki commented Jul 6, 2024

Thanks you very much @KasperHeyndrickx and @derailed!

@gdubicki gdubicki closed this as completed Jul 6, 2024
rm-hull added a commit to rm-hull/k9s that referenced this issue Aug 12, 2024
* 'master' of github.com:derailed/k9s: (169 commits)
  fix: align build image Go version with go.mod (derailed#2812)
  Bump github.com/docker/docker (derailed#2816)
  Bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 (derailed#2813)
  Add comment about Escape keybinding (derailed#2817)
  proper handle OwnerReference for manually created job (derailed#2772)
  [derailed#2773] fix freebsd build failure (derailed#2775)
  install copyright file into correct location (derailed#2780)
  fix status for completed pods in workload view (derailed#2729)
  update deps
  [Maint] Bump grype rev
  K9s/release v0.32.5 (derailed#2740)
  --- (derailed#2707)
  fix view sorting being reset (derailed#2736)
  use policy/v1 instead of policy/v1beta1 (derailed#2732)
  Bump alpine from 3.19.1 to 3.20.0 (derailed#2721)
  fix: jump to namespaceless owner reference (derailed#2718)
  feat: Add plugins for argo-rollouts (derailed#2711)
  Bump golangci/golangci-lint-action from 5.1.0 to 6.0.1 (derailed#2702)
  allow jumping to the owner of the resource (derailed#2700)
  fix: job color based on failures (derailed#2686) (derailed#2698)
  ...
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

2 participants