kubernetes-sigs / cli-utils

This repo contains binaries that built from libraries in cli-runtime.
Apache License 2.0
154 stars 77 forks source link

fix: Allow empty set of apply objects #560

Closed karlkfi closed 2 years ago

karlkfi commented 2 years ago

Fixes https://github.com/GoogleContainerTools/kpt/issues/2857

Liujingfang1 commented 2 years ago

and destroyed when the apply object set is empty.

Is this destroy operation only for destroyer being called explicitly? In other words, the inventory object is not destroyed even the object set is empty after after a replace?

karlkfi commented 2 years ago

and destroyed when the apply object set is empty.

Is this destroy operation only for destroyer being called explicitly? In other words, the inventory object is not destroyed even the object set is empty after after a replace?

The Applier never deletes the inventory. Only the Destroyer deletes the inventory.

The new test (like most of the others) calls the applier, validates the result, and then calls the destroyer, and validates the result.

The only behavioral change here is that the InvAddtask now (again) executes on every Applier run.

Liujingfang1 commented 2 years ago

/lgtm

Liujingfang1 commented 2 years ago

/approve

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: karlkfi, Liujingfang1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/cli-utils/blob/master/OWNERS)~~ [Liujingfang1] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment