diff --git a/apps/advisor/pkg/app/checks/authchecks/check.go b/apps/advisor/pkg/app/checks/authchecks/check.go index e1f9f0c204b..74f6a07e7f6 100644 --- a/apps/advisor/pkg/app/checks/authchecks/check.go +++ b/apps/advisor/pkg/app/checks/authchecks/check.go @@ -30,7 +30,7 @@ func (c *check) ID() string { } func (c *check) Name() string { - return "SSO Setting" + return "SSO setting" } func (c *check) Init(ctx context.Context) error { diff --git a/apps/advisor/pkg/app/checks/datasourcecheck/check.go b/apps/advisor/pkg/app/checks/datasourcecheck/check.go index 1cc2c6e2d9d..e5bdc4c4e2e 100644 --- a/apps/advisor/pkg/app/checks/datasourcecheck/check.go +++ b/apps/advisor/pkg/app/checks/datasourcecheck/check.go @@ -88,7 +88,7 @@ func (c *check) ID() string { } func (c *check) Name() string { - return "Data Source" + return "data source" } func (c *check) Init(ctx context.Context) error { diff --git a/apps/advisor/pkg/app/checks/plugincheck/check.go b/apps/advisor/pkg/app/checks/plugincheck/check.go index 08458df6e50..30264100bd0 100644 --- a/apps/advisor/pkg/app/checks/plugincheck/check.go +++ b/apps/advisor/pkg/app/checks/plugincheck/check.go @@ -46,7 +46,7 @@ func (c *check) ID() string { } func (c *check) Name() string { - return "Plugin" + return "plugin" } func (c *check) Items(ctx context.Context) ([]any, error) { @@ -149,7 +149,7 @@ func (s *deprecationStep) Run(ctx context.Context, log logging.Logger, _ *adviso p.ID, []advisor.CheckErrorLink{ { - Message: "Admin", + Message: "View plugin", Url: fmt.Sprintf("/plugins/%s", p.ID), }, }, diff --git a/apps/advisor/pkg/app/checks/plugincheck/check_test.go b/apps/advisor/pkg/app/checks/plugincheck/check_test.go index 09a566f03ca..ad3feaf43b5 100644 --- a/apps/advisor/pkg/app/checks/plugincheck/check_test.go +++ b/apps/advisor/pkg/app/checks/plugincheck/check_test.go @@ -47,7 +47,7 @@ func TestRun(t *testing.T) { Links: []advisor.CheckErrorLink{ { Url: "/plugins/plugin1", - Message: "Admin", + Message: "View plugin", }, }, }, diff --git a/apps/advisor/pkg/app/checktyperegisterer/checktyperegisterer.go b/apps/advisor/pkg/app/checktyperegisterer/checktyperegisterer.go index f154a7afb51..5979ed2b2b4 100644 --- a/apps/advisor/pkg/app/checktyperegisterer/checktyperegisterer.go +++ b/apps/advisor/pkg/app/checktyperegisterer/checktyperegisterer.go @@ -72,9 +72,12 @@ func (r *Runner) createOrUpdate(ctx context.Context, log logging.Logger, obj res return err } currentAnnotations := current.GetAnnotations() + if currentAnnotations == nil { + currentAnnotations = make(map[string]string) + } annotations := obj.GetAnnotations() - maps.Copy(annotations, currentAnnotations) - obj.SetAnnotations(annotations) + maps.Copy(currentAnnotations, annotations) + obj.SetAnnotations(currentAnnotations) // This will update the annotations in the object _, err = r.client.Update(ctx, id, obj, resource.UpdateOptions{}) if err != nil { // Ignore the error, it's probably due to a race condition