vmware-tanzu / tanzu-framework

Tanzu Framework provides a set of building blocks to build atop of the Tanzu platform and leverages Carvel packaging and plugins to provide users with a much stronger, more integrated experience than the loose coupling and stand-alone commands of the previous generation of tools.
Apache License 2.0
197 stars 194 forks source link

tanzu cluster delete ; tanzu cluster create should be synchronous, or asynchronous. #596

Open jayunit100 opened 2 years ago

jayunit100 commented 2 years ago

Bug description

Running tanzu cluster delete omg followed by tanzu cluster create -f omg.yaml, where cluster_name=omg for both create/delete, can result in error message that

cluster with name omg already exists, please specify another name

sometimes, i.e. if theres no wait between delete + create.

Affected product area (please put an X in all that apply)

Expected behavior

... tanzu cluster delete doesn't imply that deletion succeeded unless its fully completed...

Steps to reproduce the bug

see bug description

Version (include the SHA if the version is not obvious) main 0.2

heyjcollins commented 2 years ago

The Tanzu CLI apps plugin includes a --wait flag for the tanzu apps workload create/update/apply commands to support use cases where the updated workload needs to be “finished” before a next step is executed.

This may be a good pattern to follow for commands we expect to be used in serialized workflows.