[Bug] Land returns codes.Unknown instead of InvalidArgument for an unrecognized strategy
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 22/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 247
- Forks
- 16
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 125
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uber/submitqueue
-
Batch-scoped DLQ reconciler fails requests that another live batch ownsPossibly taken @burgulvedant claimed this 14 days ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
uber/submitqueue#826 · 1 comment ·
Maintainers usually reply within 2 days
-
Cancel misses a batch mid-promotion, letting a cancelled request reach speculationMay be free again @burgulvedant claimed this 14 days ago, and no pull request is open. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
uber/submitqueue#825 · 1 comment ·
Maintainers usually reply within 2 days
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
uber/submitqueue#824 · 2 comments ·
Maintainers usually reply within 2 days
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
uber/submitqueue#820 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
uber/submitqueue#819 · 1 comment ·
Maintainers usually reply within 2 days
All issues in uber/submitqueue
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
kubescape/node-agent#1099 ·
Maintainers usually reply within 1 day
-
import-export
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
genealogix/glx#1498 ·
Maintainers usually reply within 2 days
-
Docs: 2 broken linksOpenBug pulumi/pulumi-terraform-bridge R2 S2
Difficulty 1/5 Under an hour Newbie friendliness 72/100
pulumi/pulumi-terraform-bridge#3713 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ossf/pvtr-github-repo-scanner#539 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
goreleaser/goreleaser#7316 ·
Maintainers usually reply within 1 day