Skip to content

ProviderConfig gets deleted while PCUs are still terminating #398

Description

@fernandezcuesta

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

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions