Skip to content

Commit

Permalink
Merge pull request #19 from devsapp/fix#fc-460
Browse files Browse the repository at this point in the history
fix: invoke function carry X-Fc-Invocation-Code-Version:Latest
  • Loading branch information
wss-git authored Dec 23, 2021
2 parents f0468ed + 24e0676 commit 0bc9d61
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/remote-invoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export default class RemoteInvoke {
if (invocationType === 'Sync') {
const rs = await this.fcClient.invokeFunction(serviceName, functionName, event, {
'X-Fc-Log-Type': 'Tail',
'X-Fc-Invocation-Code-Version': 'Latest',
'X-Fc-Invocation-Type': invocationType,
}, qualifier);

Expand All @@ -92,6 +93,7 @@ export default class RemoteInvoke {
} else {
logger.debug(`Stateful async invocation id: ${statefulAsyncInvocationId}`);
const { headers } = await this.fcClient.invokeFunction(serviceName, functionName, event, {
'X-Fc-Invocation-Code-Version': 'Latest',
'X-Fc-Invocation-Type': invocationType,
'X-Fc-Stateful-Async-Invocation-Id': statefulAsyncInvocationId,
}, qualifier);
Expand All @@ -118,6 +120,9 @@ export default class RemoteInvoke {
if (!headers['X-Fc-Log-Type']) {
headers['X-Fc-Log-Type'] = 'Tail';
}
if (!headers['X-Fc-Invocation-Code-Version']) {
headers['X-Fc-Invocation-Code-Version'] = 'Latest';
}

let resp;
try {
Expand Down

0 comments on commit 0bc9d61

Please sign in to comment.