Skip to content
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

Adopt plain types in the schema to match the implementation #819

Merged
merged 2 commits into from
Nov 23, 2022

Conversation

justinvp
Copy link
Member

There are cases where inputs to some components in the TS implementation are plain, but the schema doesn’t indicate they are plain (EKS was originally schematized before plain values were supported in the schema), so it’s possible someone could pass an Output<T> for these from multi-lang, which may result in problems in the implementation if it isn't expecting an Output<T> value.

Fixes #817

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Comment on lines +245 to +246
region?: pulumi.Input<aws.Region>;
profile?: pulumi.Input<string>;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are non-plain Input<T> in the schema:

"region": {
TypeSpec: schema.TypeSpec{Type: "string"}, // TODO: enum: consider typing as `aws.Region`
},
"profile": {
TypeSpec: schema.TypeSpec{Type: "string"},
},

And they can easily be made Input<T> in the implementation, as they're just passed along through getRoleProvider, which passes them as inputs when creating aws.Provider, which already accepts Input<T> for these:

const creatorProvider = new aws.Provider(`${name}-eksClusterCreatorEntity`, {
region: region,
profile: profile,

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

There are cases where inputs to some components in the TS implementation are plain, but the schema doesn’t indicate they are plain (EKS was originally schematized before plain values were supported in the schema), so it’s possible someone could pass an `Output<T>` for these from multi-lang, which may result in problems in the implementation if it isn't expecting an `Output<T>` value.
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link
Member

@danielrbradley danielrbradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great 👏

Might be a couple more of these that we can make inputty, but that's a non-breaking change we can revisit another day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt plain values where needed for multi-lang
2 participants