pulumi / pulumi-kubernetes

A Pulumi resource provider for Kubernetes to manage API resources and workloads in running clusters
https://www.pulumi.com/docs/reference/clouds/kubernetes/
Apache License 2.0
396 stars 113 forks source link

Fix CRD cache for fake clients #2988

Closed blampe closed 1 month ago

blampe commented 2 months ago

The fake DynamicClientSet will currently panic in situations that require the CRD cache because we weren't initializing a cache in the fake's constructor.

The cache already works well as a zero value, and we don't currently need any alternative implementations, so we can remove the exported interface in favor of the concrete struct.

This fixes the fake client because we now no longer need to initialize a cache -- every DynamicClientSet comes with a usable zero-value CRDCache{}.

github-actions[bot] commented 2 months ago

Does the PR have any schema changes?

Looking good! No breaking changes found. No new resources/functions.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 29.09%. Comparing base (13c87c6) to head (513e9cc).

Files Patch % Lines
provider/pkg/clients/cache.go 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2988 +/- ## ======================================= Coverage 29.08% 29.09% ======================================= Files 63 63 Lines 8347 8345 -2 ======================================= Hits 2428 2428 + Misses 5710 5708 -2 Partials 209 209 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.