Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8ed3eef
cds/eds
eshitachandwani Dec 4, 2025
a2479e4
change
eshitachandwani Dec 4, 2025
ae5251b
spelling
eshitachandwani Dec 4, 2025
b8a6507
spelling
eshitachandwani Dec 4, 2025
4084ae5
all correct
eshitachandwani Dec 4, 2025
4862844
order not checked
eshitachandwani Dec 4, 2025
15cc42e
1st set of comment
eshitachandwani Dec 9, 2025
ed3c1eb
change set to use bool in place of struct
eshitachandwani Dec 9, 2025
4b86074
comment lengths
eshitachandwani Dec 9, 2025
e369eeb
resolve comments
eshitachandwani Dec 12, 2025
a98e575
resolvenow coment
eshitachandwani Dec 12, 2025
f04a355
report error for resolver error
eshitachandwani Dec 12, 2025
0da35e0
generics try
eshitachandwani Dec 12, 2025
1de452e
resolve comments
eshitachandwani Dec 12, 2025
5ba419b
test formatting
eshitachandwani Dec 12, 2025
d4836bb
changes
eshitachandwani Dec 16, 2025
9577679
Merge branch 'master' into new_cds_eds
eshitachandwani Dec 16, 2025
38ef4ea
Merge branch 'master' into new_cds_eds
eshitachandwani Dec 16, 2025
229ce3b
change addresses fields of xdsresource.Endpoint
eshitachandwani Dec 16, 2025
6df023c
split populateClusterConfigLocked to keep it's size down
easwars Dec 17, 2025
ad3a3b3
small changes
eshitachandwani Dec 17, 2025
ab7a2aa
annotate error
eshitachandwani Dec 17, 2025
4adea77
error test fix
eshitachandwani Dec 17, 2025
09842ae
use has
eshitachandwani Dec 17, 2025
980b529
simplify the dns resolver implementation
easwars Dec 18, 2025
d8ebaaf
more generics
easwars Dec 18, 2025
cd5d990
changes
eshitachandwani Dec 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions internal/xds/resolver/watch_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ func (s) TestServiceWatch_ListenerPointsToNewRouteConfiguration(t *testing.T) {
verifyUpdateFromResolver(ctx, t, stateCh, wantServiceConfig(resources.Clusters[0].Name))

// Update the listener resource to point to a new route configuration name.
// Leave the old route configuration resource unchanged.
// The old route configuration resource is left unchanged to prevent a race:
// if it were removed immediately, the resolver might encounter a
// "resource-not-found" error for the old route before the listener update
// successfully transitions the client to the new route.
newTestRouteConfigName := defaultTestRouteConfigName + "-new"
resources.Listeners = []*v3listenerpb.Listener{e2e.DefaultClientListener(defaultTestServiceName, newTestRouteConfigName)}
configureResourcesOnManagementServer(ctx, t, mgmtServer, nodeID, resources.Listeners, resources.Routes)
resources.SkipValidation = true
mgmtServer.Update(ctx, resources)

// Verify that the new route configuration resource is requested.
waitForResourceNames(ctx, t, routeCfgCh, []string{newTestRouteConfigName})
Expand All @@ -88,9 +92,11 @@ func (s) TestServiceWatch_ListenerPointsToNewRouteConfiguration(t *testing.T) {
},
},
})
configureResourcesOnManagementServer(ctx, t, mgmtServer, nodeID, resources.Listeners, resources.Routes)
mgmtServer.Update(ctx, resources)

// Wait for no update from the resolver.
// Wait for no update from the resolver since the listener resource no
// longer points to the old route resource and new route resource hasn't
// been sent yet.
verifyNoUpdateFromResolver(ctx, t, stateCh)

// Update the management server with the new route configuration resource.
Expand Down
8 changes: 6 additions & 2 deletions internal/xds/resolver/xds_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,12 @@ type xdsResolver struct {
curConfigSelector stoppableConfigSelector
}

// ResolveNow is a no-op at this point.
func (*xdsResolver) ResolveNow(resolver.ResolveNowOptions) {}
// ResolveNow calls RequestDNSReresolution on the dependency manager.
func (r *xdsResolver) ResolveNow(opts resolver.ResolveNowOptions) {
if r.dm != nil {
r.dm.RequestDNSReresolution(opts)
}
}

func (r *xdsResolver) Close() {
// Cancel the context passed to the serializer and wait for any scheduled
Expand Down
19 changes: 12 additions & 7 deletions internal/xds/resolver/xds_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,17 @@ func (s) TestResolverBadServiceUpdate_NACKedWithCache(t *testing.T) {

stateCh, _, _ := buildResolverForTarget(t, resolver.Target{URL: *testutils.MustParseURL("xds:///" + defaultTestServiceName)}, bc)

// Configure good listener and route configuration resources on the
// management server.
listeners := []*v3listenerpb.Listener{e2e.DefaultClientListener(defaultTestServiceName, defaultTestRouteConfigName)}
routes := []*v3routepb.RouteConfiguration{e2e.DefaultRouteConfig(defaultTestRouteConfigName, defaultTestServiceName, defaultTestClusterName)}
configureResourcesOnManagementServer(ctx, t, mgmtServer, nodeID, listeners, routes)
// Configure all resources on the management server.
resources := e2e.DefaultClientResources(e2e.ResourceParams{
NodeID: nodeID,
DialTarget: defaultTestServiceName,
Host: "localhost",
Port: 8080,
})
mgmtServer.Update(ctx, resources)

// Expect a good update from the resolver.
cs := verifyUpdateFromResolver(ctx, t, stateCh, wantServiceConfig(defaultTestClusterName))
cs := verifyUpdateFromResolver(ctx, t, stateCh, wantServiceConfig(resources.Clusters[0].Name))

// "Make an RPC" by invoking the config selector.
_, err := cs.SelectConfig(iresolver.RPCInfo{Context: ctx, Method: "/service/method"})
Expand Down Expand Up @@ -1001,7 +1004,9 @@ func (s) TestResolverDelayedOnCommitted(t *testing.T) {
Port: defaultTestPort[0],
SecLevel: e2e.SecurityLevelNone,
})
mgmtServer.Update(ctx, resources)
if err := mgmtServer.Update(ctx, resources); err != nil {
t.Fatal(err)
}

stateCh, _, _ := buildResolverForTarget(t, resolver.Target{URL: *testutils.MustParseURL("xds:///" + defaultTestServiceName)}, bc)

Expand Down
83 changes: 0 additions & 83 deletions internal/xds/xdsdepmgr/watch_service.go

This file was deleted.

Loading