Skip to content

Commit d9a1241

Browse files
authored
Merge pull request #1979 from murgatroid99/grpc-js_1.4_upmerge
Upmerge 1.4.x into master
2 parents a09870a + 8df71f1 commit d9a1241

File tree

6 files changed

+1
-41
lines changed

6 files changed

+1
-41
lines changed

packages/grpc-js-xds/src/xds-stream-state/cds-state.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,22 +164,16 @@ export class CdsState implements XdsStreamState<Cluster__Output> {
164164
}
165165
this.latestResponses = validResponses;
166166
this.latestIsV2 = isV2;
167-
const allEdsServiceNames: Set<string> = new Set<string>();
168167
const allClusterNames: Set<string> = new Set<string>();
169168
for (const message of validResponses) {
170169
allClusterNames.add(message.name);
171-
const edsServiceName = message.eds_cluster_config?.service_name ?? '';
172-
allEdsServiceNames.add(
173-
edsServiceName === '' ? message.name : edsServiceName
174-
);
175170
const watchers = this.watchers.get(message.name) ?? [];
176171
for (const watcher of watchers) {
177172
watcher.onValidUpdate(message, isV2);
178173
}
179174
}
180175
trace('Received CDS updates for cluster names [' + Array.from(allClusterNames) + ']');
181176
result.missing = this.handleMissingNames(allClusterNames);
182-
this.edsState.handleMissingNames(allEdsServiceNames);
183177
return result;
184178
}
185179

packages/grpc-js-xds/src/xds-stream-state/eds-state.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -129,23 +129,6 @@ export class EdsState implements XdsStreamState<ClusterLoadAssignment__Output> {
129129
return true;
130130
}
131131

132-
/**
133-
* Given a list of edsServiceNames (which may actually be the cluster name),
134-
* for each watcher watching a name not on the list, call that watcher's
135-
* onResourceDoesNotExist method.
136-
* @param allClusterNames
137-
*/
138-
handleMissingNames(allEdsServiceNames: Set<string>) {
139-
for (const [edsServiceName, watcherList] of this.watchers.entries()) {
140-
if (!allEdsServiceNames.has(edsServiceName)) {
141-
trace('Reporting EDS resource does not exist for edsServiceName ' + edsServiceName);
142-
for (const watcher of watcherList) {
143-
watcher.onResourceDoesNotExist();
144-
}
145-
}
146-
}
147-
}
148-
149132
handleResponses(responses: ResourcePair<ClusterLoadAssignment__Output>[], isV2: boolean): HandleResponseResult {
150133
const validResponses: ClusterLoadAssignment__Output[] = [];
151134
let result: HandleResponseResult = {

packages/grpc-js-xds/src/xds-stream-state/lds-state.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,21 +183,15 @@ export class LdsState implements XdsStreamState<Listener__Output> {
183183
this.latestResponses = validResponses;
184184
this.latestIsV2 = isV2;
185185
const allTargetNames = new Set<string>();
186-
const allRouteConfigNames = new Set<string>();
187186
for (const message of validResponses) {
188187
allTargetNames.add(message.name);
189-
const httpConnectionManager = decodeSingleResource(HTTP_CONNECTION_MANGER_TYPE_URL_V3, message.api_listener!.api_listener!.value);
190-
if (httpConnectionManager.rds) {
191-
allRouteConfigNames.add(httpConnectionManager.rds.route_config_name);
192-
}
193188
const watchers = this.watchers.get(message.name) ?? [];
194189
for (const watcher of watchers) {
195190
watcher.onValidUpdate(message, isV2);
196191
}
197192
}
198193
trace('Received LDS response with listener names [' + Array.from(allTargetNames) + ']');
199194
result.missing = this.handleMissingNames(allTargetNames);
200-
this.rdsState.handleMissingNames(allRouteConfigNames);
201195
return result;
202196
}
203197

packages/grpc-js-xds/src/xds-stream-state/rds-state.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,6 @@ export class RdsState implements XdsStreamState<RouteConfiguration__Output> {
173173
return true;
174174
}
175175

176-
handleMissingNames(allRouteConfigNames: Set<string>) {
177-
for (const [routeConfigName, watcherList] of this.watchers.entries()) {
178-
if (!allRouteConfigNames.has(routeConfigName)) {
179-
for (const watcher of watcherList) {
180-
watcher.onResourceDoesNotExist();
181-
}
182-
}
183-
}
184-
}
185-
186176
handleResponses(responses: ResourcePair<RouteConfiguration__Output>[], isV2: boolean): HandleResponseResult {
187177
const validResponses: RouteConfiguration__Output[] = [];
188178
let result: HandleResponseResult = {

packages/grpc-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grpc/grpc-js",
3-
"version": "1.4.3",
3+
"version": "1.4.4",
44
"description": "gRPC Library for Node - pure JS implementation",
55
"homepage": "https://grpc.io/",
66
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",

packages/grpc-js/src/subchannel.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,6 @@ export class Subchannel {
555555
(error as Error).message
556556
);
557557
});
558-
registerChannelzSocket(this.subchannelAddressString, () => this.getChannelzSocketInfo()!);
559558
}
560559

561560
private startConnectingInternal() {

0 commit comments

Comments
 (0)