You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like we cannot override a DeprecationMessage on a field if upstream has set one previously.
context: pulumi/pulumi-cloudflare#952 - was thinking that with the lack of repro on my side, I could at least make the deprecation message a little more strongly worded. It appears that if a field already has a DeprecationMessage from upstream, the bridge just ignores what's set in resources.go.
This may or may not be considered a bug - it's probably not a common use case, but my tendency would be to prioritize information from resources.go in the case of a conflict.
I've found no related issues.
Example
In the Cloudflare provider's resources.go, try the following test messages:
"cloudflare_record": {
DeleteBeforeReplace: true,
Fields: map[string]*tfbridge.SchemaInfo{
"value": {
DeprecationMessage: "HI OH SO SORRY UNICORN INVASION: " +
"`value` is deprecated in favor of `content`. It will be removed in the next major release." +
"If you encounter any irregularities on this field, we strongly recomment using `content` instead.",
},
"zone_id": {
DeprecationMessage: "hey does this thing even work",
},
},
},
Important note: value field has an existing upstream deprecation message; zone_id does not.
Run make schema.
Observe schema.json - value has upstream's deprecation message despite setting in resources.go.
"value": {
"type": "string",
"description": "The value of the record. Must provide only one of `data`, `content`, `value`.\n",
"deprecationMessage": "`value` is deprecated in favour of `content` and will be removed in the next major release."
},
"zoneId": {
"type": "string",
"description": "The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**\n",
"deprecationMessage": "hey does this thing even work"
}
Output of pulumi about
n/a
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered:
What happened?
It looks like we cannot override a
DeprecationMessage
on a field if upstream has set one previously.context: pulumi/pulumi-cloudflare#952 - was thinking that with the lack of repro on my side, I could at least make the deprecation message a little more strongly worded. It appears that if a field already has a
DeprecationMessage
from upstream, the bridge just ignores what's set inresources.go
.This may or may not be considered a bug - it's probably not a common use case, but my tendency would be to prioritize information from
resources.go
in the case of a conflict.I've found no related issues.
Example
In the Cloudflare provider's
resources.go
, try the following test messages:Important note:
value
field has an existing upstream deprecation message;zone_id
does not.Run
make schema
.Observe schema.json -
value
has upstream's deprecation message despite setting inresources.go
.Output of
pulumi about
n/a
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: