Skip to content

Commit

Permalink
Remove explicit dependencies on pu/pu versions (#3616)
Browse files Browse the repository at this point in the history
Here is how codegen calculates the version of pulumi packages:
1. If the dependency is set in the provider schema, it uses that one.
2. If not, it uses the requirement from pu/pu itself.

Pulumi has recently bumped the minimal required version of SDKs to a
very fresh one due to invoke output API changes:
pulumi/pulumi#17390 and
pulumi/pulumi#17316

Therefore, we want to give up a (smaller) version in the provider and
rely on the core version again.
  • Loading branch information
mikhailshilkov authored Oct 2, 2024
1 parent 41b96dd commit 256f320
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
6 changes: 0 additions & 6 deletions provider/cmd/pulumi-resource-azure-native/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,6 @@
}
},
"nodejs": {
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
},
"readme": "The native Azure provider package offers support for all Azure Resource Manager (ARM)\nresources and their properties. Resources are exposed as types from modules based on Azure Resource\nProviders such as 'compute', 'network', 'storage', and 'web', among many others. Using this package\nallows you to programmatically declare instances of any Azure resource and any supported resource\nversion using infrastructure as code, which Pulumi then uses to drive the ARM API.",
"respectSchemaVersion": true
},
Expand Down Expand Up @@ -1043,9 +1040,6 @@
"enabled": true
},
"readme": "The native Azure provider package offers support for all Azure Resource Manager (ARM)\nresources and their properties. Resources are exposed as types from modules based on Azure Resource\nProviders such as 'compute', 'network', 'storage', and 'web', among many others. Using this package\nallows you to programmatically declare instances of any Azure resource and any supported resource\nversion using infrastructure as code, which Pulumi then uses to drive the ARM API.",
"requires": {
"pulumi": "\u003e=3.134.1,\u003c4.0.0"
},
"respectSchemaVersion": true,
"usesIOClasses": true
}
Expand Down
6 changes: 0 additions & 6 deletions provider/pkg/gen/__snapshots__/gen_vnet_test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10975,9 +10975,6 @@
}
},
"nodejs": {
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
},
"readme": "The native Azure provider package offers support for all Azure Resource Manager (ARM)\nresources and their properties. Resources are exposed as types from modules based on Azure Resource\nProviders such as 'compute', 'network', 'storage', and 'web', among many others. Using this package\nallows you to programmatically declare instances of any Azure resource and any supported resource\nversion using infrastructure as code, which Pulumi then uses to drive the ARM API.",
"respectSchemaVersion": true
},
Expand All @@ -10990,9 +10987,6 @@
"enabled": true
},
"readme": "The native Azure provider package offers support for all Azure Resource Manager (ARM)\nresources and their properties. Resources are exposed as types from modules based on Azure Resource\nProviders such as 'compute', 'network', 'storage', and 'web', among many others. Using this package\nallows you to programmatically declare instances of any Azure resource and any supported resource\nversion using infrastructure as code, which Pulumi then uses to drive the ARM API.",
"requires": {
"pulumi": "\u003e=3.134.1,\u003c4.0.0"
},
"respectSchemaVersion": true,
"usesIOClasses": true
}
Expand Down
10 changes: 2 additions & 8 deletions provider/pkg/gen/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,6 @@ func PulumiSchema(rootDir string, providerMap openapi.AzureProviders, versioning
"respectSchemaVersion": true,
})
pkg.Language["nodejs"] = rawMessage(map[string]interface{}{
"dependencies": map[string]string{
"@pulumi/pulumi": "^3.0.0",
},
"readme": `The native Azure provider package offers support for all Azure Resource Manager (ARM)
resources and their properties. Resources are exposed as types from modules based on Azure Resource
Providers such as 'compute', 'network', 'storage', and 'web', among many others. Using this package
Expand All @@ -371,11 +368,8 @@ version using infrastructure as code, which Pulumi then uses to drive the ARM AP

pkg.Language["python"] = rawMessage(map[string]interface{}{
"moduleNameOverrides": pythonModuleNames,
"requires": map[string]string{
"pulumi": ">=3.134.1,<4.0.0",
},
"usesIOClasses": true,
"inputTypes": "classes-and-dicts",
"usesIOClasses": true,
"inputTypes": "classes-and-dicts",
"readme": `The native Azure provider package offers support for all Azure Resource Manager (ARM)
resources and their properties. Resources are exposed as types from modules based on Azure Resource
Providers such as 'compute', 'network', 'storage', and 'web', among many others. Using this package
Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"build": "tsc"
},
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
"@pulumi/pulumi": "^3.134.1"
},
"devDependencies": {
"@types/node": "^14",
Expand Down

0 comments on commit 256f320

Please sign in to comment.