-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Notice: Upcoming Experimental Balancer/Resolver API Changes #3180
Comments
Hi @dfawley, even though these changes were to "experimental" APIs, multiple external projects do depend on them, at different versions of this library. This is a significant problem for the Go ecosystem because any project trying to import recent versions of (for example) both In the meantime, would you consider adding type aliases so that code which relies on both the old and new names of these types can still compile? |
It was a mistake for any other projects to use these packages without transitively marking themselves as experimental. Unfortunately the Go compatibility promise doesn't have any convention that allows us to experiment with APIs to see what will work well for our users or to release functionality before it's fully supported for advanced users that can tolerate instability. We've discussed using separate modules (at v0) for this purpose, but it oftentimes isn't technically possible to achieve the separation needed for this.
We had type aliases in place for the 1.26 release, and marked them as deprecated, in order to allow projects a chance to do a smooth migration. Unfortunately, we cannot leave type aliases in place forever; projects will need to upgrade. Sorry for any disturbances this has caused. |
Hi, thanks for the response @dfawley, most conversation happening in #3500 now I think. I think it seems like a reasonable desire (to want to add things that should not be depended on yet) but unfortunately I don't think relying on the eternal vigilance of multiple parties to always respect this rule is likely to work in the long term, especially as it is special to this repository or organisation. The good thing about go's compatibility rules are that they are at least a single standard that everyone could probably bend to if they wanted, for the sake of the ecosystem. Rather than relying on eternal vigilance, they have built tools that break builds when these rules are not followed, which at least is some kind of feedback projects will hit eventually. |
As we work toward stabilization of the experimental resolver/balancer plugin APIs, the gRPC team will be making several non-backward compatible changes to enable new functionality and better extensibility for the future. These changes are not strictly following semantic versioning or the Go compatibility promise, but they are in accordance with our versioning policy as the changes are limited to experimental APIs.
Items will be checked off of the following list as they are completed.
Cleanups
resolver.BuildOption
toBuildOptions
(resolver: rename Option to Options, leaving type aliases for now #3175)resolver.ResolveNowOption
toResolveNowOptions
(resolver: rename Option to Options, leaving type aliases for now #3175)balancer.PickOptions
toPickInfo
(balancer: add V2Picker, ClientConn.UpdateState, SubConnState.ConnectionError #3186)For the short-term, to allow an easier migration, type aliases will be put in place for the old symbols.
balancer
PackageV2Picker
(eventually replacingPicker
), featuring changed semantics to allow for new capabilities, and for future-proofing. (balancer: add V2Picker, ClientConn.UpdateState, SubConnState.ConnectionError #3186)ClientConn.UpdateState
(eventually replacingUpdateBalancerState
). This is future-proofing to allow addition of new items in the balancer's state, and contains aV2Picker
instead ofPicker
. (balancer: add V2Picker, ClientConn.UpdateState, SubConnState.ConnectionError #3186)Changes planned for the 1.27 release (December 17 - January 28)
Changes planned for the 1.30 release (March 21 - June 2)
balancer.Balancer
andbalancer.Picker
with theV2Balancer
andV2Picker
versions. To allow an easier migration for users currently referencing theV2
names, create type aliases. (Typically, referencing these interface types should not be necessary.) (balancer: move Balancer and Picker to V2; delete legacy API #3431)balancer.ClientConn.UpdateBalancerState
. (balancer: move Balancer and Picker to V2; delete legacy API #3431)grpc.Balancer
, and all related functionality. (balancer: move Balancer and Picker to V2; delete legacy API #3431)naming
package. (balancer: move Balancer and Picker to V2; delete legacy API #3431)Changes planned for the 1.31 release (June 2 - July 14)
V2Balancer
andV2Picker
type aliases, andbase
package "V2" references. (balancer: remove deprecated type aliases as planned #3742)The resolver and balancer APIs will be kept in the experimental state after these changes, as there may be more breaking changes needed in the near future.
The text was updated successfully, but these errors were encountered: