Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pick_first: de-experiment pick first #6549

Merged
merged 4 commits into from
Aug 14, 2023

Conversation

mohanli-ml
Copy link
Contributor

@mohanli-ml mohanli-ml commented Aug 14, 2023

De-experiment pick first since we have both affinity and randomness E2E test running successfully.

@apolcyn @easwars

RELEASE NOTES: none

@dfawley dfawley added the Type: Feature New features or improvements in behavior label Aug 14, 2023
@dfawley dfawley added this to the 1.58 Release milestone Aug 14, 2023
@easwars
Copy link
Contributor

easwars commented Aug 14, 2023

Looks like a test is failing. The failing test is this one: https://github.com/grpc/grpc-go/blob/master/xds/internal/xdsclient/xdslbregistry/xdslbregistry_test.go#L185-L205

The test logic assumes that pick_first env var is disabled by default and enables it when the corresponding field in the test table is set: https://github.com/grpc/grpc-go/blob/master/xds/internal/xdsclient/xdslbregistry/xdslbregistry_test.go#L300-L303. We need to invert this logic for the current test to pass. We also need another similar test wherein pick_first and round_robin are configured through custom LB policies, and when pick_first env var is enabled (which will be by default with this PR), the test should verify that the output contains pick_first config and not round_robin.

@mohanli-ml
Copy link
Contributor Author

Looks like a test is failing. The failing test is this one: https://github.com/grpc/grpc-go/blob/master/xds/internal/xdsclient/xdslbregistry/xdslbregistry_test.go#L185-L205

The test logic assumes that pick_first env var is disabled by default and enables it when the corresponding field in the test table is set: https://github.com/grpc/grpc-go/blob/master/xds/internal/xdsclient/xdslbregistry/xdslbregistry_test.go#L300-L303. We need to invert this logic for the current test to pass. We also need another similar test wherein pick_first and round_robin are configured through custom LB policies, and when pick_first env var is enabled (which will be by default with this PR), the test should verify that the output contains pick_first config and not round_robin.

Done. Can you take another look? Thanks!

},
},
wantConfig: `[{"pick_first": { "shuffleAddressList": true }}]`,
pfDisabled: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we can omit this line as the default (zero value) for a boolean is false, unless you feel that explicitly including this line here improves the readability of the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks!

@easwars easwars merged commit 402ba09 into grpc:master Aug 14, 2023
1 check passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants