-
Notifications
You must be signed in to change notification settings - Fork 74
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
Auto supply a dummy API GW token #1068
Auto supply a dummy API GW token #1068
Conversation
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.
Please use constant and provide feedback to user that a default value will be used and display that value (i.e., "DUMMY TOKEN").
parsers/manifest_parser.go
Outdated
wski18n.ID_MSG_CONFIG_MISSING_APIGW_ACCESS_TOKEN) | ||
warningString := wski18n.T(wski18n.ID_MSG_CONFIG_MISSING_APIGW_ACCESS_TOKEN) | ||
wskprint.PrintOpenWhiskWarning(warningString) | ||
client.ApigwAccessToken = "DUMMY TOKEN" |
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.
Could we make the string "DUMMY TOKEN" a package constant and also "wskprint" that we are using a default string with the value "DUMMY TOKEN" so it is clear utility is providing a default behavior (due to lack of explicit value)?
@jiangpengcheng Thanks for finding and making this correction. If you make these simple changes requested in the review comments, I plan to merge. |
0805ede
to
9317b6b
Compare
ok, I use a constant for the dummy token, and print a more clear message for users |
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.
Excellent use of the i18n resource files.
Since the
APIGW_ACCESS_TOKEN
is an optinal parameter, and the actionapimgmt/createApi
do require this parameter no matter what the value is, I think it's better to provide a fake token just like the openwhisk-cli did, see api.go:related to: #1037