Advisor: Update some wording (#105935)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -47,7 +47,7 @@ func TestRun(t *testing.T) {
|
||||
Links: []advisor.CheckErrorLink{
|
||||
{
|
||||
Url: "/plugins/plugin1",
|
||||
Message: "Admin",
|
||||
Message: "View plugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user