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

Do not return IDs when previewing creates. #1526

Merged
merged 3 commits into from
Apr 15, 2021
Merged

Do not return IDs when previewing creates. #1526

merged 3 commits into from
Apr 15, 2021

Conversation

pgavlin
Copy link
Member

@pgavlin pgavlin commented Apr 14, 2021

Instead, return the empty string. This will prevent the engine and core
SDKs from treating an uncreated resource's ID as known.

Fixes pulumi/pulumi#5728.

Instead, return the empty string. This will prevent the engine and core
SDKs from treating an uncreated resource's ID as known.

Fixes pulumi/pulumi#5728.
@pgavlin pgavlin requested a review from lblackstone April 14, 2021 05:35
@pgavlin
Copy link
Member Author

pgavlin commented Apr 14, 2021

Though I'm fairly confident that we should take this, I do want to point out that it is a behavioral change and may reduce the efficacy of previews if resources are connected via IDs. That said, it will correct problems like those mentioned in the linked issue, and better reflects the intended semantics of known vs. unknown IDs.

Copy link
Member

@lblackstone lblackstone left a comment

Choose a reason for hiding this comment

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

LGTM aside from the apiversion comment

@@ -0,0 +1,52 @@
# Copyright 2016-2020, Pulumi Corporation.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# Copyright 2016-2020, Pulumi Corporation.
# Copyright 2016-2021, Pulumi Corporation.


import pulumi
from pulumi_kubernetes.apiextensions.CustomResource import CustomResource
from pulumi_kubernetes.apiextensions.v1beta1.CustomResourceDefinition import (
Copy link
Member

Choose a reason for hiding this comment

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

apiextensions/v1beta1 is deprecated and will be removed in the next k8s release. It would be better to use apiextensions/v1 for these.

Copy link
Member Author

Choose a reason for hiding this comment

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

SG

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.

Python SDK id property considered known during preview
2 participants