V4 - sls deploy does not throw if handler path is incorrect or does not exist
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
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- aws, javascript
Hướng nghiên cứu
Bắt đầu bằng cách xác định các entry point của deploy và package, rồi tái hiện trường hợp serverless.yml được cung cấp với handler không tồn tại madeUpPath. Theo dõi cách các đường dẫn handler được xác thực trong quá trình đóng gói và triển khai; công việc được xem là hoàn tất khi cả hai hàm đều từ chối đường dẫn handler không hợp lệ hoặc bị thiếu thay vì âm thầm thực thi thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Issue description
We experienced a bug recently because the path to a handler in our serverless.yml was incorrect but sls deploy succeeded, giving no indication that anything was wrong. On inspection, the only indicator was that the file size for the deployed zip was 1.2kb.
The deploy and package functions should throw if a path is invalid
Context
service: test-api
package:
individually: true
build:
esbuild:
configFile: ./config/esbuild.config.js
provider:
name: aws
profile: ***
deploymentMethod: direct
versionFunctions: false
runtime: nodejs22.x
memorySize: 1536
region: ${opt:region, 'eu-west-2'}
stage: ${opt:stage}
functions:
testHandler:
handler: handlers/madeUpPath.default <-- does not exist
Output when running sls deploy function -f testHandler -s dev:
⠏ Initializing(node:42618) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Deploying function "testHandler" to stage "dev" (eu-west-2)
Loading AppSync config
⠋ Uploading (1.2 kB)
✔ Function code deployed (1s)
Retrying configuration update for function: testHandler. Reason: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:eu-west-2:531882032324:function:test-api-dev-testHandler
✔ Function configuration updated (2s)
Retrying ensure function state for function: testHandler.
Retrying ensure function state for function: testHandler.
- Ngôn ngữ chính
- JavaScript
- Star
- 46.9k
- Fork
- 5.7k
- Merge trung bình
- 12 giờ 57 phút
- Pull request đã merge (30 ngày)
- 61
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
-
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 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
serverless/serverless#13889 · 1 bình luận · 1 người được giao ·
-
serverless/serverless#13877 · 1 reaction · 1 người được giao ·
-
bug
serverless/serverless#13876 · 1 người được giao ·
-
bug cat/aws-iam
serverless/serverless#13872 · 1 người được giao ·
Tất cả issue của serverless/serverless
Issue tương tự
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/safe-publish#594 ·
-
内部文件键(绝对路径的 base64)泄漏到界面标签 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NousResearch/hermes-agent#121143 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100