Skip to content

Commit a605414

Browse files
wandamoraajperel
andauthored
refactor: resolve function regions during build phase to fix VPC connectors (#10471)
* Attempt to resolve function regions earlier before used for VPC. * lint fixes * Check for REGION_TBD, update tests * Add CHANGELOG entry --------- Co-authored-by: Andy Perelson <ajp@google.com>
1 parent 205b5f8 commit a605414

4 files changed

Lines changed: 223 additions & 237 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
- Updated Pub/Sub emulator to version 0.8.31
2+
- Resolves undefined regions earlier, during the build to backend resolution phase (#10471)

src/deploy/functions/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ export type Endpoint = Triggered & {
257257
// Defaults to the compute service account when a function is first created as a GCF gen 2 function.
258258
serviceAccount?: ServiceAccount | Expression<string> | null;
259259

260-
// defaults to ["us-central1"], overridable in firebase-tools with
261-
// process.env.FIREBASE_FUNCTIONS_DEFAULT_REGION
260+
// Defaults to REGION_TBD. The deployment region is resolved dynamically at deploy-time
261+
// based on event trigger sources or matching existing functions, falling back to "us-central1".
262262
region?: ListField;
263263

264264
// The Cloud project associated with this endpoint.

0 commit comments

Comments
 (0)