mirror of https://github.com/pulumi/pulumi.git
89d3467b0f
<!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description This PR addresses a problem that leads to two default providers for a given package+version. The problem occurs when given a combination of unversioned and versioned provider requests, as can occur in multi-language programs. The fix is as follows: given an unversioned provider request, apply the default version before looking into the provider cache. Fixes #16108 ## Example Given the example program from #16108 plus this fix, the stack state has one provider as expected: ```jsonl { "urn": "urn:pulumi:dev::issue-1939-nodejs::pulumi:providers:kubernetes::default_4_10_0", "custom": true, "id": "c19b65b0-dd5a-432f-8c75-d7544de782ec", "type": "pulumi:providers:kubernetes", "inputs": { "version": "4.10.0" }, "outputs": { "version": "4.10.0" }, "created": "2024-05-02T21:22:09.72166Z", "modified": "2024-05-02T21:22:09.72166Z" } { "urn": "urn:pulumi:dev::issue-1939-nodejs::kubernetes:yaml/v2:ConfigGroup$kubernetes:core/v1:ConfigMap::example:eron/example", "custom": true, "id": "eron/example", "type": "kubernetes:core/v1:ConfigMap", "parent": "urn:pulumi:dev::issue-1939-nodejs::kubernetes:yaml/v2:ConfigGroup::example", "provider": "urn:pulumi:dev::issue-1939-nodejs::pulumi:providers:kubernetes::default_4_10_0::c19b65b0-dd5a-432f-8c75-d7544de782ec", "propertyDependencies": { "apiVersion": [], "kind": [], "metadata": [] }, } ``` ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [ ] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [ ] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- @Pulumi employees: If yes, you must submit corresponding changes in the service repo. --> |
||
---|---|---|
.. | ||
analyzer | ||
deploy | ||
edit | ||
graph | ||
provider | ||
stack | ||
testdata |