-
Notifications
You must be signed in to change notification settings - Fork 35
fix provision cases #52
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
Conversation
|
||
before(async function () { | ||
await createServiceAndFunction(client, serviceName, functionName, 'main.handler'); | ||
await client.publishVersion(serviceName, 'test version 1'); |
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.
为什么 publishVersion 的时候用的是 'test version 1',但 createAlias 的时候用的 versionId 是 '1',不需要对上么?
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.
'test version 1' 是 version 的 description,version 是自增的,不受用户指定。第一次发布的 versionId 就是 1
* @return {Promise} 返回 Object(包含 headers 和 data 属性[provisionConfig 信息]) | ||
*/ | ||
getProvisionConfig(serviceName, functionName, headers = {}, qualifier) { | ||
getProvisionConfig(serviceName, functionName, qualifier, headers = {}, ) { |
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.
good, 这个是新的接口, 之前的发布的npm 包还没有这个接口, headers 可以放在最后
之前有的老接口将 qualifier 放在后面, 是会怕给用户的函数 break change, 不能向下兼容
if (responseBody.ErrorMessage) { | ||
errMsg = responseBody.ErrorMessage; | ||
} else { | ||
errMsg = responseBody.errorMessage; |
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.
为什么会有这个大小写 message 的区别
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.
之前的 sdk 如果是 http function,errMessage 没有透传出来,被 sdk 吞掉了,因为 http function 的错误信息在 body 里是 errorMessage,而 sdk 里只拿了 ErrorMessage
runtime: 'nodejs6', | ||
timeout: 10, | ||
code: { | ||
zipFile: fs.readFileSync(path.join(__dirname, 'figures/test.zip'), 'base64') |
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.
change 里面没有看到 test.zip?
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.
对,*.zip 在 .gitignore 里,test.zip 是 makefile 生成的
}); | ||
}; | ||
|
||
module.exports.http_function_err_handler = function (request, response, context) { |
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.
�这个函数有啥错误呢
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.
函数拼写错误,toSting()->toString()
No description provided.