1
0
mirror of synced 2026-03-17 00:26:57 +00:00

Merge pull request #4296 from Skarlso/fix-apply-timeout-on-empty-set

fix: only wait for changeset if the result is not empty
This commit is contained in:
Hidde Beydals
2023-10-12 14:12:01 +02:00
committed by GitHub

View File

@@ -76,9 +76,11 @@ func Apply(ctx context.Context, rcg genericclioptions.RESTClientGetter, opts *ru
changeSet.Append(cs.Entries) changeSet.Append(cs.Entries)
} }
if len(changeSet.Entries) > 0 {
if err := waitForSet(rcg, opts, changeSet); err != nil { if err := waitForSet(rcg, opts, changeSet); err != nil {
return "", err return "", err
} }
}
if len(stageTwo) > 0 { if len(stageTwo) > 0 {
cs, err := applySet(ctx, rcg, opts, stageTwo) cs, err := applySet(ctx, rcg, opts, stageTwo)