-
Notifications
You must be signed in to change notification settings - Fork 116
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
Update CustomResource python implementation to pickup snake-case updates #1786
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. |
1 similar comment
Does the PR have any schema changes?Looking good! No breaking changes found. |
CC @justinvp for his python SDK expertise. As stated in the description, I would love to find a way to bring this inline with the rest of SDK codegen. I will cut a separate issue to consider options here since it might have an overlap with other provider SDKs as well. |
def __init__(__self__, *, | ||
api_version: pulumi.Input[str], | ||
kind: pulumi.Input[str], | ||
compat: Optional[pulumi.Input[str]] = None, |
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.
What's the compat arg for? I don't see a corresponding docstring.
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.
Left over from attempt to codegen. Removed.
__props__['spec'] = spec | ||
__props__['metadata'] = metadata | ||
|
||
# resource_args, opts = _utilities.get_resource_args_opts(CustomResourceArgs, pulumi.ResourceOptions, *args, **kwargs) |
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.
Can this be deleted?
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.
Yup. Fixed.
Does the PR have any schema changes?Looking good! No breaking changes found. |
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.
LGTM
Proposed changes
Refresh the python implementation of python implementation of CustomResource to pick up fixes in snake-casing.
CustomResource.py is hand-crafted wrapper so doesn't lie on the codegen path. While I was able to schematize the core CustomResource type, the custom handling around constructing dynamic tokens at resource registration or retrieval is quite painful to substitute in an automated way. That would have to follow in #1778.
The change here uses an input type which signals the pulumi python SDK to handle the snake casing appropriately. I am not yet exposing the input type in the constructor with the interest of not breaking compatibility.
Related issues (optional)
Fixes #1740