lb api: moving load balancing policy specific configuration to extension configuration#23967
Conversation
…figuration Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
|
This is part of #20634. This PR moved the And |
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
|
cc @markdroth is it possible for us to use I know we cann't update any API directly according to our API version policy even it's marked as So, if it's possible to change the API directly (as a special case)? |
markdroth
left a comment
There was a problem hiding this comment.
Thanks for doing this!
| @@ -56,4 +57,10 @@ message LeastRequest { | |||
| // Configuration for slow start mode. | |||
| // If this configuration is not set, slow start will not be not enabled. | |||
| config.cluster.v3.Cluster.SlowStartConfig slow_start_config = 3; | |||
There was a problem hiding this comment.
I guess this should also switch to common.v3.SlowStartConfig. Technically, that's a breaking change, but I suspect no one is actually using this yet, so that's probably okay.
@temawi, please confirm that this change would not break anything for grpc-java.
| // This configuration allows the built-in LEAST_REQUEST LB policy to be configured via the LB policy | ||
| // extension point. See the :ref:`load balancing architecture overview | ||
| // <arch_overview_load_balancing_types>` for more information. | ||
| // [#extension: envoy.load_balancing_policies] |
There was a problem hiding this comment.
Why remove these extension comments? I think they're needed to generate the right documentation.
There was a problem hiding this comment.
These comments are wrong. The [#extension] comment should be complete name of extension.
I will ensure all these are correct when I implement these extensions.
| message RoundRobin { | ||
| // Configuration for slow start mode. | ||
| // If this configuration is not set, slow start will not be not enabled. | ||
| config.cluster.v3.Cluster.SlowStartConfig slow_start_config = 1; |
There was a problem hiding this comment.
Same comment as above w.r.t. changing this to use common.v3.SlowStartConfig.
| // If this configuration is not set, slow start will not be not enabled. | ||
| config.cluster.v3.Cluster.SlowStartConfig slow_start_config = 3; | ||
|
|
||
| oneof locality_config_specifier { |
There was a problem hiding this comment.
Looks like we're repeating this oneof in 3 different places. Would it make sense to define a new message in common.proto that contains this oneof, and then just have a single field of that new message type in each of these three places?
|
Sorry, didn't see your questions above until after I'd reviewed. Looks like we're thinking along the same lines, though.
In my review, I had actually suggested the opposite, which is just inlining the fields in the maglev config, just like we did in the ring hash config. That having been said, I am open to instead changing the ring_hash config to use In terms of API breakage policy, we can definitely add a new
As per my review comments, this one is a bit trickier. Technically, changing the type of the field is a breaking change. However, I don't think gRPC uses these fields at all, and Envoy hasn't implemented these new extensions yet, so I don't think anything would break if we just made this change. I'd be okay with allowing this as a one-off exception to our breakage policy, if none of the other @envoyproxy/api-shepherds objects. |
|
Thanks for you review comments. @markdroth
This is what I am worried about. I will create new commit to address your comments. |
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
…ore-lb-api-to-extension
markdroth
left a comment
There was a problem hiding this comment.
This looks great to me!
api/envoy/extensions/load_balancing_policies/common/v3/common.proto
Outdated
Show resolved
Hide resolved
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
|
/lgtm api |
|
/assign-from @envoyproxy/senior-maintainers A LGTM is necessary for this API only PR. |
|
@envoyproxy/senior-maintainers assignee is @htuch |
|
/assign-from @envoyproxy/senior-maintainers @htuch is out for vacation |
|
@envoyproxy/senior-maintainers assignee is @snowp |
|
cc @snowp could you give a LGTM to this API only PR when you have free time? Thanks. |
snowp
left a comment
There was a problem hiding this comment.
Makes sense to me, just one comment
| (envoy.annotations.deprecated_at_minor_version) = "3.0" | ||
| ]; | ||
|
|
||
| common.v3.ConsistentHashingLbConfig consistent_hashing_lb_config = 6; |
There was a problem hiding this comment.
Docs for this here and for the other lib configs?
There was a problem hiding this comment.
Most docs are comments of inner fields of common.v3.ConsistentHashingLbConfig. And simple comments to consistent_hashing_lb_config are added.
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
…ore-lb-api-to-extension
….h-into-multiple-header-files * origin/main: Add setRequestDecoder to ResponseEncoder interface (#24368) downstream: refactoring code to remove listener hard deps (#24394) lb api: moving load balancing policy specific configuration to extension configuration (#23967) ci: Skip docker/examples verification for docs or mobile only changes (#24417) ci: run mobile GitHub Actions on every PR (#24407) mobile: remove `bump_lyft_support_rotation.sh` script (#24404) Add file size to DirectoryEntry (#24176) bazel: update to 6.0.0rc4 (#24235) bazel: update rules_rust (#24409) Ecds config dump recommit (#24384) bazel: add another config_setting incompatible flag (#24270) listeners: moving listeners to extension directory (#24248) mobile: build Swift with whole module optimization (#24396) ci: update `actions/setup-java` from v1 to v3.8 (#24393) Signed-off-by: JP Simard <jp@jpsim.com>
…-cpp-to-latest-version * origin/main: (23 commits) Reduce Route memory utilization by avoiding RuntimeData instances when not needed (#24327) build: fix compile error for mac (#24429) postgres: support for upstream SSL (#23990) iOS: split `EnvoyEngine.h` into multiple header files (#24397) mobile: check for pending exceptions after JNI call (#24361) Remove uneccessary `this->` from mobile engine builder (#24389) Add setRequestDecoder to ResponseEncoder interface (#24368) downstream: refactoring code to remove listener hard deps (#24394) lb api: moving load balancing policy specific configuration to extension configuration (#23967) ci: Skip docker/examples verification for docs or mobile only changes (#24417) ci: run mobile GitHub Actions on every PR (#24407) mobile: remove `bump_lyft_support_rotation.sh` script (#24404) Add file size to DirectoryEntry (#24176) bazel: update to 6.0.0rc4 (#24235) bazel: update rules_rust (#24409) Ecds config dump recommit (#24384) bazel: add another config_setting incompatible flag (#24270) listeners: moving listeners to extension directory (#24248) mobile: build Swift with whole module optimization (#24396) ci: update `actions/setup-java` from v1 to v3.8 (#24393) ... Signed-off-by: JP Simard <jp@jpsim.com>
Commit Message: lb api: load balancing policy specific configuration to extension configuration
Additional Description:
Risk Level: low. api only.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.