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

xds: cleanup old env vars

Open easwars opened this issue 3 years ago • 2 comments

We introduce environment variables when we add new features. Initially the default value for these env vars is set to false and the user will have to explicitly set the value to true to enable the feature.

At some point, when we think the feature is stable enough, we set the default value to true. At this point, the user will have to explicitly set the value to false to disable the feature.

One release after setting the default value to true, we should delete the environment variable, which will get rid of conditional code and eventually lead to simpler code. Even though, we have had this policy for a while, env vars have been lingering forever. We should do a one time cleanup for now, and going forward, we should file issues and link them in TODOs for cleanup for future env vars.

easwars avatar Dec 22 '22 19:12 easwars

As part of https://github.com/grpc/grpc-go/pull/6749, we did end up removing a bunch of env vars.

But some still remain:

  1. LeastRequestLB: https://github.com/grpc/grpc-go/blob/9affdbb28e4be9c971fadfb06fb89866863ef634/internal/envconfig/envconfig.go#L39 This has been defaulting to false from the time it was added (about a year ago). We should set the default to true now and get rid of it in the next release.
  2. EnforceALPNEnabled: Was defaulted to true in the last release. So, maybe as part of the next release, we can delete it.

easwars avatar Sep 26 '24 12:09 easwars

We need to provide a mechanism for older users to disable ALPN enforcement before we remove the env variable for ALPN: https://github.com/grpc/grpc-go/issues/7769

arjan-bal avatar Dec 10 '24 10:12 arjan-bal