diff --git a/database/sql/jobs.go b/database/sql/jobs.go index d819d4c3..b7dda926 100644 --- a/database/sql/jobs.go +++ b/database/sql/jobs.go @@ -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) } } diff --git a/runner/pool/pool.go b/runner/pool/pool.go index 83f9c172..8eca237a 100644 --- a/runner/pool/pool.go +++ b/runner/pool/pool.go @@ -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 }