Firebase Functions Python build cannot reliably install private Artifact Registry packages
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- google-cloud, python
- 領域
- build-system, cloud
調査の方向性
まず、指定された builder image で、記載されている google.python.pip buildpack とコマンド python3 -m pip install --requirement requirements.txt を確認します。サンプルの requirements.txt を使って失敗を再現し、Cloud Build サービス アカウントの権限を確認します。Firebase Functions のデプロイで、vendoring、カスタムパイプライン、コンテナ化を行わずに非公開の Artifact Registry パッケージをインストールできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 167
- フォーク
- 36
- 平均マージ
- 4日 3時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-functions-python のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
HttpsError.__init__ does not pass message to super().__init__()対応中かも @Aayush99910 が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
firebase/firebase-functions-python#314 · コメント 1 件 ·
-
Add support for VPC direct connect対応中かも @IzaakGough が 105 日前に担当しました。 オープンfeature-request
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
firebase/firebase-functions-python#275 · コメント 1 件 · リアクション 1 件 ·
-
[Bug] stability_digest_payload_from_ce_payload fails with AttributeError: 'dict' object has no attribute 'split'再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug unable to reproduce
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
firebase/firebase-functions-python#260 · コメント 6 件 ·
-
feature-request
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
firebase/firebase-functions-python#249 · コメント 2 件 ·
firebase/firebase-functions-python の issue をすべて見る
似ている issue
-
area/install reliability
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
FluidNumerics/fluid-walk-blocker#191 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
TransformerLensOrg/TransformerLens#1868 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
climate-analytics-lab/jax-gcm#1057 ·
メンテナーはふだん 1 日以内に返信