Skip to content

Commit

Permalink
fix(server): Fixing nil Trace (#3197)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Oct 2, 2023
1 parent a352ac1 commit 7115ccb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/executor/tracepollerworker/evaluator_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ func (w *tracePollerEvaluatorWorker) ProcessItem(ctx context.Context, job execut
log.Printf("[TracePoller] Test %s Run %d: Done polling. (%s)", job.Test.ID, job.Run.ID, reason)

log.Printf("[TracePoller] Test %s Run %d: Start Sorting", job.Test.ID, job.Run.ID)
if job.Run.Trace == nil {
newTrace := traces.NewTrace(job.Run.TraceID.String(), []traces.Span{})
job.Run.Trace = &newTrace
}

sorted := job.Run.Trace.Sort()
job.Run.Trace = &sorted
log.Printf("[TracePoller] Test %s Run %d: Sorting complete", job.Test.ID, job.Run.ID)
Expand Down

0 comments on commit 7115ccb

Please sign in to comment.