Skip to content

Commit

Permalink
fix: modify the wait condition according to return values from earlie…
Browse files Browse the repository at this point in the history
…r method call (zarf-dev#3020)

Signed-off-by: Maciej Szulik <[email protected]>
Signed-off-by: ittacco <[email protected]>
  • Loading branch information
soltysh authored and ittacco committed Oct 18, 2024
1 parent 68dce61 commit 1173a46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pkg/cluster/zarf.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ func (c *Cluster) RecordPackageDeploymentAndWait(ctx context.Context, pkg v1alph
return nil, err
}
packageNeedsWait, _, _ = c.PackageSecretNeedsWait(deployedPackage, component, skipWebhooks)
if !packageNeedsWait {
return deployedPackage, nil
if packageNeedsWait {
return nil, errors.New("wait on running webhook")
}
return deployedPackage, nil
}, retry.Context(waitCtx), retry.Attempts(0), retry.DelayType(retry.FixedDelay), retry.Delay(time.Second))
Expand Down

0 comments on commit 1173a46

Please sign in to comment.