commit suggestion

This commit is contained in:
Michael Kuhnt 2024-11-22 16:46:39 +01:00
parent 935c9dcd96
commit d6de59619d
2 changed files with 2 additions and 4 deletions

View file

@ -3,7 +3,6 @@ package sql
import (
"context"
"encoding/json"
"fmt"
"log/slog"
"github.com/google/uuid"
@ -247,7 +246,7 @@ func (s *sqlDatabase) CreateOrUpdateJob(ctx context.Context, job params.Job) (pa
workflowJob.InstanceID = &instance.ID
} else {
// This usually is very normal as not all jobs run on our runners.
slog.DebugContext(ctx, fmt.Sprintf("failed to get instance by name: %s", job.RunnerName))
slog.DebugContext(ctx, "failed to get instance by name", "instance_name", job.RunnerName)
}
}

View file

@ -138,8 +138,7 @@ func (r *basePoolManager) HandleWorkflowJob(job params.WorkflowJob) error {
// 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))
slog.WarnContext(r.ctx, "job has no labels", "workflow_job", job.WorkflowJob.Name)
return nil
}