From 8a31d81fafafca06ff4c32261cb4f336c24b6529 Mon Sep 17 00:00:00 2001 From: Michael Kuhnt Date: Fri, 22 Nov 2024 11:13:00 +0100 Subject: [PATCH] ignore workflow_jobs without labels --- runner/pool/pool.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/runner/pool/pool.go b/runner/pool/pool.go index 09383e34..83f9c172 100644 --- a/runner/pool/pool.go +++ b/runner/pool/pool.go @@ -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