Feat: kusion should correctly handle empty spec in preview #1419
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
kind/feature
Categorizes issue or PR as related to a new feature
What would you like to be added?
Currently, Kusion will throw a nil with logging
No resource change found in this stack...
for an empty spec duringpreview
andapply
.However, passing an empty spec during the
preview
is a possible user path, and the result of the preview should indicate that all resources will be deleted.Related Code:
kusion/pkg/server/manager/stack/execute.go
Lines 201 to 207 in a738404
kusion/pkg/cmd/preview/preview.go
Lines 243 to 249 in a738404
Why is this needed?
It is actually valid to pass an empty spec for a
preview,
andKusion
should handle thepreview
result correctly.This change should not affect how
apply
anddestroy
handle an empty spec.The text was updated successfully, but these errors were encountered: