-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add tfgen time validation for ProviderInfo.Resources #1758
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1758 +/- ##
==========================================
- Coverage 60.57% 60.07% -0.50%
==========================================
Files 302 310 +8
Lines 42213 42694 +481
==========================================
+ Hits 25569 25649 +80
- Misses 15173 15572 +399
- Partials 1471 1473 +2 ☔ View full report in Codecov by Sentry. |
var ( | ||
errNoCoorospondingField = fmt.Errorf("overriding non-existent field") | ||
errNoElemToOverride = fmt.Errorf("overriding non-existent elem") | ||
errCannotSpecifyFieldsOnListOrSet = fmt.Errorf("cannot specify .Fields on a List[T] or Set[T] type") |
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.
Nice
This is very valuable! Would be curious to run downstream checks perhaps we can preemptively fixup non-compliant providers before merging to main. For good form could throw in some tests to cover this code but it's not the top priority for coverage obviously, looks nice and straightforward. |
bf01cbf
to
4d763c1
Compare
I added tests, which caught one set of false negatives. I'm blasting out a test run on downstream now: https://github.com/pulumi/pulumi-terraform-bridge/actions/runs/8438306439. If that returns 🟢 or all failures are genuine, I'll merge. |
4d763c1
to
cff9ca4
Compare
This fixes a bug in schema traversal, unblocking pulumi/pulumi-terraform-bridge#1758.
This is part of releasing pulumi/pulumi-terraform-bridge#1758.
This cleanup is necessary as part of releasing pulumi/pulumi-terraform-bridge#1758.
This is a breaking change for Go and Typescript if users were reading the `PolicyDocument` field on LogResourcePolicyArgs or on LogResourcePolicy. This was discovered as part of pulumi/pulumi-terraform-bridge#1758.
- `aws_cloudwatch_log_resource_policy.policy_document` - `aws_ecr_registry_policy.policy` - `aws_sns_topic_policy.policy` This is a breaking change for Go and Typescript if users were reading the `PolicyDocument` field on LogResourcePolicyArgs or on LogResourcePolicy. This was discovered as part of pulumi/pulumi-terraform-bridge#1758.
This is part of releasing pulumi/pulumi-terraform-bridge#1758.
This is part of releasing pulumi/pulumi-terraform-bridge#1758.
This fixes a bug in schema traversal, unblocking pulumi/pulumi-terraform-bridge#1758.
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.
🚢
…3743) This is a breaking change for Go and Typescript if users were reading the `PolicyDocument` field on LogResourcePolicyArgs or on LogResourcePolicy. If we don't want to take the change, we can remove the override entirely (semantically equivalent to what we have now in master). This was discovered as part of pulumi/pulumi-terraform-bridge#1758.
While discussing #1757, there was some uncertainty on how to align
*SchemaInfo
with the underlyingshim.Schema
. This PR clarifies by introducing a user error duringmake tfgen
time if the user provides a misaligned or nonsensical*SchemaInfo
.