-
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
Reduce tfgen failing example warning verbosity #1843
Conversation
pkg/tfgen/convert_cli_test.go
Outdated
* <nil>: unexpected HCL snippet in Convert "\nThis is some intentionally broken HCL that should not convert.\n{}"; | ||
* <nil>: unexpected HCL snippet in Convert "\nThis is some intentionally broken HCL that should not convert.\n{}"; | ||
* <nil>: unexpected HCL snippet in Convert "\nThis is some intentionally broken HCL that should not convert.\n{}"; | ||
autogold.Expect(`warning: unable to convert HCL example for Pulumi entity '#/resources/azure:webpubsub/customCertificate:CustomCertificate': 1 error occurred: |
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 change demonstrates how stderr is affected.
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.
I had a couple questions, and I would like to see a few comments explaining our approach to consolidating the errors but this looks good to me.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1843 +/- ##
==========================================
- Coverage 60.91% 60.51% -0.40%
==========================================
Files 303 310 +7
Lines 42431 42822 +391
==========================================
+ Hits 25847 25914 +67
- Misses 15121 15439 +318
- Partials 1463 1469 +6 ☔ View full report in Codecov by Sentry. |
Missed handling the partial failure case that's still super duplicative. Adding a few more commits here shortly. |
Done now |
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.
LGTM
Before this change we emitted a lot of duplicated warnings for examples that failed to convert. This change removes the
duplication and aggregates similar errors so that when every language conversion fails with the same error, which is
common when the failure pertains to the HCL->PCL pass of the conversion, we get one warning only not many.