diff --git a/automation/service/trigger.go b/automation/service/trigger.go index d69636f8d1..3cb8e5c83c 100644 --- a/automation/service/trigger.go +++ b/automation/service/trigger.go @@ -436,6 +436,12 @@ func (svc *trigger) registerWorkflows(ctx context.Context, workflows ...*types.W continue } + if len(wf.Issues) > 0 { + // workflow was processed before and issues were detected + // and stored on the workflow; no need to continue + continue + } + if err = svc.registerWorkflow(ctx, wf, tt.FilterByWorkflowID(wf.ID)...); err != nil { return err } @@ -485,7 +491,13 @@ func (svc *trigger) registerWorkflow(ctx context.Context, wf *types.Workflow, tt } if wis := validateWorkflowTriggers(wf, tt...); len(wis) > 0 { - return wis + // skip trigger registration of there is a trigger related issue(s) + // on a specific workflow. + // + // this really happens since we run all validation on save, + // but there might be workflow from the time when these checks were + // not in place + return nil } if wf.RunAs > 0 {