From 576b6be90dcf88ac233873c46add158a8045c482 Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Wed, 27 Sep 2023 11:45:16 -0700 Subject: [PATCH] Correctly set FUNCTION_TARGET for grouped functions --- CHANGELOG.md | 6 +----- src/gcp/cloudfunctionsv2.ts | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 398cb139bd7..226c0c943b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1 @@ -- Improve performance and reliability when deploying multiple 2nd gen functions using single builds. (#6376) -- Fixed an issue where `emulators:export` did not check if the target folder is empty. (#6313) -- Fixed an issue where retry could not be set for event triggered functions. (#6391) -- Fixed "Could not find the next executable" on Next.js deployments (#6372) -- Fixed issues caused by breaking changes in Next >=v13.5.0. (#6382) +- Fixed an issue with deploying function groups containing v2 functions. (#6408) diff --git a/src/gcp/cloudfunctionsv2.ts b/src/gcp/cloudfunctionsv2.ts index 4f4912c0426..520e8e7967f 100644 --- a/src/gcp/cloudfunctionsv2.ts +++ b/src/gcp/cloudfunctionsv2.ts @@ -331,7 +331,7 @@ export async function createFunction(cloudFunction: InputCloudFunction): Promise cloudFunction.serviceConfig.environmentVariables = { ...cloudFunction.serviceConfig.environmentVariables, - FUNCTION_TARGET: functionId, + FUNCTION_TARGET: functionId.replace("-", "."), }; try { @@ -439,7 +439,7 @@ export async function updateFunction(cloudFunction: InputCloudFunction): Promise cloudFunction.serviceConfig.environmentVariables = { ...cloudFunction.serviceConfig.environmentVariables, - FUNCTION_TARGET: functionId, + FUNCTION_TARGET: functionId.replace("-", "."), }; try {