[Bug] Land returns codes.Unknown instead of InvalidArgument for an unrecognized strategy
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 22/100
Hướng nghiên cứu
Start in service/submitqueue/gateway/server/mapper/land.go, where ProtoToLandRequest and resolveLandStrategy return a plain fmt.Errorf for an unknown strategy. Then check gatewayStatusError to see how it classifies errors via controller.IsInvalidRequest. Done means the mapper error is wrapped as a user error so status.Code(err) returns InvalidArgument. Pull request #997 is already open against this, so check it before starting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
SubmitQueueGateway.Land called with an unrecognized Strategy enum value (for example one sent by a newer client) is answered with gRPC Unknown instead of InvalidArgument. mapper.ProtoToLandRequest returns a plain fmt.Errorf, and gatewayStatusError passes unclassified errors through unchanged, so gRPC reports Unknown. Every other invalid-input error from Land is classified as a user error and surfaces as InvalidArgument.
Steps to Reproduce
- Start the local stack (
make local-submitqueue-start). - Call
SubmitQueueGateway.Landwith a configured queue, a valid change URI, andStrategy: mergestrategypb.Strategy(9999). - Inspect
status.Code(err).
Expected Behavior
codes.InvalidArgument, consistent with the gateway's other invalid-input errors.
Actual Behavior
codes.Unknown, with the message failed to map land strategy: unknown land strategy in proto message: 9999.
Environment
- Go version: go1.27.1
- OS: Windows
- Bazel version: 8.4.1
Additional Context
resolveLandStrategy and ProtoToLandRequest are in service/submitqueue/gateway/server/mapper/land.go. errs.NewUserError already matches controller.IsInvalidRequest in gatewayStatusError, so wrapping the mapper error is enough. I have a fix ready.
- Ngôn ngữ chính
- Go
- Star
- 247
- Fork
- 16
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 125
Chuẩn bị môi trường
- 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 uber/submitqueue
-
Batch-scoped DLQ reconciler fails requests that another live batch ownsCó thể đã có người làm @burgulvedant đã nhận 14 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
uber/submitqueue#826 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Cancel misses a batch mid-promotion, letting a cancelled request reach speculationCó thể làm lại được @burgulvedant đã nhận 14 ngày trước và không có pull request nào đang mở. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
uber/submitqueue#825 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
uber/submitqueue#824 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
uber/submitqueue#820 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
uber/submitqueue#819 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của uber/submitqueue
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
kubescape/node-agent#1099 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
import-export
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
genealogix/glx#1498 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Docs: 2 broken linksĐang mởBug pulumi/pulumi-terraform-bridge R2 S2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
pulumi/pulumi-terraform-bridge#3713 ·
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 72/100
ossf/pvtr-github-repo-scanner#539 ·
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 75/100
goreleaser/goreleaser#7316 ·
Maintainer thường phản hồi trong vòng 1 ngày