ignore workflow_jobs without labels

This commit is contained in:
Michael Kuhnt 2024-11-22 11:13:00 +01:00
parent c5c74a8dfc
commit 8a31d81faf

View file

@ -135,6 +135,14 @@ func (r *basePoolManager) HandleWorkflowJob(job params.WorkflowJob) error {
return errors.Wrap(err, "validating owner")
}
// we see events where the lables seem to be missing. We should ignore these
// as we can't know if we should handle them or not.
if len(job.WorkflowJob.Labels) == 0 {
slog.WarnContext(
r.ctx, fmt.Sprintf("job has no labels: %s", job.WorkflowJob.Name))
return nil
}
var jobParams params.Job
var err error
var triggeredBy int64