grpc / grpc-go

The Go language implementation of gRPC. HTTP/2 based RPC
https://grpc.io
Apache License 2.0
21.02k stars 4.36k forks source link

xds: cleanup old env vars #5888

Open easwars opened 1 year ago

easwars commented 1 year ago

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 commented 3 weeks ago

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.