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

codegen/{go,js,.net,py}: Generate retainOnDelete #12306

Merged
merged 1 commit into from Mar 6, 2023

Conversation

abhinav
Copy link
Contributor

@abhinav abhinav commented Feb 28, 2023

Uses the newly added options.retainOnDelete in PCL
to generate the RetainOnDelete resource option
for Go, NodeJS, .NET, and Python.

Java support cannot be added without a release of pulumi/pulumi
because the new field in pcl.ResourceOptions is not yet visible
to Java.
The change has been staged at pulumi/pulumi-java#1005
pending merge and release of #12305.

Resolves #12304

Copy link
Contributor Author

abhinav commented Feb 28, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Feb 28, 2023

Changelog

[uncommitted] (2023-03-06)

Features

  • [programgen/{dotnet,go,nodejs,python}] Adds support for generating RetainOnDelete options.
    #12306

abhinav added a commit to pulumi/pulumi-java that referenced this pull request Feb 28, 2023
Temporarily pins to the branch for pulumi/pulumi#12306
so that we can wire up the codegen changes.
@abhinav
Copy link
Contributor Author

abhinav commented Feb 28, 2023

Error: /home/runner/work/pulumi/pulumi/pkg/codegen/testing/test/testdata/retain-on-delete-pp/dotnet/retain-on-delete.cs(11,9): error CS0117: 'CustomResourceOptions' does not contain a definition for 'RetainOnDelete' [/home/runner/work/pulumi/pulumi/pkg/codegen/testing/test/testdata/retain-on-delete-pp/dotnet/dotnet.csproj]

It most certainly does. I don't know where this is getting the .NET SDK, but it might just be a super old version.

@abhinav abhinav force-pushed the abhinav/pcl-retain-on-delete branch from 5ede5bd to a3a8172 Compare March 1, 2023 21:23
@abhinav abhinav force-pushed the abhinav/gen-retain-on-delete branch from 4bac333 to 50372c4 Compare March 1, 2023 21:23
@Frassle
Copy link
Member

Frassle commented Mar 1, 2023

I don't know where this is getting the .NET SDK, but it might just be a super old version.

Yup it's linking to Pulumi.Random 4.2.0 which is from like 2021.

abhinav added a commit that referenced this pull request Mar 1, 2023
Adds the most recent relese of pulumi-random to included schemas.
We need something newer than 4.2.0 or 4.3.1 (both from 2021)
to test options added since then, like retainOnDelete.

Refs #12306 (comment)
abhinav added a commit that referenced this pull request Mar 3, 2023
Adds the most recent relese of pulumi-random to included schemas.
We need something newer than 4.2.0 or 4.3.1 (both from 2021)
to test options added since then, like retainOnDelete.

Refs #12306 (comment)
bors bot added a commit that referenced this pull request Mar 3, 2023
12326: testdata/schema: Add random 4.11.2 r=abhinav a=abhinav

Adds the most recent relese of pulumi-random to included schemas.
We need something newer than 4.2.0 or 4.3.1 (both from 2021)
to test options added since then, like retainOnDelete.

Refs #12306 (comment)


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
@abhinav abhinav force-pushed the abhinav/pcl-retain-on-delete branch from a3a8172 to 7d1a9ec Compare March 3, 2023 19:04
@abhinav abhinav force-pushed the abhinav/gen-retain-on-delete branch from 50372c4 to 95f76c0 Compare March 3, 2023 19:04
@abhinav abhinav marked this pull request as ready for review March 3, 2023 20:01
@abhinav
Copy link
Contributor Author

abhinav commented Mar 3, 2023

I don't know where this is getting the .NET SDK, but it might just be a super old version.

Yup it's linking to Pulumi.Random 4.2.0 which is from like 2021.

Thanks! Fixed in #12326.

Base automatically changed from abhinav/pcl-retain-on-delete to master March 4, 2023 03:01
Uses the newly added `options.retainOnDelete` in PCL
to generate the RetainOnDelete resource option
for Go, NodeJS, .NET, and Python.

Java support cannot be added without a release of pulumi/pulumi
because the new field in pcl.ResourceOptions is not yet visible
to Java.

Resolves #12304
@abhinav abhinav force-pushed the abhinav/gen-retain-on-delete branch from 95f76c0 to 407e695 Compare March 6, 2023 21:58
Copy link
Member

@Frassle Frassle left a comment

Choose a reason for hiding this comment

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

Nice and simple!

@abhinav
Copy link
Contributor Author

abhinav commented Mar 6, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 6, 2023

Build succeeded:

@bors bors bot merged commit 155d029 into master Mar 6, 2023
@bors bors bot deleted the abhinav/gen-retain-on-delete branch March 6, 2023 23:12
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.

pcl: Support retainOnDelete option
3 participants