Advisor: Allow to retry checks for a single element (#104279)

This commit is contained in:
Andres Martinez Gotor
2025-04-24 12:00:32 +02:00
committed by GitHub
parent 10df5d6f23
commit edeff68645
16 changed files with 255 additions and 13 deletions
@@ -61,6 +61,14 @@ func (c *check) Items(ctx context.Context) ([]any, error) {
return res, nil
}
func (c *check) Item(ctx context.Context, id string) (any, error) {
p, exists := c.PluginStore.Plugin(ctx, id)
if !exists {
return nil, fmt.Errorf("plugin %s not found", id)
}
return p, nil
}
func (c *check) Steps() []checks.Step {
return []checks.Step{
&deprecationStep{
@@ -118,6 +126,7 @@ func (s *deprecationStep) Run(ctx context.Context, _ *advisor.CheckSpec, it any)
return checks.NewCheckReportFailure(
advisor.CheckReportFailureSeverityHigh,
s.ID(),
p.Name,
p.ID,
[]advisor.CheckErrorLink{
{
@@ -190,6 +199,7 @@ func (s *updateStep) Run(ctx context.Context, _ *advisor.CheckSpec, i any) (*adv
return checks.NewCheckReportFailure(
advisor.CheckReportFailureSeverityLow,
s.ID(),
p.Name,
p.ID,
[]advisor.CheckErrorLink{
{