From db8984e9cd52d112509644ce8b8009d3dffa5b38 Mon Sep 17 00:00:00 2001 From: derailed Date: Wed, 27 Mar 2024 07:40:08 -0600 Subject: [PATCH 1/2] [bug] fix #298 with feelings! --- internal/dao/ev.go | 3 +-- internal/issues/assets/codes.yaml | 3 +++ internal/issues/codes_test.go | 2 +- internal/lint/cronjob.go | 4 +--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/dao/ev.go b/internal/dao/ev.go index bdcd279..2cc1167 100644 --- a/internal/dao/ev.go +++ b/internal/dao/ev.go @@ -27,8 +27,7 @@ type EventInfo struct { } func (e EventInfo) IsIssue() bool { - return e.Kind == WarnEvt || - (e.Reason != "Success" && e.Reason != "SawCompletedJob") + return e.Kind == WarnEvt } type EventInfos []EventInfo diff --git a/internal/issues/assets/codes.yaml b/internal/issues/assets/codes.yaml index 33c28d6..80c9729 100644 --- a/internal/issues/assets/codes.yaml +++ b/internal/issues/assets/codes.yaml @@ -347,6 +347,9 @@ codes: 1502: message: CronJob has not run yet or is failing severity: 2 + 1503: + message: "Warning found: %s" + severity: 2 # CiliumIdentity 1600: diff --git a/internal/issues/codes_test.go b/internal/issues/codes_test.go index d0fb89f..393cc48 100644 --- a/internal/issues/codes_test.go +++ b/internal/issues/codes_test.go @@ -15,7 +15,7 @@ func TestCodesLoad(t *testing.T) { cc, err := issues.LoadCodes() assert.Nil(t, err) - assert.Equal(t, 115, len(cc.Glossary)) + assert.Equal(t, 116, len(cc.Glossary)) assert.Equal(t, "No liveness probe", cc.Glossary[103].Message) assert.Equal(t, rules.WarnLevel, cc.Glossary[103].Severity) } diff --git a/internal/lint/cronjob.go b/internal/lint/cronjob.go index 1dbe040..802b57e 100644 --- a/internal/lint/cronjob.go +++ b/internal/lint/cronjob.go @@ -5,7 +5,6 @@ package lint import ( "context" - "errors" "github.com/derailed/popeye/internal" "github.com/derailed/popeye/internal/cache" @@ -107,9 +106,8 @@ func checkEvents(ctx context.Context, ii *issues.Collector, r internal.R, kind, ii.AddErr(ctx, err) return } - for _, e := range ee.Issues() { - ii.AddErr(ctx, errors.New(e)) + ii.AddCode(ctx, 1503, e) } } From fb5ddd782ad51d94151414e36eb3c56da6a617d5 Mon Sep 17 00:00:00 2001 From: derailed Date: Wed, 27 Mar 2024 07:40:20 -0600 Subject: [PATCH 2/2] rel v0.21.3 --- Makefile | 2 +- change_logs/release_v0.21.3.md | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 change_logs/release_v0.21.3.md diff --git a/Makefile b/Makefile index 365be2a..f9d1908 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ NAME := popeye PACKAGE := github.com/derailed/$(NAME) -VERSION := v0.21.2 +VERSION := v0.21.3 GIT := $(shell git rev-parse --short HEAD) DATE := $(shell date +%FT%T%Z) IMG_NAME := derailed/popeye diff --git a/change_logs/release_v0.21.3.md b/change_logs/release_v0.21.3.md new file mode 100644 index 0000000..54196ea --- /dev/null +++ b/change_logs/release_v0.21.3.md @@ -0,0 +1,25 @@ + + +# Release v0.21.3 + +## Notes + +Thank you to all that contributed with flushing out issues and enhancements for Popeye! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make Popeye better is as ever very much noticed and appreciated! + +This project offers a GitHub Sponsor button (over here 👆). As you well know this is not pimped out by big corps with deep pockets. If you feel `Popeye` is saving you cycles diagnosing potential cluster issues please consider sponsoring this project!! It does go a long way in keeping our servers lights on and beers in our fridge. + +Also if you dig this tool, please make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer) + +--- + +## Maintenance Release + +--- + +## Resolved Issues + +. [#298](https://github.com/derailed/popeye/issues/298) Popeye showing errors for Complete cronjobs (with feelings!) + +--- + +  © 2024 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)