Firebase Functions Python build cannot reliably install private Artifact Registry packages
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- google-cloud, python
- Ambito
- build-system, cloud
Direzione di ricerca
Inizia esaminando il buildpack google.python.pip indicato e il comando python3 -m pip install --requirement requirements.txt nell’immagine builder specificata. Riproduci il problema con il requirements.txt di esempio e verifica le autorizzazioni dell’account di servizio Cloud Build. Il lavoro è completato quando un deployment di Firebase Functions può installare il pacchetto privato di Artifact Registry senza vendorizzazione, pipeline personalizzate o containerizzazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 167
- Fork
- 36
- Merge medio
- 4g 3h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di firebase/firebase-functions-python
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Add support for VPC direct connectForse già presa @IzaakGough l’ha presa 105 giorni fa. Apertafeature-request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
firebase/firebase-functions-python#275 · 1 commento · 1 reazione ·
-
[Bug] stability_digest_payload_from_ce_payload fails with AttributeError: 'dict' object has no attribute 'split'Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug unable to reproduce
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
firebase/firebase-functions-python#260 · 6 commenti ·
-
feature-request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
firebase/firebase-functions-python#249 · 2 commenti ·
-
logging library doesn't support ExceptionsForse già presa @IzaakGough l’ha presa 128 giorni fa. Apertafeature-request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
firebase/firebase-functions-python#172 · 3 commenti ·
Tutte le issue di firebase/firebase-functions-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Clean up dependabot noiseApertaTask
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
war-and-code/dircue#200 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno