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/internal/server: stop using a fake xDS client in listenerWrapper tests #6700

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Oct 6, 2023

This is in prep for xDS generic API changes for the server side.

#resource-agnostic-xdsclient-api

RELEASE NOTES: none

@easwars easwars requested a review from zasweq October 6, 2023 18:51
@easwars easwars added this to the 1.60 Release milestone Oct 6, 2023
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #6700 (9f50b09) into master (eb33677) will decrease coverage by 0.20%.
Report is 9 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files

Copy link
Contributor

@zasweq zasweq left a comment

Choose a reason for hiding this comment

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

LGTM.

case <-sCtx.Done():
}

// Configure the management server with a good update that does not contain
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit here and top level: can you explain what makes this update good? (i.e. matching host and port of listener).


// Configure the management server with a listener resource that does not
// match the address to which our listener is bound to.
resources.Listeners = []*v3listenerpb.Listener{e2e.DefaultServerListener(host, port+1, e2e.SecurityLevelNone, route1)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is getting a response from the management server with a host and port that don't match a listeners host/port a common use case? How does it match it up mechanically? A user configures server to listen on certain ports and the management server to specify the logic of the listeners accepted on certain ports?

Comment on lines 195 to 199
oldRBAC := envconfig.XDSRBAC
envconfig.XDSRBAC = true
defer func() {
envconfig.XDSRBAC = oldRBAC
}()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this need to turn on this env var? Is it so this conditional doesn't hit:

if !envconfig.XDSRBAC {
? If so, can you briefly mention why this is turned on. The test above does not turn it on.

select {
case <-ctx.Done():
t.Fatalf("timeout waiting for the ready channel to be written to after receipt of a good Listener update")
t.Fatalf("Timeout waiting for the ready channel to be written to after receipt of a good Listener update")
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like you don't need inline route configuration to trigger ready, just no rds specified in filter chains? Can you test no inline route update/no specified rds name too? I think should become ready too.

Comment on lines +72 to +79
select {
case <-ldsNamesCh:
default:
}
select {
case ldsNamesCh <- req.GetResourceNames():
default:
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Selective sends and selective receives feel scary? I know you explained this in other pr, but why do you need this selectivity? Also, if you receive from the channel, why do you immediately selectively send on it, will it even be possible for another concurrent send to occur in between?

@zasweq zasweq assigned easwars and unassigned zasweq Oct 9, 2023
@easwars easwars merged commit 3e9b85c into grpc:master Oct 13, 2023
13 checks passed
@easwars easwars deleted the xds_server_cleanup_2 branch October 13, 2023 01:00
arvindbr8 pushed a commit to arvindbr8/grpc-go that referenced this pull request Nov 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants