Skip to content

balancer: introduce env flag for case-sensitive registry#8837

Merged
Pranjali-2501 merged 2 commits intogrpc:masterfrom
Pranjali-2501:issue_5288
Jan 26, 2026
Merged

balancer: introduce env flag for case-sensitive registry#8837
Pranjali-2501 merged 2 commits intogrpc:masterfrom
Pranjali-2501:issue_5288

Conversation

@Pranjali-2501
Copy link
Copy Markdown
Contributor

@Pranjali-2501 Pranjali-2501 commented Jan 14, 2026

Part of #5288

Follow up of PR: #6647

This PR introduces the GRPC_GO_EXPERIMENTAL_CASE_SENSITIVE_BALANCER_REGISTRIES environment variable to transition balancer registries to be case-sensitive.

Default Behavior:
* The env var is disabled by default.
* The registry remains case-insensitive (legacy behavior) and a warning is logged if a balancer name contains uppercase letters, notifying users of the upcoming change.

RELEASE NOTES:

  • balancer: grpc will log a warning if balancer registries are used with uppercase letter(s).

@Pranjali-2501 Pranjali-2501 added this to the 1.79 Release milestone Jan 14, 2026
@Pranjali-2501 Pranjali-2501 added the Type: Behavior Change Behavior changes not categorized as bugs label Jan 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.99%. Comparing base (629ef39) to head (750ae1e).
⚠️ Report is 21 commits behind head on master.

Files with missing lines Patch % Lines
balancer/balancer.go 81.81% 0 Missing and 2 partials ⚠️
internal/envconfig/envconfig.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8837      +/-   ##
==========================================
- Coverage   83.22%   82.99%   -0.24%     
==========================================
  Files         417      414       -3     
  Lines       32920    32783     -137     
==========================================
- Hits        27397    27207     -190     
  Misses       4108     4108              
- Partials     1415     1468      +53     
Files with missing lines Coverage Δ
internal/envconfig/envconfig.go 73.33% <0.00%> (-26.67%) ⬇️
balancer/balancer.go 66.66% <81.81%> (-27.09%) ⬇️

... and 21 files with indirect coverage changes

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

@easwars
Copy link
Copy Markdown
Contributor

easwars commented Jan 14, 2026

I think a couple of things need to be done before we can make a change like this that can break our users:

  • Add an environment variable that is disabled by default. Maybe something like GRPC_GO_EXPERIMENTAL_CASE_SENSITIVE_BALANCER_REGISTRIES. So, there is no behavior change.
  • In a follow-up PR (after a release), we can enable the env var by default
  • In a follow-up PR (after another release), we can get rid of the env var

Also check internal usages in google3 if there are balancers that need to be changed.

@easwars easwars assigned Pranjali-2501 and unassigned easwars Jan 14, 2026
@easwars
Copy link
Copy Markdown
Contributor

easwars commented Jan 20, 2026

Please update the PR description and the title. Also, the related needs to stay open so that we do the follow-up activities (changing the env var to true by default, and getting rid of it).

@easwars
Copy link
Copy Markdown
Contributor

easwars commented Jan 20, 2026

@dfawley : Do you have a suggestion for the name of the env var? I suggested GRPC_GO_EXPERIMENTAL_CASE_SENSITIVE_BALANCER_REGISTRIES. But looking at it now, it seems very long, but I can't think of anything shorter that still conveys the message. Thanks.

@easwars easwars assigned Pranjali-2501 and unassigned easwars Jan 20, 2026
@Pranjali-2501 Pranjali-2501 changed the title balancer: use case-sensitive balancer registries balancer: introduce experimental flag for case-sensitive registry Jan 23, 2026
@Pranjali-2501 Pranjali-2501 changed the title balancer: introduce experimental flag for case-sensitive registry balancer: introduce env flag for case-sensitive registry Jan 23, 2026
@dfawley
Copy link
Copy Markdown
Member

dfawley commented Jan 23, 2026

it seems very long

Maybe that's a feature? :)

I don't think the name for this is too important. We'll be deleting it (one way or another) after a few releases? And nobody should be relying on it for anything more than a workaround?

@Pranjali-2501
Copy link
Copy Markdown
Contributor Author

I don't think the name for this is too important. We'll be deleting it (one way or another) after a few releases? And nobody should be relying on it for anything more than a workaround?

Yes, we will be deleting it after few releases.

@Pranjali-2501 Pranjali-2501 merged commit a8d11ce into grpc:master Jan 26, 2026
19 checks passed
mbissa pushed a commit to mbissa/grpc-go that referenced this pull request Feb 16, 2026
Part of grpc#5288

Follow up of PR: grpc#6647 

This PR introduces the
`GRPC_GO_EXPERIMENTAL_CASE_SENSITIVE_BALANCER_REGISTRIES` environment
variable to transition balancer registries to be case-sensitive.
 
 **Default Behavior**: 
    *   The env var is disabled by default.
* The registry remains case-insensitive (legacy behavior) and a warning
is logged if a balancer name contains uppercase letters, notifying users
of the upcoming change.

RELEASE NOTES:
* balancer: grpc will log a warning if balancer registries are used with
uppercase letter(s).
Pranjali-2501 added a commit that referenced this pull request Apr 15, 2026
…RIES` by default (#9017)

Part of #5288

Follow up of PR: #8837

This PR enabled the env variable
GRPC_GO_EXPERIMENTAL_CASE_SENSITIVE_BALANCER_REGISTRIES by default to
transition balancer registries to be case-sensitive.

RELEASE NOTES:
* balancer: balancer registries are now case-sensitive by default.
Disable GRPC_GO_EXPERIMENTAL_CASE_SENSITIVE_BALANCER_REGISTRIES env var
to temporarily revert this behavior.
This was referenced Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Behavior Change Behavior changes not categorized as bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants