-
Notifications
You must be signed in to change notification settings - Fork 40
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
Improve error messages for Invalid or unknown key #1663
Conversation
@@ -1118,8 +1149,8 @@ func TestCheckConfig(t *testing.T) { | |||
}) | |||
require.NoError(t, err) | |||
require.Equal(t, 1, len(resp.Failures)) | |||
require.Equal(t, "could not validate provider configuration: "+ | |||
"Invalid or unknown key. Examine values at 'explicitprovider.requiredprop'.", | |||
require.Equal(t, "could not validate provider configuration: Invalid or unknown key. "+ |
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.
Accidental edit, disregard, this stays the same. The explicit provider error should be very rare as it should be a compilation error typically in TypeScript.
CC @zbuchheit |
pkg/tfbridge/provider_test.go
Outdated
"Did you mean `testprovider:configValue`?", | ||
require.Equal(t, "`testprovider:cofnigValue` is not a valid configuration key for the testprovider provider. "+ | ||
"Did you mean `testprovider:configValue`? "+ | ||
"If the key is not intended for the provider, please choose a different namespace from `testprovider:`.", |
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.
"If the key is not intended for the provider, please choose a different namespace from `testprovider:`.", | |
"If the referenced key is not intended for the provider, please choose a different namespace from `testprovider:`.", |
nit: makes it more specific
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 like a clear improvement.
bf87c5d
to
87e6869
Compare
Per pulumi/pulumi#3546 it is possible that when a user specifies
aws:foo
config in a Pulumi program she is not intending it to be picked up by the aws provider. This change improves the error message emitted in this case to guide the user better.