Skip to content

Commit d553ddb

Browse files
committed
spanconfig: capture context error in reconciliation job resumer
The retrier can break on a context cancellation which is not propagated out. This change captures those errors and exposes that context error. Epic: none Fixes: #167061 Release note: None
1 parent 001a9ae commit d553ddb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • pkg/spanconfig/spanconfigjob

pkg/spanconfig/spanconfigjob/job.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ func (r *resumer) Resume(ctx context.Context, execCtxI interface{}) (jobErr erro
195195
return nil // we're done here (the stopper was stopped, Reconcile exited cleanly)
196196
}
197197

198-
if lastErr != nil {
199-
return errors.Wrap(lastErr, "reconciliation unsuccessful, failing job")
198+
if err := errors.CombineErrors(lastErr, ctx.Err()); err != nil {
199+
return errors.Wrap(err, "reconciliation unsuccessful, failing job")
200200
}
201201
return errors.Newf("reconciliation unsuccessful, failing job")
202202
}

0 commit comments

Comments
 (0)