Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #239 from muvaf/async-cond-set
Browse files Browse the repository at this point in the history
controller: set async finished condition only if the resource is async
  • Loading branch information
muvaf authored Feb 22, 2022
2 parents 461bf2a + ca43613 commit c93fdfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controller/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ func (e *external) Observe(ctx context.Context, mg xpresource.Managed) (managed.
// There might be a case where async operation is finished and the status
// update marking it as finished didn't go through. At this point, we are
// sure that there is no ongoing operation.
tr.SetConditions(resource.AsyncOperationFinishedCondition())
if e.config.UseAsync {
tr.SetConditions(resource.AsyncOperationFinishedCondition())
}

// No operation was in progress, our observation completed successfully, and
// we have an observation to consume.
Expand Down

0 comments on commit c93fdfd

Please sign in to comment.