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

Abierto Apto para principiantes
#3,291 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
75/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
firebase, typescript
Área
backend, cloud

Línea de trabajo

Empieza por kits/firestore-bigquery-export/src/config.ts del kit, especialmente por las opciones de DATABASE_REGION en las líneas 158, 172 y 181. Compara esas opciones con las regiones de Cloud Functions disponibles para el despliegue y luego comprueba cómo #3283 gestiona el rechazo de opciones no compatibles. El trabajo estará terminado cuando se eliminen las tres regiones y se rechacen si se establecen en .env; verifica el comportamiento de la configuración afectada.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
979
Forks
436
Merge medio
2 d 13 h
PR fusionados (30 d)
18

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de firebase/extensions

Todos los issues de firebase/extensions

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.