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

Incorrect snake_case translation for certain properties. #1179

Closed
komalali opened this issue Jun 29, 2020 · 4 comments · Fixed by pulumi/pulumi#4918
Closed

Incorrect snake_case translation for certain properties. #1179

komalali opened this issue Jun 29, 2020 · 4 comments · Fixed by pulumi/pulumi#4918
Assignees
Milestone

Comments

@komalali
Copy link
Member

komalali commented Jun 29, 2020

Problem description

  • There are a number of properties that have unexpected translations to snake_case. Examples:

  • This happens when there is an acronym e.g. "CIDR" that is pluralized with a lowercase "s" e.g. "CIDRs". The PyName() algorithm categorizes the "Rs" as a separate word.

  • These properties are already in the SDK so merely replacing the existing values with the "correct" translation would be a breaking change.

Suggestions for a fix

Consider the lowercase 's' a part of the acronym. pulumi/pulumi#4918

Note: This doesn't account for backwards compatibility.

@justinvp
Copy link
Member

I'd really like to get these "right" as part of doing pulumi/pulumi#3771. For the generated types, we can use the "correct" naming we want and still maintain the old naming for the "old" way of doing things with untyped dicts for backwards compatibility.

@leezen leezen added this to the current milestone Jul 14, 2020
@komalali
Copy link
Member Author

komalali commented Aug 4, 2020

@justinvp @lblackstone any thoughts on what we might want to do here? If we do fix the PyName() algorithm this will result in a breaking change for pulumi-kubernetes.

@justinvp
Copy link
Member

justinvp commented Aug 4, 2020

Now's our opportunity to use the "right" names on the input/output types. I'd be in favor of fixing PyName() to better handle these, and then have some kind of fallback that maintains the old behavior (e.g. PyNameLegacy()?) that would only be used in the small number of places where the old names need to remain for compatibility (e.g. when generating the mapping tables).

@komalali
Copy link
Member Author

komalali commented Aug 4, 2020

have some kind of fallback that maintains the old behavior (e.g. PyNameLegacy())

Ah interesting, yeah that sounds good to me.

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 a pull request may close this issue.

3 participants