Skip to content

Commit fc6566b

Browse files
authored
Actually deprecate ConfigureRequest.variables (#23367)
We have claimed in the doc comment that this was deprecated, but we should actually do the deprecation.
1 parent 6a91079 commit fc6566b

7 files changed

Lines changed: 121 additions & 116 deletions

File tree

‎pkg/testing/pulumi-test-language/tests/l2_provider_grpc_config.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func init() {
104104
map[string]any{"x": float64(42)},
105105
c.Args.Fields["objInt1"].AsInterface(), "objInt1")
106106

107-
v := c.GetVariables()
107+
v := c.GetVariables() //nolint:staticcheck // Intentionally tested deprecated features
108108
assert.Equal(l, "", v["config-grpc:config:string1"], "string1")
109109
assert.Equal(l, "x", v["config-grpc:config:string2"], "string2")
110110
assert.Equal(l, "{}", v["config-grpc:config:string3"], "string3")

‎pkg/testing/pulumi-test-language/tests/l2_provider_grpc_config_schema_secret.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func init() {
8888
c.Args.Fields["mapSecretString1"].AsInterface(), "mapSecretString1")
8989

9090
// Secretness is not exposed in GetVariables. Instead the data is JSON-encoded.
91-
v := c.GetVariables()
91+
v := c.GetVariables() //nolint:staticcheck // Intentionally checking deprecated features
9292
assert.Equal(l, "SECRET", v["config-grpc:config:secretString1"], "secretString1")
9393
assert.JSONEq(l, "16", v["config-grpc:config:secretInt1"], "secretInt1")
9494
assert.JSONEq(l, "123456.7890", v["config-grpc:config:secretNum1"], "secretNum1")

‎pkg/testing/pulumi-test-language/tests/l2_provider_grpc_config_secret.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func init() {
9595
c.Args.Fields["objString2"].AsInterface(), "objString2")
9696

9797
// Secretness is not exposed in GetVariables. Instead the data is JSON-encoded.
98-
v := c.GetVariables()
98+
v := c.GetVariables() //nolint:staticcheck // Intentionally tested deprecated features
9999
assert.Equal(l, "SECRET", v["config-grpc:config:string1"], "string1")
100100
assert.Equal(l, "1234567890", v["config-grpc:config:int1"], "int1")
101101
assert.Equal(l, "123456.789", v["config-grpc:config:num1"], "num1")

‎proto/pulumi/provider.proto‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ message ConfigureRequest {
392392
// "b": "{\"c\":\"hello\",\"d\":true}"
393393
// }
394394
// ```
395-
map<string, string> variables = 1;
395+
map<string, string> variables = 1 [deprecated = true];
396396

397397
// A map of input properties for the provider.
398398
//

‎sdk/go/common/resource/plugin/provider_server.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ func (p *providerServer) Configure(ctx context.Context,
365365
inputs = args
366366
} else {
367367
inputs = make(resource.PropertyMap)
368-
for k, v := range req.GetVariables() {
368+
for k, v := range req.GetVariables() { //nolint:staticcheck // maintain backwards compatibility
369369
key, err := config.ParseKey(k)
370370
if err != nil {
371371
return nil, err

‎sdk/proto/go/provider.pb.go‎

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎sdk/python/lib/pulumi/runtime/proto/provider_pb2.py‎

Lines changed: 110 additions & 108 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)