Copilot commented on code in PR #14054: URL: https://github.com/apache/apisix/pull/14054#discussion_r4323307702
########## docs/en/latest/plugins/traffic-split.md: ########## @@ -64,6 +64,7 @@ The traffic ratio between Upstream services may be less accurate since round rob | rules.weighted_upstreams.upstream.pass_host | string | False | "pass" | ["pass", "node", "rewrite"] | Mode deciding how the host name is passed. `pass` passes the client's host name to the Upstream. `node` passes the host configured in the node of the Upstream. `rewrite` passes the value configured in `upstream_host`. | | rules.weighted_upstreams.upstream.name | string | False | | | Identifier for the Upstream for specifying service name, usage scenarios, and so on. | | rules.weighted_upstreams.upstream.upstream_host | string | False | | | Used when `pass_host` is `rewrite`. Host name of the Upstream. | +| rules.weighted_upstreams.upstream.tls | object | False | | | TLS settings used when connecting to the Upstream, the same as `tls` of an [Upstream](../admin-api.md#upstream): `client_cert` and `client_key`, `client_cert_id`, `verify` and `ca_certs`. | Review Comment: This line says inline-upstream `tls` is “the same as `tls` of an Upstream” but then enumerates a specific subset of fields. If upstream `tls` supports additional keys, this becomes misleading/outdated. Consider either (a) linking to the upstream `tls` section without listing fields, or (b) explicitly stating “currently supports …” and keeping the list aligned with schema. ########## apisix/upstream.lua: ########## @@ -329,6 +329,55 @@ local function set_stream_upstream_client_cert(api_ctx, up_conf) end +local function set_http_upstream_tls(api_ctx, up_conf) Review Comment: The helper applies TLS settings for both `https` and `grpcs` schemes. Renaming it to a scheme-neutral name (e.g., `set_upstream_tls` / `set_upstream_tls_params`) would better match its behavior and reduce confusion for future maintainers. ########## t/plugin/traffic-split5.t: ########## @@ -634,3 +634,209 @@ nginx_config: GET /t --- response_body passed. + + + Review Comment: There are multiple consecutive blank lines before TEST 13. Trimming these improves test readability and keeps formatting consistent within the suite. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
