-
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
chore: better type checking error messages #1997
Conversation
This is what the error message looks like ```console aws:ecs:Service (service): warning: Type checking failed: Unexpected type at field networkConfiguration.subnets: expected array type, got string type warning: Type checking is still experimental. If you believe that a warning is incorrect, please let us know by creating an issue at https://github.com/pulumi/pulumi-terraform-bridge/issues. This will become a hard error in the future. ``` fixes #1986
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1997 +/- ##
==========================================
+ Coverage 60.87% 60.90% +0.03%
==========================================
Files 332 332
Lines 44756 44761 +5
==========================================
+ Hits 27243 27260 +17
+ Misses 15990 15978 -12
Partials 1523 1523 ☔ 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.
Let's make sure we have a test for this. That way we can see (in repo) what the error message looks like.
Co-authored-by: Ian Wahbe <ian@wahbe.com>
|
||
// run 'go test -run=TestCheckWarnings -v ./pkg/tfbridge/ -update' to update | ||
autogold.Expect(`warning: Type checking failed: | ||
warning: Unexpected type at field "networkConfiguration": |
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.
Each time you call logger.Warn()
it prints out warning:
. Personally I don't mind this.
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!
Thanks for getting this in.
This is what the error message looks like
fixes #1986