Skip to content

Commit 4c27cc8

Browse files
internal/xds: change xds_resolver to use dependency manager (#8711)
This change is part of [A74](https://github.com/grpc/proposal/blob/master/A74-xds-config-tears.md) implementation. This PR removes the listener and route watchers from resolver and changes it so that we get the resources from xds dependency manager. RELEASE NOTES: * xds/resolver: * Changes the behavior such that getting no matching virtual host in a route resource will now drop any previous resource and report the error. * Changes the behavior so that receiving a configuration error (LDS/RDS ambient error) after a successful update will now only be logged, and the system will continue using the previous resource to avoid transient channel failures
1 parent eef7ca4 commit 4c27cc8

File tree

5 files changed

+241
-386
lines changed

5 files changed

+241
-386
lines changed

internal/xds/resolver/helpers_test.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -191,26 +191,6 @@ func verifyNoUpdateFromResolver(ctx context.Context, t *testing.T, stateCh chan
191191
}
192192
}
193193

194-
// waitForErrorFromResolver waits for the resolver to push an error and verifies
195-
// that it matches the expected error and contains the expected node ID.
196-
func waitForErrorFromResolver(ctx context.Context, errCh chan error, wantErr, wantNodeID string) error {
197-
select {
198-
case <-ctx.Done():
199-
return fmt.Errorf("timeout when waiting for error to be propagated to the ClientConn")
200-
case gotErr := <-errCh:
201-
if gotErr == nil {
202-
return fmt.Errorf("got nil error from resolver, want %q", wantErr)
203-
}
204-
if !strings.Contains(gotErr.Error(), wantErr) {
205-
return fmt.Errorf("got error from resolver %q, want %q", gotErr, wantErr)
206-
}
207-
if !strings.Contains(gotErr.Error(), wantNodeID) {
208-
return fmt.Errorf("got error from resolver %q, want nodeID %q", gotErr, wantNodeID)
209-
}
210-
}
211-
return nil
212-
}
213-
214194
func verifyResolverError(gotErr error, wantCode codes.Code, wantErr, wantNodeID string) error {
215195
if gotErr == nil {
216196
return fmt.Errorf("got nil error from resolver, want error with code %v", wantCode)

internal/xds/resolver/watch_service.go

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)