Skip to content

Commit

Permalink
Merge pull request #729 from tonistiigi/session-context
Browse files Browse the repository at this point in the history
llbsolver: keep session for context calls
  • Loading branch information
AkihiroSuda authored Nov 20, 2018
2 parents ef00d30 + f6a8961 commit f2f4b53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions solver/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ func (sb *subBuilder) Build(ctx context.Context, e Edge) (CachedResult, error) {
}

func (sb *subBuilder) Context(ctx context.Context) context.Context {
ctx = session.NewContext(ctx, sb.state.getSessionID())
return opentracing.ContextWithSpan(progress.WithProgress(ctx, sb.mpw), sb.mspan)
}

Expand Down Expand Up @@ -475,6 +476,7 @@ func (j *Job) Discard() error {
}

func (j *Job) Context(ctx context.Context) context.Context {
ctx = session.NewContext(ctx, j.SessionID)
return progress.WithProgress(ctx, j.pw)
}

Expand Down

0 comments on commit f2f4b53

Please sign in to comment.