From 7b8a37412b77c72c4cfaf405fc8a099e03f700e6 Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Wed, 29 May 2024 11:42:47 +0200 Subject: [PATCH] feat: propagate per-function timeout in deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Antonio Rodríguez --- src/utils/deploy/hash-fns.ts | 2 ++ src/utils/deploy/upload-files.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/deploy/hash-fns.ts b/src/utils/deploy/hash-fns.ts index 2df80af20df..fb9c85ccbd4 100644 --- a/src/utils/deploy/hash-fns.ts +++ b/src/utils/deploy/hash-fns.ts @@ -169,6 +169,7 @@ const hashFns = async ( runtime, runtimeVersion, trafficRules, + timeout, }) => ({ filepath: functionPath, root: tmpDir, @@ -182,6 +183,7 @@ const hashFns = async ( displayName, generator, invocationMode, + timeout, buildData, priority, trafficRules, diff --git a/src/utils/deploy/upload-files.ts b/src/utils/deploy/upload-files.ts index 92a1d02fceb..15f0aa6f27f 100644 --- a/src/utils/deploy/upload-files.ts +++ b/src/utils/deploy/upload-files.ts @@ -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) @@ -47,6 +47,7 @@ const uploadFiles = async (api, deployId, uploadList, { concurrentUpload, maxRet body: readStreamCtor, deployId, invocationMode, + timeout, name: encodeURI(normalizedPath), runtime, }