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] - Inputty Go enums #7383

Merged
merged 14 commits into from
Jul 7, 2021
Merged

[codegen/go] - Inputty Go enums #7383

merged 14 commits into from
Jul 7, 2021

Conversation

komalali
Copy link
Member

@komalali komalali commented Jun 29, 2021

Description

Fixes #7351

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

@github-actions
Copy link

Diff for pulumi-random with merge commit adfd90e

@github-actions
Copy link

Diff for pulumi-azuread with merge commit adfd90e

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit adfd90e

@github-actions
Copy link

Diff for pulumi-gcp with merge commit adfd90e

@github-actions
Copy link

Diff for pulumi-azure with merge commit adfd90e

@github-actions
Copy link

Diff for pulumi-aws with merge commit adfd90e

@github-actions
Copy link

Diff for pulumi-random with merge commit c8eda8d

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit c8eda8d

@github-actions
Copy link

Diff for pulumi-azuread with merge commit c8eda8d

@komalali komalali marked this pull request as ready for review June 30, 2021 04:45
@github-actions
Copy link

Diff for pulumi-random with merge commit 6b1a86b

@github-actions
Copy link

Diff for pulumi-azuread with merge commit 6b1a86b

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit 6b1a86b

@github-actions
Copy link

Diff for pulumi-gcp with merge commit c8eda8d

@github-actions
Copy link

Diff for pulumi-azure with merge commit c8eda8d

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 6b1a86b

@github-actions
Copy link

Diff for pulumi-azure with merge commit 6b1a86b

@github-actions
Copy link

Diff for pulumi-aws with merge commit c8eda8d

@github-actions
Copy link

Diff for pulumi-aws with merge commit 6b1a86b

@github-actions
Copy link

Diff for pulumi-random with merge commit 1768179

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit 1768179

@github-actions
Copy link

Diff for pulumi-azuread with merge commit 1768179

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 1768179

@github-actions
Copy link

Diff for pulumi-azure with merge commit 1768179

@github-actions
Copy link

Diff for pulumi-aws with merge commit 1768179

@komalali komalali force-pushed the komalali/7351 branch 2 times, most recently from ac49a7b to adac739 Compare July 1, 2021 08:03
@github-actions
Copy link

github-actions bot commented Jul 7, 2021

Diff for pulumi-random with merge commit c4fd5bd

@github-actions
Copy link

github-actions bot commented Jul 7, 2021

Diff for pulumi-random with merge commit 93710de

@github-actions
Copy link

github-actions bot commented Jul 7, 2021

Diff for pulumi-azuread with merge commit 93710de

@github-actions
Copy link

github-actions bot commented Jul 7, 2021

Diff for pulumi-gcp with merge commit 93710de

@github-actions
Copy link

github-actions bot commented Jul 7, 2021

Diff for pulumi-azure with merge commit 93710de

@komalali
Copy link
Member Author

komalali commented Jul 7, 2021

I have done my best to update downstream providers, but unfortunately, there are issues with k8s and azure-native that are unlikely to be resolved within the timeline needed for this PR.

I request that you review my PR based on the downstream codegen tests that do work, and the codegen tests within the pulumi/pulumi repo which test both the code generation as well as the usability of the generated enums.

Comment on lines +145 to +146
assert.Equal(t, *size, plant.ContainerSize(22), "unexpected size on resource: %v", urn)
assert.Equal(t, typ, tree.RubberTreeVarietyRuby, "unexpected type on resource: %v", urn)
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that it is no longer possible to pass in untyped strings/integers to strict enums. This is in line with how strings must be wrapped in pulumi.String to function correctly.

@github-actions
Copy link

github-actions bot commented Jul 7, 2021

Diff for pulumi-aws with merge commit 93710de

@emiliza
Copy link
Contributor

emiliza commented Jul 7, 2021

@pgavlin can you take a look? 👀

Copy link
Member

@pgavlin pgavlin left a comment

Choose a reason for hiding this comment

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

Looks great! Just one question about a small simplification.

pkg/codegen/go/doc.go Outdated Show resolved Hide resolved
@komalali komalali merged commit 8db30bd into master Jul 7, 2021
@komalali komalali deleted the komalali/7351 branch July 7, 2021 23:25
@github-actions
Copy link

github-actions bot commented Jul 7, 2021

Diff for pulumi-random with merge commit edaa68d

@t0yv0
Copy link
Member

t0yv0 commented Jul 8, 2021

Props for tests that run generated code! Awesome.

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.

Generated enums in Go are not "Inputty"
4 participants