Skip to content

Fix provider inheritence#22101

Merged
iwahbe merged 8 commits intomasterfrom
fraser/fixdefault
Mar 5, 2026
Merged

Fix provider inheritence#22101
iwahbe merged 8 commits intomasterfrom
fraser/fixdefault

Conversation

@Frassle
Copy link
Copy Markdown
Member

@Frassle Frassle commented Mar 5, 2026

Fixes #22096

In #21999 we changed the engine to handle the inheritance of providers, rather than having SDKs needing to do it. This was to help bringing online two new language runtimes.

Unfortunately we got the logic wrong when dealing with default providers. The language SDKs never see default providers so would never inherit them, but the engine does see them and so would flow them down the parent chain. This is fine for resources in the same package but breaks if you have a resource from say packageA as a parent and a resource from packageB as it's child.

Previously that would work as long as the resource from packageA didn't set an explicit provider as the language runtime would see "provider" as empty and so the resource from packageB would send an empty provider ref and both would get filled in by the engine with the default providers.
But when doing this inheritance engine side the engine always sees the provider value set, either the explicit value set by the program, or the default set by the engine. So we started flowing default providers down the parent chain.

The logic was also wrong for providers from different packages. Again the language SDKs check the provider package and only send it if it matches.

We can fix both of these problems by just fixing the latter one. That is don't inherit the provider if its for the wrong package.

@Frassle Frassle marked this pull request as ready for review March 5, 2026 13:49
@Frassle Frassle requested a review from a team as a code owner March 5, 2026 13:49
Comment thread pkg/resource/deploy/source_eval.go Outdated
@Frassle Frassle enabled auto-merge March 5, 2026 14:07
Copy link
Copy Markdown
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nasty corner case

@Frassle Frassle changed the title Fix default provider inheritence Fix provider inheritence Mar 5, 2026
@Frassle Frassle added this pull request to the merge queue Mar 5, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 5, 2026
@iwahbe iwahbe added this pull request to the merge queue Mar 5, 2026
Merged via the queue into master with commit 511dda3 Mar 5, 2026
208 of 213 checks passed
@iwahbe iwahbe deleted the fraser/fixdefault branch March 5, 2026 18:25
@pulumi-bot
Copy link
Copy Markdown
Contributor

This PR has been shipped in release v3.225.1.

1 similar comment
@pulumi-bot
Copy link
Copy Markdown
Contributor

This PR has been shipped in release v3.225.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v3.225.0 regression: resource types not found in provider schemas

4 participants