Merge pull request #2917 from grpc/@grpc/grpc-js@1.13.x

Merge 1.13.x into master
This commit is contained in:
Michael Lumish 2025-03-05 10:06:00 -08:00 committed by GitHub
commit 6c7abfe4a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# @grpc/grpc-js xDS plugin
This package provides support for the `xds://` URL scheme to the `@grpc/grpc-js` library. The latest version of this package is compatible with `@grpc/grpc-js` version 1.10.x.
This package provides support for the `xds://` URL scheme to the `@grpc/grpc-js` library. The latest version of this package is compatible with `@grpc/grpc-js` version 1.13.x.
## Installation
@ -36,3 +36,4 @@ const client = new MyServiceClient('xds:///example.com:123');
- [xDS Ring Hash LB Policy](https://github.com/grpc/proposal/blob/master/A42-xds-ring-hash-lb-policy.md)
- [`pick_first` via xDS](https://github.com/grpc/proposal/blob/master/A62-pick-first.md#pick_first-via-xds-1) (Currently experimental, enabled by environment variable `GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG`)
- [xDS-Enabled Servers](https://github.com/grpc/proposal/blob/master/A36-xds-for-servers.md)
- [xDS-Based Security for gRPC Clients and Servers](https://github.com/grpc/proposal/blob/master/A29-xds-tls-security.md)

View File

@ -1,6 +1,6 @@
{
"name": "@grpc/grpc-js-xds",
"version": "1.12.2",
"version": "1.13.0",
"description": "Plugin for @grpc/grpc-js. Adds the xds:// URL scheme and associated features.",
"main": "build/src/index.js",
"scripts": {
@ -55,7 +55,7 @@
"xxhash-wasm": "^1.0.2"
},
"peerDependencies": {
"@grpc/grpc-js": "~1.12.0"
"@grpc/grpc-js": "~1.13.0"
},
"engines": {
"node": ">=10.10.0"

View File

@ -249,16 +249,20 @@ class RingHashLoadBalancer implements LoadBalancer {
if (!(this.currentState === connectivityState.TRANSIENT_FAILURE || this.currentState === connectivityState.CONNECTING)) {
return;
}
let firstIdleChild: LeafLoadBalancer | null = null;
for (const leaf of this.leafMap.values()) {
const leafState = leaf.getConnectivityState();
if (leafState === connectivityState.CONNECTING) {
firstIdleChild = null;
break;
}
if (leafState === connectivityState.IDLE) {
leaf.startConnecting();
break;
if (leafState === connectivityState.IDLE && !firstIdleChild) {
firstIdleChild = leaf;
}
}
if (firstIdleChild) {
firstIdleChild.startConnecting();
}
}
private calculateAndUpdateState() {

View File

@ -1,6 +1,6 @@
{
"name": "@grpc/grpc-js",
"version": "1.12.6",
"version": "1.13.0",
"description": "gRPC Library for Node - pure JS implementation",
"homepage": "https://grpc.io/",
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",