kubernetes-sigs / cli-utils

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

feat: Add inventory.StatusPolicy #563

Closed karlkfi closed 2 years ago

karlkfi commented 2 years ago
karlkfi commented 2 years ago

/hold

Working on adding some tests. Apparently we never had any tests added for the inventory status, so none of them broke when I disabled it.

Liujingfang1 commented 2 years ago

The e2e testcases with StatusPolicyAll looks good. Is there any testcase for StatusPolicyNone?

karlkfi commented 2 years ago

The ConfigMap provider uses StatusPolicyNone and the Custom provider uses StatusPolicyAll.

There's no tests for a custom provider with StatusPolicyAll and no status subresource, but we don't have nay clients doing that atm, so I didn't bother.

I also didn't add any unit tests. I would really like it if we had some for the ClusterClient that tested the various edge cases. But I'm at least relatively confident it works as-is now. Since you added the status update, it would be awesome if you could back fill some unit tests, @Liujingfang1. But they don't need to block this PR.

karlkfi commented 2 years ago

/unhold

Liujingfang1 commented 2 years ago

/lgtm /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