Firebase Functions Python build cannot reliably install private Artifact Registry packages
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- google-cloud, python
- Lĩnh vực
- build-system, cloud
Hướng nghiên cứu
Bắt đầu bằng cách xem xét buildpack google.python.pip được liệt kê và lệnh python3 -m pip install --requirement requirements.txt trong builder image được chỉ định. Tái hiện lỗi với requirements.txt mẫu và xác minh các quyền của tài khoản dịch vụ Cloud Build. Được xem là hoàn tất khi một lần triển khai Firebase Functions có thể cài đặt gói riêng tư của Artifact Registry mà không cần vendoring, pipeline tùy chỉnh hoặc containerization.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 167
- Fork
- 36
- Merge trung bình
- 4 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-functions-python
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
HttpsError.__init__ does not pass message to super().__init__()Có thể đã có người làm @Aayush99910 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
firebase/firebase-functions-python#314 · 1 bình luận ·
-
Add support for VPC direct connectCó thể đã có người làm @IzaakGough đã nhận 105 ngày trước. Đang mởfeature-request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
firebase/firebase-functions-python#275 · 1 bình luận · 1 reaction ·
-
[Bug] stability_digest_payload_from_ce_payload fails with AttributeError: 'dict' object has no attribute 'split'Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug unable to reproduce
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
firebase/firebase-functions-python#260 · 6 bình luận ·
-
feature-request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
firebase/firebase-functions-python#249 · 2 bình luận ·
Tất cả issue của firebase/firebase-functions-python
Issue tương tự
-
area/install reliability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
FluidNumerics/fluid-walk-blocker#191 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
TransformerLensOrg/TransformerLens#1868 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
climate-analytics-lab/jax-gcm#1057 ·
Maintainer thường phản hồi trong vòng 1 ngày