Skip to content

Commit

Permalink
feat: propagate per-function timeout in deploy (#6676)
Browse files Browse the repository at this point in the history
Co-authored-by: Antonio Rodríguez <[email protected]>
  • Loading branch information
Skn0tt and biruwon authored May 29, 2024
1 parent b0e512e commit f3cc8cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/utils/deploy/hash-fns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ const hashFns = async (
runtime,
runtimeVersion,
trafficRules,
timeout,
}) => ({
filepath: functionPath,
root: tmpDir,
Expand All @@ -182,6 +183,7 @@ const hashFns = async (
displayName,
generator,
invocationMode,
timeout,
buildData,
priority,
trafficRules,
Expand Down
3 changes: 2 additions & 1 deletion src/utils/deploy/upload-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const uploadFiles = async (api, deployId, uploadList, { concurrentUpload, maxRet

// @ts-expect-error TS(7006) FIXME: Parameter 'fileObj' implicitly has an 'any' type.
const uploadFile = async (fileObj, index) => {
const { assetType, body, filepath, invocationMode, normalizedPath, runtime } = fileObj
const { assetType, body, filepath, invocationMode, normalizedPath, runtime, timeout } = fileObj

const readStreamCtor = () => body ?? fs.createReadStream(filepath)

Expand Down Expand Up @@ -47,6 +47,7 @@ const uploadFiles = async (api, deployId, uploadList, { concurrentUpload, maxRet
body: readStreamCtor,
deployId,
invocationMode,
timeout,
name: encodeURI(normalizedPath),
runtime,
}
Expand Down

2 comments on commit f3cc8cc

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,235
  • Package size: 295 MB
  • Number of ts-expect-error directives: 989

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,235
  • Package size: 295 MB
  • Number of ts-expect-error directives: 989

Please sign in to comment.