-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xds: fix support for circuit breakers in LOGICAL_DNS clusters #8169
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8169 +/- ##
==========================================
- Coverage 82.25% 82.07% -0.19%
==========================================
Files 393 410 +17
Lines 39143 40235 +1092
==========================================
+ Hits 32197 33021 +824
- Misses 5616 5851 +235
- Partials 1330 1363 +33
🚀 New features to boost your workflow:
|
func (s) TestCircuitBreaking(t *testing.T) { | ||
const maxRequests = 3 | ||
// Create an xDS management server that serves ADS and LRS requests. | ||
mgmtServer := e2e.StartManagementServer(t, e2e.ManagementServerOptions{SupportLoadReportingService: true}) |
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.
nit: Do we need to server LRS for this test?
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.
Nope. This was copy/pasted from another test that probably did.
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.
You need not set SupportLoadReportingService: true
if LRS is not needed
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.
Ah sorry I thought you were just talking about the comment.
return | ||
} | ||
if err == nil { | ||
stream.CloseSend() |
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.
nit: may be comment saying we are closing unintended new streams?
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
func (s) TestCircuitBreakingLogicalDNS(t *testing.T) { | ||
const maxRequests = 3 | ||
// Create an xDS management server that serves ADS and LRS requests. | ||
mgmtServer := e2e.StartManagementServer(t, e2e.ManagementServerOptions{SupportLoadReportingService: true}) |
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.
same. Do we need LRS for this test?
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
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.
same. Don't set SupportLoadReportingService: true
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
host, port := hostAndPortFromAddress(t, server.Address) | ||
|
||
// Configure the xDS management server with default resources. Override the | ||
// default cluster to include an LRS server config pointing to self. |
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.
default cluster to include an LRS server config pointing to self.
not LRS server. Comment should mention CircuitBreakers ?
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
Thanks, PTAL |
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. Kept some comments unresolved. PTAL
func (s) TestCircuitBreaking(t *testing.T) { | ||
const maxRequests = 3 | ||
// Create an xDS management server that serves ADS and LRS requests. | ||
mgmtServer := e2e.StartManagementServer(t, e2e.ManagementServerOptions{SupportLoadReportingService: true}) |
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.
You need not set SupportLoadReportingService: true
if LRS is not needed
defer server.Stop() | ||
|
||
// Configure the xDS management server with default resources. Override the | ||
// default cluster to include an LRS server config pointing to self. |
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.
default cluster to include an LRS server config pointing to self.
need to change this as well
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
func (s) TestCircuitBreakingLogicalDNS(t *testing.T) { | ||
const maxRequests = 3 | ||
// Create an xDS management server that serves ADS and LRS requests. | ||
mgmtServer := e2e.StartManagementServer(t, e2e.ManagementServerOptions{SupportLoadReportingService: true}) |
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.
same. Don't set SupportLoadReportingService: true
Doesn't look like related to change but since its xds test, might be good to confirm https://github.com/grpc/grpc-go/actions/runs/13932590107/job/38993150684?pr=8169 |
Filed #8185 for the flake. |
Previously this setting was only plumbed to EDS, which meant it didn't apply to LOGICAL_DNS, but it should apply to both.
RELEASE NOTES: