grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

balancer/randomsubsetting: Implementation of the random_subsetting LB policy

Open marek-szews opened this issue 2 months ago • 7 comments

Implements gRFC A68.

Note that this PR only implements the LB policy and does not implement the xDS integration specified here: https://github.com/grpc/proposal/blob/master/A68-random-subsetting.md#xds-integration

RELEASE NOTES:

  • balancer/randomsubsetting: Implementation of the random_subsetting LB policy

marek-szews avatar Oct 14 '25 11:10 marek-szews

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: easwars / name: Easwar Swaminathan (0be8037f3634c04f7417d681d16cc4af638c234e, 74cfecd18f7a52e1f1bece343317db8e1e4eb5ed, b162fa92b7300f75c1a55eecb36c128e2ed2065e, c4f8448cdc4148e2d7f002baee51bf634cba178a, d3ee5eb9399fef6cfda05cd908618faa8a85d026, d3f1067c73b75069e0b85922d52713649d87067f, ddc8d0925e0aab89fde99fc6cef398bfa1394f69, f5772182c853b1521f1281deb90903c494daa6cd, f94dbf4bdfda5eb2f79f0d23fe211480cc3ad157)
  • :white_check_mark: login: marek-szews / name: Marek Szews (3c3f093aa941fc36790fd91efcca9a4ea6e8a21f, 7f43d9eb184a48c6a11a8083a9e2e7e5a9d1a81c, db494907e83e0c6cac2149d8ca5524af1fc5e9f9, e34e0b96a312b0ad7422f6905c99d8d8dd1182c2, e8ff4a1ad76c72e0bd3c94c9a4a770f1d6f06b1c)

@marek-szews : Could you please get the tests to pass. Thanks.

easwars avatar Oct 15 '25 19:10 easwars

This PR is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.

github-actions[bot] avatar Oct 23 '25 08:10 github-actions[bot]

Hi @marek-szews - I think we're waiting on you to make some updates so we can continue the review. We can discuss Friday but I wanted to ping this in part to prevent the stale bot from closing it.

dfawley avatar Oct 29 '25 16:10 dfawley

Rework done, tests passed

Tests are still failing. Please read this document for guidelines: https://github.com/grpc/grpc-go/blob/master/CONTRIBUTING.md

TL;dr

All tests need to be passing before your change can be merged. We recommend you run tests locally before creating your PR to catch breakages early on:

./scripts/vet.sh to catch vet errors.
go test -cpu 1,4 -timeout 7m ./... to run the tests.
go test -race -cpu 1,4 -timeout 7m ./... to run tests in race mode

easwars avatar Nov 13 '25 20:11 easwars

This PR is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.

github-actions[bot] avatar Nov 27 '25 08:11 github-actions[bot]

Codecov Report

:x: Patch coverage is 92.06349% with 5 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 83.34%. Comparing base (8110884) to head (d3ee5eb). :warning: Report is 63 commits behind head on master.

Files with missing lines Patch % Lines
balancer/randomsubsetting/randomsubsetting.go 92.06% 3 Missing and 2 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8650      +/-   ##
==========================================
+ Coverage   79.45%   83.34%   +3.89%     
==========================================
  Files         415      419       +4     
  Lines       41339    32548    -8791     
==========================================
- Hits        32844    27128    -5716     
+ Misses       6621     4033    -2588     
+ Partials     1874     1387     -487     
Files with missing lines Coverage Δ
balancer/randomsubsetting/randomsubsetting.go 92.06% <92.06%> (ø)

... and 374 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Dec 04 '25 19:12 codecov[bot]

LGTM, module a nit about the _experimental suffix in the LB policy name that should be removed based on the gRFC.

Chatted with Mark who agreed that the _experimental suffix should have been in there. I also have a PR out to change the gRFC: https://github.com/grpc/proposal/pull/527

easwars avatar Dec 12 '25 20:12 easwars