-
Notifications
You must be signed in to change notification settings - Fork 226
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
update test fn-render/multiple-fnconfig #1839
update test fn-render/multiple-fnconfig #1839
Conversation
LGTM |
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.
Approving this to enable the testcase, but I would really like the error message improvement as a followup PR.
@@ -13,4 +13,4 @@ | |||
# limitations under the License. | |||
|
|||
exitCode: 1 | |||
skip: true # TODO: enable once the testcase is supported | |||
stdErr: "following fields are mutually exclusive: 'config', 'configMap', 'configPath'. Got \"configPath, configMap\"" |
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.
We should address the following in a followup PR:
Improve the error message to fit our error-style ?
Wondering how to convey oneOf
fields in more user friendly way: One option could be:
"function config must have only config
or configMap
or configPath
input"
We also need the pkg and function involved in this error to make it really actionable. I have some ideas on introducing a new validationError
, let have a chat offline about that.
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.
Yes, every message needs to meet go/kpt-errors-style-guide.
In this case, I see the following issues:
- We should tell users why they CAN do. They can specify only one of the 3 fields.
- Quotation issue:
"configPath, configMap"
(The user is not providing a string with value ofConfigPath, configMap
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.
Added a comment about this to #1557; let me know if there should be a separate issue instead.
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.
For a specific error message I think we should create a separate issue otherwise #1557 will be longer and longer.
This test case passes so we don't need to skip it