Skip to content
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

Merged
merged 3 commits into from
Mar 20, 2025

Conversation

dfawley
Copy link
Member

@dfawley dfawley commented Mar 13, 2025

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:

  • xds: fix support for circuit breakers in LOGICAL_DNS clusters

@dfawley dfawley added this to the 1.72 Release milestone Mar 13, 2025
@dfawley dfawley requested a review from purnesh42H March 13, 2025 18:28
Copy link

codecov bot commented Mar 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.07%. Comparing base (775150f) to head (3bc9d53).
Report is 7 commits behind head on master.

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     
Files with missing lines Coverage Δ
xds/internal/balancer/cdsbalancer/cdsbalancer.go 84.59% <100.00%> (+0.03%) ⬆️
...internal/balancer/clusterresolver/configbuilder.go 91.12% <100.00%> (+0.05%) ⬆️

... and 43 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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})
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Member Author

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()
Copy link
Contributor

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?

Copy link
Member Author

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})
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

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

Copy link
Member Author

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.
Copy link
Contributor

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 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@purnesh42H purnesh42H assigned dfawley and unassigned purnesh42H Mar 18, 2025
@dfawley
Copy link
Member Author

dfawley commented Mar 18, 2025

Thanks, PTAL

@dfawley dfawley assigned purnesh42H and unassigned dfawley Mar 18, 2025
Copy link
Contributor

@purnesh42H purnesh42H left a 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})
Copy link
Contributor

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.
Copy link
Contributor

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

Copy link
Member Author

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})
Copy link
Contributor

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

@purnesh42H
Copy link
Contributor

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

@purnesh42H purnesh42H assigned dfawley and unassigned purnesh42H Mar 19, 2025
@dfawley
Copy link
Member Author

dfawley commented Mar 19, 2025

Doesn't look like related to change but since its xds test, might be good to confirm grpc/grpc-go/actions/runs/13932590107/job/38993150684?pr=8169

Filed #8185 for the flake.

@dfawley dfawley merged commit ce2fded into grpc:master Mar 20, 2025
15 checks passed
@dfawley dfawley deleted the logical_dns_cb branch March 20, 2025 19:55
janardhanvissa pushed a commit to janardhanvissa/grpc-go that referenced this pull request Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants