-
Notifications
You must be signed in to change notification settings - Fork 115
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
Normalize x-kubernetes-*
fields for outputs
#3348
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3348 +/- ##
==========================================
+ Coverage 41.11% 41.24% +0.12%
==========================================
Files 85 85
Lines 12741 12740 -1
==========================================
+ Hits 5238 5254 +16
+ Misses 7113 7096 -17
Partials 390 390 ☔ View full report in Codecov by Sentry. |
To clarify -- we currently store dashes in state, and will continue to store dashes, right? So underscores are only ever exposed to the SDK? |
I believe that it is necessary to store underscores for it to be exposed to the SDK. This should not be a breaking change for users. |
Complementary to: #2128 |
Make replacement map DRY
955ca9e
to
5d359f8
Compare
x-kubernetes-*
fields for outputsx-kubernetes-*
fields for outputs
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.
Looks great to me.
Proposed changes
This PR normalizes outputs so that any
x-kubernetes-*
fields are stored in their respective underscored forms. When creating a CRD with Pulumi, we are able to set thex-kubernetes-*
fields correctly during create/update (except in Java). However, if we attempt to read this field as an output, it would fail since the stored state is not normalized to the underscored forms. In other languages (Go/Python/TS), this was fine - but in Java, this fails as the builder pattern we use for codegen is unable to set thex-kubernetes-*
fields since we only have setters for the underscored versions.This also fixes the issue where we cannot read the values of
x_kubernetes_*
fields from outputs.This PR adds additional unit tests, expands on the existing nodejs e2e test to verify that we can now read
x_kubernetes_*
fields, and creates a new Java e2e test to ensure we can successfully create CRDs that containx_kubernetes_*
fields.Related issues (optional)
Closes: #3325