Skip to content

Add interopt test using xDS client for a random_subsetting_experiment#9018

Closed
marek-szews wants to merge 2 commits into
grpc:masterfrom
marek-szews:random-subsetting-interop-test
Closed

Add interopt test using xDS client for a random_subsetting_experiment#9018
marek-szews wants to merge 2 commits into
grpc:masterfrom
marek-szews:random-subsetting-interop-test

Conversation

@marek-szews
Copy link
Copy Markdown
Contributor

Enable interop testing for random subsetting Load Balancing policy (experimantal) to validate correctness and integration with existing child policies.

RELEASE NOTES:

Add interop test for a random_subsetting_experimental LB policy.

@Pranjali-2501
Copy link
Copy Markdown
Contributor

@marek-szews : please merge changes from the master branch into this PR branch. Thanks.

Copy link
Copy Markdown
Contributor

@arjan-bal arjan-bal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the following test cases to validate xDS integration:

  1. Configuration parsing test here
    func (s) TestConvertToServiceConfigSuccess(t *testing.T) {
  2. A test that configures random subsetting using xDS and verifies that the balancer is built and RPCs succeed. You can look at the following test that configures pickfirst:
    // Create a wrapped pickfirst LB policy. When the endpoint picking policy on
    // the cluster resource is changed to pickfirst, this will allow us to
    // verify that load balancing configuration is pushed to it.
    pfBuilder := balancer.Get(pickfirst.Name)
    internal.BalancerUnregister(pfBuilder.Name())
    lbCfgCh := make(chan serviceconfig.LoadBalancingConfig, 1)
    stub.Register(pfBuilder.Name(), stub.BalancerFuncs{
    ParseConfig: func(lbCfg json.RawMessage) (serviceconfig.LoadBalancingConfig, error) {
    return pfBuilder.(balancer.ConfigParser).ParseConfig(lbCfg)
    },
    Init: func(bd *stub.BalancerData) {
    bd.ChildBalancer = pfBuilder.Build(bd.ClientConn, bd.BuildOptions)
    },
    UpdateClientConnState: func(bd *stub.BalancerData, ccs balancer.ClientConnState) error {
    select {
    case lbCfgCh <- ccs.BalancerConfig:
    default:
    }
    return bd.ChildBalancer.UpdateClientConnState(ccs)
    },
    Close: func(bd *stub.BalancerData) {
    bd.ChildBalancer.Close()
    },
    })

Comment thread interop/xds/go.mod
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The github.com/envoyproxy/go-control-plane/envoy dependency is already updated on the master branch. Can you please merge the master branch to remove this diff?

Comment on lines +207 to +209
// "The configuration for the Random Subsetting LB policy is the
// least_request_lb_config field. The field is optional; if not present,
// defaults will be assumed for all of its values." - A48
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"least_request_lb_config" - this seems like a copy/paste error. Can you please fix the comment?

// "The configuration for the Random Subsetting LB policy is the
// least_request_lb_config field. The field is optional; if not present,
// defaults will be assumed for all of its values." - A48
subsetSize := uint32(defaultRandomSubsetSize)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quickly glanced through A68 and didn't find any mention of a defaultRandomSubsetSize. Is this behavior documented? If not, we should probably fail parsing if the subset size is less than 1.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't appear to be an xDS or an interop test. It is a simple unit test that directly configures the LB policy through a static service config, instead of using xDS. Please remove this. Let's keep this PR focused on integrating the random subsetting policy with xDS and have the interop changes in separate PRs.

@arjan-bal arjan-bal assigned marek-szews and unassigned arjan-bal Mar 31, 2026
@easwars
Copy link
Copy Markdown
Contributor

easwars commented Apr 2, 2026

@marek-szews
Did we implement parsing the random_subsetting LB policy's configuration from xDS protos? I don't remember us doing that at all. We need to register a custom policy in the xDS LB registry that can parse the xDS protos to arrive at the LB config. I'm talking about this section in A68: https://github.com/grpc/proposal/blob/master/A68-random-subsetting.md#integration-with-xds-lb-policy-registry

@github-actions
Copy link
Copy Markdown

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 github-actions Bot added the stale label Apr 14, 2026
@github-actions github-actions Bot closed this Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants