fix(firestore-bigquery-export): kit/extension parity - DATABASE_REGION offers europe-north2, northamerica-south1 and asia-southeast3, which can't deploy

Open Beginner friendly
#3,291 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 8 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
firebase, typescript
Domain
backend, cloud

Research direction

Start with the kit's kits/firestore-bigquery-export/src/config.ts, especially the DATABASE_REGION choices at lines 158, 172, and 181. Compare those choices with the Cloud Functions regions available to deploy, then check how #3283 handles rejecting unsupported options. Done means the three regions are removed and rejected when set in .env; verify the affected configuration behavior.

Written by the indexing model from the issue text.

Description

kits parity type: bug

firestore-bigquery-export kit/extension parity. Three DATABASE_REGION choices can never deploy.

Difference

The kit deploys its functions to the region set in DATABASE_REGION. It offers europe-north2, northamerica-south1 and asia-southeast3, but Cloud Functions has no location in any of them: gcloud functions regions list does not include them, while gcloud run regions list does. The extension offers the first two, but it only uses DATABASE_REGION for the trigger region and deploys the function to LOCATION. This is the same problem as #3268 in storage-resize-images.

Reproduced

With DATABASE_REGION=europe-north2 in .env, firebase deploy --only functions (firebase-tools 15.32.0, with the kit's engines.node changed from >=22 to 22, which this CLI version requires) fails before any function is created:

Error: Request to https://cloudfunctions.googleapis.com/v2/projects/<project>/locations/europe-north2/functions:generateUploadUrl had HTTP Error: 403, Location europe-north2 is not found or access is unauthorized.

northamerica-south1 and asia-southeast3 fail with the same error. With europe-west1, the deploy gets past this step. The project's Firestore database was in us-central1, which does not affect the result, since the deploy fails before any trigger is set up.

Code
Resolution

Remove the three options and reject them when set in .env, as #3283 does for storage-resize-images. Mapping them to a nearby region may also work if a Firestore trigger can reach a function in another region, as the extension's does, but that has not been tested for the kit.

Dominant language
TypeScript
Stars
979
Forks
434
Avg merge
10d 8h
Merged PRs (30d)
28

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/extensions

All issues in firebase/extensions

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.