crossplane-contrib / crossplane-contrib/provider-sql
ProviderConfig gets deleted while PCUs are still terminating
- Dominant language
- Go
- Stars
- 154
- Forks
- 119
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 8
Description
### What happened?
On an e2e test, I deleted a set of `postgresql.sql.m` resources (allegedly any other flavor applies too), together with its `providerconfig.postgresql.sql.m`.
The `in-use.crossplane.io` finalizer is set whenever the `.status.users` of that provider config (which counts the number of `providerconfigusages.postgresql.sql.` resources) is >0 **should** prevent the provider config from being deleted.
However, we're setting it to 0 even when some resources are still on `Deleting` state. The sequence I see is:
- All resources in terminating state.
- PCU goes down to 0 at some point, even though some resources are `Deleting`.
- ProviderConfig gets deleted (0 users).
- Next reconcile loop: PCU gets recreated (resources are still there) but ProviderConfig is **gone**.
### How can we reproduce it?
Create a composition which bundles some resources + its providerConfig, and do a foreground delete of it.
### What environment did it happen in?
Crossplane version: v2.3
Provider version: v0.15, v0.16beta
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.