generated from pulumi/pulumi-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop Elem
and move Type
one level higher
#99
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Ringo De Smet <[email protected]>
UnstoppableMango
approved these changes
Jul 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a huge fan of some of the names but thus is the nature of generated code I suppose!
@UnstoppableMango don't merge this yet. I have been in talks with my colleagues about this and I will wait for a more definite outcome. UPDATE: upstream issue filed: |
iwahbe
added a commit
to pulumi/pulumi-terraform-bridge
that referenced
this pull request
Aug 13, 2024
This is a reversal of our previous stance that .Fields should be used. This aligns the fields argument with [schema generation](https://github.com/pulumi/pulumi-terraform-bridge/blob/72b0b7d33b6d9f0dce7c09b31951ade3711a025d/pkg/tfgen/generate.go#L395-L398). We *need* to choose `.Elem.Fields` as our 1 representation (instead of `.Fields) because of an ambiguity in `shim.Schema`. From a comment in the PR: > To prevent confusion, users are barred from specifying > information on ps directly, they must set .Fields on ps.Elem: > ps.Elem.Fields. > > We need to make this choice (instead of having users set > information on .Fields (and forbidding ps.Elem.Fields) because > the [shim.Schema] representation is not capable of > distinguishing between Map[Object] and Object. SDKv{1,2} > providers are not able to express Map[Object], but Plugin > Framework based providers are. ``` While this is technically a breaking change, I don't expect users to be broken. Any user that would break on this change would have been unable to addapt the last several bridge versions (for example: pulumiverse/pulumi-talos#99). Fixes #2185
iwahbe
added a commit
to pulumi/pulumi-terraform-bridge
that referenced
this pull request
Aug 13, 2024
This is a reversal of our previous stance that .Fields should be used. This aligns the fields argument with [schema generation](https://github.com/pulumi/pulumi-terraform-bridge/blob/72b0b7d33b6d9f0dce7c09b31951ade3711a025d/pkg/tfgen/generate.go#L395-L398). We *need* to choose `.Elem.Fields` as our 1 representation (instead of `.Fields`) because of an ambiguity in `shim.Schema`. From a comment in the PR: > To prevent confusion, users are barred from specifying > information on ps directly, they must set .Fields on ps.Elem: > ps.Elem.Fields. > > We need to make this choice (instead of having users set > information on .Fields (and forbidding ps.Elem.Fields) because > the [shim.Schema] representation is not capable of > distinguishing between Map[Object] and Object. SDKv{1,2} > providers are not able to express Map[Object], but Plugin > Framework based providers are. While this is technically a breaking change, I don't expect users to be broken. Any user that would break on this change would have been unable to addapt the last several bridge versions (for example: pulumiverse/pulumi-talos#99). Fixes #2185
iwahbe
added a commit
to pulumi/pulumi-terraform-bridge
that referenced
this pull request
Aug 14, 2024
This is a reversal of our previous stance that .Fields should be used. This aligns the fields argument with [schema generation](https://github.com/pulumi/pulumi-terraform-bridge/blob/72b0b7d33b6d9f0dce7c09b31951ade3711a025d/pkg/tfgen/generate.go#L395-L398). We *need* to choose `.Elem.Fields` as our 1 representation (instead of `.Fields`) because of an ambiguity in `shim.Schema`. From a comment in the PR: > To prevent confusion, users are barred from specifying > information on ps directly, they must set .Fields on ps.Elem: > ps.Elem.Fields. > > We need to make this choice (instead of having users set > information on .Fields (and forbidding ps.Elem.Fields) because > the [shim.Schema] representation is not capable of > distinguishing between Map[Object] and Object. SDKv{1,2} > providers are not able to express Map[Object], but Plugin > Framework based providers are. While this is technically a breaking change, I don't expect users to be broken. Any user that would break on this change would have been unable to addapt the last several bridge versions (for example: pulumiverse/pulumi-talos#99). Fixes #2185
iwahbe
added a commit
to pulumi/pulumi-terraform-bridge
that referenced
this pull request
Aug 14, 2024
This is a reversal of our previous stance that .Fields should be used. This aligns the fields argument with [schema generation](https://github.com/pulumi/pulumi-terraform-bridge/blob/72b0b7d33b6d9f0dce7c09b31951ade3711a025d/pkg/tfgen/generate.go#L395-L398). We *need* to choose `.Elem.Fields` as our 1 representation (instead of `.Fields`) because of an ambiguity in `shim.Schema`. From a comment in the PR: > To prevent confusion, users are barred from specifying > information on ps directly, they must set .Fields on ps.Elem: > ps.Elem.Fields. > > We need to make this choice (instead of having users set > information on .Fields (and forbidding ps.Elem.Fields) because > the [shim.Schema] representation is not capable of > distinguishing between Map[Object] and Object. SDKv{1,2} > providers are not able to express Map[Object], but Plugin > Framework based providers are. While this is technically a breaking change, I don't expect users to be broken. Any user that would break on this change would have been unable to addapt the last several bridge versions (for example: pulumiverse/pulumi-talos#99). Fixes #2185
iwahbe
added a commit
to pulumi/pulumi-terraform-bridge
that referenced
this pull request
Aug 15, 2024
This is a reversal of our previous stance that .Fields should be used. This aligns the fields argument with [schema generation](https://github.com/pulumi/pulumi-terraform-bridge/blob/72b0b7d33b6d9f0dce7c09b31951ade3711a025d/pkg/tfgen/generate.go#L395-L398). We *need* to choose `.Elem.Fields` as our 1 representation (instead of `.Fields`) because of an ambiguity in `shim.Schema`. From a comment in the PR: > To prevent confusion, users are barred from specifying > information on ps directly, they must set .Fields on ps.Elem: > ps.Elem.Fields. > > We need to make this choice (instead of having users set > information on .Fields (and forbidding ps.Elem.Fields) because > the [shim.Schema] representation is not capable of > distinguishing between Map[Object] and Object. SDKv{1,2} > providers are not able to express Map[Object], but Plugin > Framework based providers are. While this is technically a breaking change, I don't expect users to be broken. Any user that would break on this change would have been unable to addapt the last several bridge versions (for example: pulumiverse/pulumi-talos#99). Fixes #2185
iwahbe
added a commit
to pulumi/pulumi-terraform-bridge
that referenced
this pull request
Aug 15, 2024
This is a reversal of our previous stance that .Fields should be used. This aligns the fields argument with [schema generation](https://github.com/pulumi/pulumi-terraform-bridge/blob/72b0b7d33b6d9f0dce7c09b31951ade3711a025d/pkg/tfgen/generate.go#L395-L398). We *need* to choose `.Elem.Fields` as our 1 representation (instead of `.Fields`) because of an ambiguity in `shim.Schema`. From a comment in the PR: > To prevent confusion, users are barred from specifying > information on ps directly, they must set .Fields on ps.Elem: > ps.Elem.Fields. > > We need to make this choice (instead of having users set > information on .Fields (and forbidding ps.Elem.Fields) because > the [shim.Schema] representation is not capable of > distinguishing between Map[Object] and Object. SDKv{1,2} > providers are not able to express Map[Object], but Plugin > Framework based providers are. While this is technically a breaking change, I don't expect users to be broken. Any user that would break on this change would have been unable to addapt the last several bridge versions (for example: pulumiverse/pulumi-talos#99). Fixes #2185
iwahbe
added a commit
to pulumi/pulumi-terraform-bridge
that referenced
this pull request
Aug 15, 2024
This is a reversal of our previous stance that .Fields should be used. This aligns the fields argument with [schema generation](https://github.com/pulumi/pulumi-terraform-bridge/blob/72b0b7d33b6d9f0dce7c09b31951ade3711a025d/pkg/tfgen/generate.go#L395-L398). We *need* to choose `.Elem.Fields` as our 1 representation (instead of `.Fields`) because of an ambiguity in `shim.Schema`. From a comment in the PR: > To prevent confusion, users are barred from specifying > information on ps directly, they must set .Fields on ps.Elem: > ps.Elem.Fields. > > We need to make this choice (instead of having users set > information on .Fields (and forbidding ps.Elem.Fields) because > the [shim.Schema] representation is not capable of > distinguishing between Map[Object] and Object. SDKv{1,2} > providers are not able to express Map[Object], but Plugin > Framework based providers are. While this is technically a breaking change, I don't expect users to be broken. Any user that would break on this change would have been unable to addapt the last several bridge versions (for example: pulumiverse/pulumi-talos#99). Fixes #2185
iwahbe
added a commit
to pulumi/pulumi-terraform-bridge
that referenced
this pull request
Aug 15, 2024
This is a reversal of our previous stance that .Fields should be used. This aligns the fields argument with [schema generation](https://github.com/pulumi/pulumi-terraform-bridge/blob/72b0b7d33b6d9f0dce7c09b31951ade3711a025d/pkg/tfgen/generate.go#L395-L398). We *need* to choose `.Elem.Fields` as our 1 representation (instead of `.Fields`) because of an ambiguity in `shim.Schema`. From a comment in the PR: > To prevent confusion, users are barred from specifying > information on ps directly, they must set .Fields on ps.Elem: > ps.Elem.Fields. > > We need to make this choice (instead of having users set > information on .Fields (and forbidding ps.Elem.Fields) because > the [shim.Schema] representation is not capable of > distinguishing between Map[Object] and Object. SDKv{1,2} > providers are not able to express Map[Object], but Plugin > Framework based providers are. While this is technically a breaking change, I don't expect users to be broken. Any user that would break on this change would have been unable to addapt the last several bridge versions (for example: pulumiverse/pulumi-talos#99). Fixes #2185
Fixed in #104 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In preparation of upgrading the TF bridge to a newer version, @iwahbe advised to drop the
Elem
struct and move theType
one level higher.