Separate dependency for each layer using a separate requirements.txt file
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách xem xét việc xử lý tích hợp layer: true của serverless-python-requirements và cách các dependency của layer được cấu hình. Tái tạo ví dụ ba layer với các file dependency riêng cho ulid, pydantic và FastAPI. Được xem là hoàn tất khi mỗi layer đã cấu hình chỉ chứa các dependency dành cho nó và có các test bao quát hành vi đóng gói.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is there an existing issue for this?
- I have searched existing issues, it hasn't been reported yet
Use case description
Hello everyone.
After incorporating serverless-python-requirements into the framework, I encountered a problem: there's no way to create separate layers, each with its own dependencies.
Let's say I have three functions:
cognito_post_confirmation - it only needs pydantic
cognito_post_authentication - it only needs ulid
shop - it needs FastAPI, meaning it will automatically install pydantic
To keep size of functions small and uptimize coldstart, my idea was to create three layers:
clear - for functions with minimal packages - only ulid
pydantic - for functions that only require pydantic
fastapi - for functions that require FastaAPI
and I'll include these layers in the corresponding functions.
As far as I know, the serverless-python-requirements plugin allows you to set dependencies for layers. However, in new versions of the serverless framework, it has been integrated into the framework, and now the "layer: true" parameter builds a single dependency layer, uniform for all. Question:
- Am I misunderstanding something?
- Is there another way to set a separate dependency for each layer using a separate requirements.txt file?
Proposed solution (optional)
No response
- Ngôn ngữ chính
- JavaScript
- Star
- 46.9k
- Fork
- 5.7k
- Merge trung bình
- 1 ngày 25 phút
- Pull request đã merge (30 ngày)
- 65
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- 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 serverless/serverless
-
excludeNodeDevDependencies includes all dev dependencies if serviceDir has symlinksCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug cat/packaging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
serverless/serverless#13447 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
serverless dev silently skips functions beyond the 25th: "Maximum queued offline subscription reached"Có thể đã có người làm @czubocha đã nhận 10 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
serverless/serverless#13920 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Sandbox packages (zips) are not cleared from deployment bucket as stack dirs areCó thể đã có người làm @czubocha đã nhận 13 ngày trước. Đang mởbug cat/packaging
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
serverless/serverless#13906 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Terraform S3 resolver: unbounded, un-deduplicated concurrent state fetches cause intermittent `Error: aborted` under serverless-composeCó thể đã có người làm @czubocha đã nhận 33 ngày trước. Đang mở
serverless/serverless#13844 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cat/packaging enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
serverless/serverless#13701 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của serverless/serverless
Issue tương tự
-
Harden bayesian-waves-bg.js: add prefers-reduced-motion, pointer-events guard, and hidden-tab pauseĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
njitacm/njit-acm-website#109 ·
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
blamechris/chroxy#8579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
modusensus/dsh-mneme#411 ·
-
Flaky (suspected): VideoTimelineEditor bed audio test sees 600px instead of 120px under CI loadĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày