Firebase Functions Python build cannot reliably install private Artifact Registry packages
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- google-cloud, python
- Área
- build-system, cloud
Línea de trabajo
Comienza revisando el buildpack google.python.pip indicado y el comando python3 -m pip install --requirement requirements.txt en la imagen de builder especificada. Reproduce el fallo con el requirements.txt de ejemplo y verifica los permisos de la cuenta de servicio de Cloud Build. Se considera terminado cuando un despliegue de Firebase Functions puede instalar el paquete privado de Artifact Registry sin vendorizarlo, usar pipelines personalizados ni recurrir a la contenerización.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Deploying Firebase Functions written in Python cannot reliably install private Python packages hosted in Google Artifact Registry using the documented authentication mechanism.
Although Artifact Registry supports authentication via the keyrings.google-artifactregistry-auth backend, the Firebase Functions build process installs dependencies in a single pip invocation. This creates a bootstrapping problem where the authentication backend must already be installed before pip attempts to resolve private dependencies.
As a result, private packages cannot be consumed out-of-the-box during function deployment causing deployment issues and ultimately meaning private packages cannot be consumed in firebase functions. Private Python packages are a common pattern for shared internal libraries, and the current limitation makes this workflow difficult.
Expected Behaviour
A Firebase Functions deployment should be able to install private Python packages hosted in Artifact Registry without requiring custom build pipelines, vendored wheels, or containerization.
For example, the following requirements.txt should work:
--extra-index-url https://<LOCATION>-python.pkg.dev/<PROJECT>/<REPO>/simple/
private-package==0.0.1
provided that:
- the Cloud Build service account has artifactregistry.reader
- the repository contains the package
Actual Behaviour
The Artifact Registry authentication mechanism requires the keyring backend to be present before pip attempts to fetch packages.
However pip resolves and downloads packages before installing their dependencies, meaning that adding the backend as a dependency does not help.
Example attempt:
--extra-index-url https://<LOCATION>-python.pkg.dev/<PROJECT>/<REPO>/simple/
keyring
keyrings.google-artifactregistry-auth
private-package==0.0.1
This still fails because pip attempts to resolve private-package before installing the keyring backend. This creates a bootstrap race condition
Why this is a Problem
The current behavior makes it effectively impossible to use private Artifact Registry Python packages with Firebase Functions without workarounds such as:
- vendoring wheels into the repository
- migrating to cloud run where the build process can be controlled
Environment Details
Builder image:
europe-west2-docker.pkg.dev/serverless-runtimes/google-22-full/builder/python:python_20260224_RC00_lightweight
Buildpacks used:
google.utils.archive-source
google.python.runtime
google.python.functions-framework
google.python.pip
google.utils.label-image
google.python.link-runtime
The pip step is executed as:
python3 -m pip install --requirement requirements.txt
Python runtime:
Python 3.13.12
Suggested Solutions
Option 1: Preinstall Artifact Registry authentication backend
Ensure the build environment includes:
keyring
keyrings.google-artifactregistry-auth
before the pip install step.
Option 2: Two-phase dependency install
Modify the Python buildpack to run:
pip install keyring keyrings.google-artifactregistry-auth
pip install -r requirements.txt
- Lenguaje dominante
- Python
- Estrellas
- 167
- Forks
- 36
- Merge medio
- 4 d 3 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de firebase/firebase-functions-python
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
HttpsError.__init__ does not pass message to super().__init__()Posiblemente ocupada @Aayush99910 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
firebase/firebase-functions-python#314 · 1 comentario ·
-
Add support for VPC direct connectPosiblemente ocupada @IzaakGough la tomó hace 105 días. Abiertofeature-request
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
firebase/firebase-functions-python#275 · 1 comentario · 1 reacción ·
-
[Bug] stability_digest_payload_from_ce_payload fails with AttributeError: 'dict' object has no attribute 'split'Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug unable to reproduce
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
firebase/firebase-functions-python#260 · 6 comentarios ·
-
feature-request
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
firebase/firebase-functions-python#249 · 2 comentarios ·
Todos los issues de firebase/firebase-functions-python
Issues similares
-
area/install reliability
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
FluidNumerics/fluid-walk-blocker#191 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
TransformerLensOrg/TransformerLens#1868 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
climate-analytics-lab/jax-gcm#1057 ·
Los mantenedores suelen responder en 1 día