Merge pull request #477 from karlkfi/karl-update-status-fix

fix: Ensure WaitTask gets StatusUpdate
This commit is contained in:
Kubernetes Prow Robot 2021-11-10 09:55:27 -08:00 committed by GitHub
commit a910f40412
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -201,8 +201,6 @@ func (b *baseRunner) run(ctx context.Context, taskQueue chan Task,
}
id := statusEvent.Resource.Identifier
oldStatus := taskContext.ResourceCache().Get(id).Status
newStatus := statusEvent.Resource.Status
// Update the cache to track the latest resource spec & status.
// Status is computed from the resource on-demand.
@ -215,7 +213,7 @@ func (b *baseRunner) run(ctx context.Context, taskQueue chan Task,
// send a status update to the running task, but only if the status
// has changed and the task is tracking the object.
if oldStatus != newStatus && currentTask.Identifiers().Contains(id) {
if currentTask.Identifiers().Contains(id) {
currentTask.StatusUpdate(taskContext, id)
}
// A message on the taskChannel means that the current task