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

Qualify Pulumi.Resource type to stay out of the way of the resource API in K8s v1.26.0 #2237

Merged
merged 3 commits into from Nov 22, 2022

Conversation

squaremo
Copy link
Contributor

@squaremo squaremo commented Nov 17, 2022

This PR makes room for the resource API in Kubernetes v1.26.0, by qualifying the type Resource in templated code for .NET. It would otherwise clash with the namespace Resource generated to house the new API types.

Fixes #2233.

@github-actions
Copy link

Does the PR have any schema changes?

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

@squaremo squaremo marked this pull request as ready for review November 17, 2022 12:29
@github-actions
Copy link

Does the PR have any schema changes?

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

1 similar comment
@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.

@github-actions
Copy link

Does the PR have any schema changes?

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

The next release of Kubernetes (1.26.0) has an API named `resource`. In
the .NET codegen, this will end up being a namespace `Resource`,
clashing with the type name `Resource` which is implicitly in scope.

To avoid this, give the Pulumi namespace an alias and use that to
qualify the `Resource` type.

Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
    make build

This produces code equivalent to previously, but now the templates alias
the Pulumi namespace so the `Resource` type won't clash with any
upcoming `Resource` namespace.

Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
@github-actions
Copy link

Does the PR have any schema changes?

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

@squaremo
Copy link
Contributor Author

I'm going to merge this, on the basis that it's passed each of the acceptance test suites in at least one run, without the actual change here making any difference to the chance of success.

@squaremo squaremo merged commit e25e091 into master Nov 22, 2022
@pulumi-bot pulumi-bot deleted the qualify-pulumi-types branch November 22, 2022 15:00
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.

[sdk/dotnet] Resource API group in v1.26 causes naming conflicts
2 participants