-
Notifications
You must be signed in to change notification settings - Fork 74
Return 429 when ingress if sending too man messages, instead of 500 #1737
Return 429 when ingress if sending too man messages, instead of 500 #1737
Conversation
pkg/broker/ingress/errors.go
Outdated
@@ -28,3 +28,6 @@ var ErrIncomplete = errors.New("incomplete config") | |||
|
|||
// ErrNotReady is the error when a broker is not ready. | |||
var ErrNotReady = errors.New("not ready") | |||
|
|||
// ErrOverflow is the error when a broker ingress is sending too many requests to PubSub. | |||
var ErrOverflow = errors.New("bundler reached buffered byte limit") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you import bundler.ErrOverflow
rather than redefine it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
I'm not too familiar with the code yet, but this change doesn't seem like something easily testable in our unit tests. Is it ok for me to push this without tests? @Harwayne |
The following jobs failed:
Automatically retrying due to test flakiness... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
I'll leave approval to someone more familiar with the Broker area.
/cc @yolocs |
You can actually test this code. You can have a fake |
The following is the coverage report on the affected files.
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tayarani, yolocs The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #1697
Proposed Changes
Release Note
Docs