Advisor: Update some wording (#105935)

This commit is contained in:
Andres Martinez Gotor 2025-05-23 16:38:50 +02:00 committed by GitHub
parent 0cb6f9584b
commit 109dc4dc56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 7 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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),
},
},

View File

@ -47,7 +47,7 @@ func TestRun(t *testing.T) {
Links: []advisor.CheckErrorLink{
{
Url: "/plugins/plugin1",
Message: "Admin",
Message: "View plugin",
},
},
},

View File

@ -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