-
Notifications
You must be signed in to change notification settings - Fork 43
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
Ensure validate called during tfgen #1854
Ensure validate called during tfgen #1854
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1854 +/- ##
==========================================
- Coverage 60.48% 60.05% -0.43%
==========================================
Files 310 323 +13
Lines 42835 43894 +1059
==========================================
+ Hits 25908 26360 +452
- Misses 15454 16042 +588
- Partials 1473 1492 +19 ☔ View full report in Codecov by Sentry. |
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.
This looks good. I think we will need to test on downstream providers before we can merge
Co-authored-by: Ian Wahbe <[email protected]>
Co-authored-by: Ian Wahbe <[email protected]>
Downstream failures: auth0: https://github.com/pulumi/pulumi-auth0/actions/runs/8648328389/job/23711873275?pr=493 - this looks related. Hitting #1816 - these changes cause failures in tfgen which is not picked up by the downstream check script. Will fix that before continuing here. |
After fixing #1816 it turns out this caused quite a few downsteam failures:
Looking into it, the ones I checked don't look like actual regressions in the schema but rather an issue with the validation logic. EDIT: The issue was that Validate actually requires passing in a valid config and for these providers the empty config is invalid. I've changed tfgen to directly call |
fixes #1816 Hit it during #1854 It now prints links for the repos which don't have PRs for the commit at all: ``` FAILURE pulumi/pulumi-auth0#493 FAILURE pulumi/pulumi-oci#431 MISSING https://github.com/pulumi/pulumi-opsgenie/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-splunk/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-libvirt/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-minio/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-kafka/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-aws/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-onelogin/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-cloudamqp/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-rabbitmq/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-newrelic/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-dnsimple/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-nomad/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-mailgun/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-mysql/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-sumologic/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-vsphere/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-keycloak/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-slack/actions/workflows/upgrade-bridge.yml MISSING https://github.com/pulumi/pulumi-vault/actions/workflows/upgrade-bridge.yml ```
I've kicked off another round of downstream tests from 7d378f7, will report back here once they finish. Everything except auth0, gitlab and aws passed and the first two failed due to master being broken. |
pf may use different mechanics for validations so not as relevant in this PR. |
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.
Great!
fixes #1852
#1669 removed the runtime calls to
InternalValidate
to speed up provider startup. This assumed it was called during tfgen but it turns out it was not.This introduces an explicit call to
InternalValidate
during tfgen. Thanks to @t0yv0 for prompting the investigation and @iwahbe for helping with the muxer.To facilitate that, I've added
InternalValidate
to the shim Provider interface. Technically breaking but seems unlikely to be depended on externally.Calling
Validate
does not do the job as that requires passing in a valid config which is not available during tfgen.I've added an e2e test for an sdk provider, need to add one for a pf provider.