From 5f4d0c6b96029ef1d56f8fd10dc3c30719d46ed3 Mon Sep 17 00:00:00 2001 From: Andy Zhang Date: Mon, 27 May 2024 13:15:40 +0800 Subject: [PATCH 1/3] docs(changelog): apply changelog suggestions (#13086) Co-authored-by: Vinicius Mignot --- changelog/unreleased/kong/add-ai-data-report.yml | 2 +- .../unreleased/kong/add-messages-api-to-anthropic.yml | 2 +- changelog/unreleased/kong/add_tzdata.yml | 2 +- changelog/unreleased/kong/ai-proxy-client-params.yml | 6 +++--- changelog/unreleased/kong/ai-proxy-preserve-mode.yml | 6 +++--- changelog/unreleased/kong/analytics-for-anthropic.yml | 2 +- changelog/unreleased/kong/bump-lua-protobuf.yml | 2 +- changelog/unreleased/kong/bump-lua-resty-http-0.17.2.yml | 2 +- changelog/unreleased/kong/bump-ngx-wasm-module.yml | 2 +- changelog/unreleased/kong/bump-v8.yml | 2 +- changelog/unreleased/kong/bump-wasmtime.yml | 2 +- .../kong/decrease-cocurrency-limit-of-timer-ng.yml | 2 +- changelog/unreleased/kong/disable-TLSv1_1-in-openssl3.yml | 2 +- changelog/unreleased/kong/feat-ai-proxy-add-streaming.yml | 2 +- .../kong/feat-hybrid-sync-mixed-route-policy.yml | 8 ++++---- ...feat-increase-ai-anthropic-regex-expression-length.yml | 2 +- changelog/unreleased/kong/feat-wasm-general-shm-kv.yml | 2 +- changelog/unreleased/kong/fix-aws-lambda-kong-latency.yml | 2 +- changelog/unreleased/kong/fix-cjson-t-end.yml | 2 +- changelog/unreleased/kong/fix-ctx-host-port.yml | 4 ++-- .../unreleased/kong/fix-dbless-duplicate-target-error.yml | 2 +- ...x-default-value-of-upstream-keepalive-max-requests.yml | 4 ++-- .../unreleased/kong/fix-external-plugin-instance.yml | 2 +- .../unreleased/kong/fix-file-permission-of-logrotate.yml | 2 +- .../fix-hybrid-dp-certificate-with-vault-not-refresh.yml | 2 +- changelog/unreleased/kong/fix-jwt-plugin-check.yml | 2 +- .../fix-missing-router-section-of-request-debugging.yml | 2 +- .../unreleased/kong/fix-mlcache-renew-lock-leaks.yml | 2 +- changelog/unreleased/kong/fix-router-rebuing-flag.yml | 4 ++-- .../kong/fix-snis-tls-passthrough-in-trad-compat.yml | 4 ++-- changelog/unreleased/kong/fix-upstream-status-unset.yml | 2 +- changelog/unreleased/kong/fix-vault-init-worker.yml | 2 +- .../unreleased/kong/fix-wasm-disable-pwm-lua-resolver.yml | 2 +- .../flavor-expressions-supports-traditional-fields.yml | 6 +++--- changelog/unreleased/kong/key_auth_www_authenticate.yml | 2 +- .../unreleased/kong/log-serializer-receive-latency.yml | 2 +- .../kong/otel-increase-queue-max-batch-size.yml | 2 +- .../otel-sampling-panic-when-header-trace-id-enable.yml | 2 +- changelog/unreleased/kong/plugin_server_restart.yml | 2 +- changelog/unreleased/kong/propagation-module-rework.yml | 2 +- .../unreleased/kong/revert-req-body-limitation-patch.yml | 2 +- changelog/unreleased/kong/set_grpc_tls_seclevel.yml | 2 +- changelog/unreleased/kong/speed_up_router.yml | 2 +- changelog/unreleased/kong/update-ai-proxy-telemetry.yml | 2 +- changelog/unreleased/kong/wasm-bundled-filters.yml | 2 +- 45 files changed, 58 insertions(+), 58 deletions(-) diff --git a/changelog/unreleased/kong/add-ai-data-report.yml b/changelog/unreleased/kong/add-ai-data-report.yml index 1e074769daef..1119cd0073d4 100644 --- a/changelog/unreleased/kong/add-ai-data-report.yml +++ b/changelog/unreleased/kong/add-ai-data-report.yml @@ -1,3 +1,3 @@ -"message": Add `events:ai:response_tokens`, `events:ai:prompt_tokens` and `events:ai:requests` to the anonymous report to start counting AI usage +"message": Added `events:ai:response_tokens`, `events:ai:prompt_tokens` and `events:ai:requests` to the anonymous report to start counting AI usage "type": feature "scope": Core diff --git a/changelog/unreleased/kong/add-messages-api-to-anthropic.yml b/changelog/unreleased/kong/add-messages-api-to-anthropic.yml index 09513bff3848..538020199e37 100644 --- a/changelog/unreleased/kong/add-messages-api-to-anthropic.yml +++ b/changelog/unreleased/kong/add-messages-api-to-anthropic.yml @@ -1,5 +1,5 @@ "message": | - **AI-Proxy**: To support the new messages API of `Anthropic`, the upstream path of the `Anthropic` for `llm/v1/chat` route type is changed from `/v1/complete` to `/v1/messages` + **AI Proxy**: To support the new messages API of `Anthropic`, the upstream path of the `Anthropic` for `llm/v1/chat` route type has changed from `/v1/complete` to `/v1/messages`. "type": breaking_change "scope": Plugin "jiras": diff --git a/changelog/unreleased/kong/add_tzdata.yml b/changelog/unreleased/kong/add_tzdata.yml index 91c8df9c2ad0..bf635996c367 100644 --- a/changelog/unreleased/kong/add_tzdata.yml +++ b/changelog/unreleased/kong/add_tzdata.yml @@ -1,3 +1,3 @@ message: | - Add package `tzdata` to DEB Docker image for convenient timezone setting. + Added package `tzdata` to DEB Docker image for convenient timezone setting. type: dependency diff --git a/changelog/unreleased/kong/ai-proxy-client-params.yml b/changelog/unreleased/kong/ai-proxy-client-params.yml index 2d76256a190a..9b23aee2ba29 100644 --- a/changelog/unreleased/kong/ai-proxy-client-params.yml +++ b/changelog/unreleased/kong/ai-proxy-client-params.yml @@ -1,6 +1,6 @@ message: | - AI Proxy now reads most prompt tuning parameters from the client, whilst the - plugin config 'model options' are now just defaults. This fixes support for - using the respective provider's native SDK. + AI Proxy now reads most prompt tuning parameters from the client, + while the plugin config parameters under `model_options` are now just defaults. + This fixes support for using the respective provider's native SDK. type: feature scope: Plugin diff --git a/changelog/unreleased/kong/ai-proxy-preserve-mode.yml b/changelog/unreleased/kong/ai-proxy-preserve-mode.yml index ff7af94add2c..996783b3e4a5 100644 --- a/changelog/unreleased/kong/ai-proxy-preserve-mode.yml +++ b/changelog/unreleased/kong/ai-proxy-preserve-mode.yml @@ -1,6 +1,6 @@ message: | - AI Proxy now has a 'preserve' route_type option, where the requests and responses - are passed directly to the upstream LLM. This is to enable compatilibity with any - and all models and SDKs, that may be used when calling the AI services. + AI Proxy now has a `preserve` option for `route_type`, where the requests and responses + are passed directly to the upstream LLM. This is to enable compatibility with any + and all models and SDKs that may be used when calling the AI services. type: feature scope: Plugin diff --git a/changelog/unreleased/kong/analytics-for-anthropic.yml b/changelog/unreleased/kong/analytics-for-anthropic.yml index 04de991390df..b0f5b1734e9b 100644 --- a/changelog/unreleased/kong/analytics-for-anthropic.yml +++ b/changelog/unreleased/kong/analytics-for-anthropic.yml @@ -1,4 +1,4 @@ message: | - **AI-proxy-plugin**: Fix the bug that the route_type `/llm/v1/chat` does not include the analytics in the responses. + **AI-proxy-plugin**: Fixed the bug that the `route_type` `/llm/v1/chat` didn't include the analytics in the responses. scope: Plugin type: bugfix diff --git a/changelog/unreleased/kong/bump-lua-protobuf.yml b/changelog/unreleased/kong/bump-lua-protobuf.yml index 769747d7b9a8..5121fbe4a306 100644 --- a/changelog/unreleased/kong/bump-lua-protobuf.yml +++ b/changelog/unreleased/kong/bump-lua-protobuf.yml @@ -1,3 +1,3 @@ -message: "Bump lua-protobuf to 0.5.1" +message: "Bumped lua-protobuf to 0.5.1" type: dependency scope: Core diff --git a/changelog/unreleased/kong/bump-lua-resty-http-0.17.2.yml b/changelog/unreleased/kong/bump-lua-resty-http-0.17.2.yml index 584a721f1789..2f655eefc2d8 100644 --- a/changelog/unreleased/kong/bump-lua-resty-http-0.17.2.yml +++ b/changelog/unreleased/kong/bump-lua-resty-http-0.17.2.yml @@ -1,2 +1,2 @@ -message: Bump lua-resty-http to 0.17.2. +message: Bumped lua-resty-http to 0.17.2. type: dependency diff --git a/changelog/unreleased/kong/bump-ngx-wasm-module.yml b/changelog/unreleased/kong/bump-ngx-wasm-module.yml index cddaf5cf0e1d..4eee2f9c0f4c 100644 --- a/changelog/unreleased/kong/bump-ngx-wasm-module.yml +++ b/changelog/unreleased/kong/bump-ngx-wasm-module.yml @@ -1,2 +1,2 @@ -message: "Bump `ngx_wasm_module` to `91d447ffd0e9bb08f11cc69d1aa9128ec36b4526`" +message: "Bumped `ngx_wasm_module` to `91d447ffd0e9bb08f11cc69d1aa9128ec36b4526`" type: dependency diff --git a/changelog/unreleased/kong/bump-v8.yml b/changelog/unreleased/kong/bump-v8.yml index 299dc747ad57..963121a5ede6 100644 --- a/changelog/unreleased/kong/bump-v8.yml +++ b/changelog/unreleased/kong/bump-v8.yml @@ -1,2 +1,2 @@ -message: "Bump `V8` version to `12.0.267.17`" +message: "Bumped `V8` version to `12.0.267.17`" type: dependency diff --git a/changelog/unreleased/kong/bump-wasmtime.yml b/changelog/unreleased/kong/bump-wasmtime.yml index 7d5374c59823..4b48ea0e3c7a 100644 --- a/changelog/unreleased/kong/bump-wasmtime.yml +++ b/changelog/unreleased/kong/bump-wasmtime.yml @@ -1,2 +1,2 @@ -message: "Bump `Wasmtime` version to `19.0.0`" +message: "Bumped `Wasmtime` version to `19.0.0`" type: dependency diff --git a/changelog/unreleased/kong/decrease-cocurrency-limit-of-timer-ng.yml b/changelog/unreleased/kong/decrease-cocurrency-limit-of-timer-ng.yml index 4e62daeb58db..ca5dd937aea9 100644 --- a/changelog/unreleased/kong/decrease-cocurrency-limit-of-timer-ng.yml +++ b/changelog/unreleased/kong/decrease-cocurrency-limit-of-timer-ng.yml @@ -1,3 +1,3 @@ message: | - Fix a bug where the ulimit setting (open files) is low Kong will fail to start as the lua-resty-timer-ng exhausts the available worker_connections. Decrease the concurrency range of the lua-resty-timer-ng library from [512, 2048] to [256, 1024] to fix this bug. + Fixed a bug where, if the the ulimit setting (open files) was low, Kong would fail to start as the `lua-resty-timer-ng` exhausted the available `worker_connections`. Decreased the concurrency range of the `lua-resty-timer-ng` library from `[512, 2048]` to `[256, 1024]` to fix this bug. type: bugfix diff --git a/changelog/unreleased/kong/disable-TLSv1_1-in-openssl3.yml b/changelog/unreleased/kong/disable-TLSv1_1-in-openssl3.yml index aa9305e77316..4ae267860471 100644 --- a/changelog/unreleased/kong/disable-TLSv1_1-in-openssl3.yml +++ b/changelog/unreleased/kong/disable-TLSv1_1-in-openssl3.yml @@ -1,3 +1,3 @@ -message: now TLSv1.1 and lower is by default disabled in OpenSSL 3.x +message: TLSv1.1 and lower versions are disabled by default in OpenSSL 3.x. type: feature scope: Configuration diff --git a/changelog/unreleased/kong/feat-ai-proxy-add-streaming.yml b/changelog/unreleased/kong/feat-ai-proxy-add-streaming.yml index 4f4f348fefc1..860545117130 100644 --- a/changelog/unreleased/kong/feat-ai-proxy-add-streaming.yml +++ b/changelog/unreleased/kong/feat-ai-proxy-add-streaming.yml @@ -1,4 +1,4 @@ message: | - **AI-Proxy**: add support for streaming event-by-event responses back to client on supported providers + **AI Proxy**: Added support for streaming event-by-event responses back to the client on supported providers. scope: Plugin type: feature diff --git a/changelog/unreleased/kong/feat-hybrid-sync-mixed-route-policy.yml b/changelog/unreleased/kong/feat-hybrid-sync-mixed-route-policy.yml index 4d469c5e9790..874c8220b02f 100644 --- a/changelog/unreleased/kong/feat-hybrid-sync-mixed-route-policy.yml +++ b/changelog/unreleased/kong/feat-hybrid-sync-mixed-route-policy.yml @@ -1,7 +1,7 @@ message: | - When CP runs with `expressions` flavor: - - if mixed config is detected and a lower DP is attached to the CP, no config will be sent at all - - if the expression is invalid on CP, no config will be sent at all - - if the expression is invalid on lower DP, it will be sent to the DP and DP validation will catch this and communicate back to the CP (this could result in partial config application) + Improved config handling when the CP runs with the router set to the `expressions` flavor: + - If mixed config is detected and a lower DP is attached to the CP, no config will be sent at all + - If the expression is invalid on the CP, no config will be sent at all + - If the expression is invalid on a lower DP, it will be sent to the DP and DP validation will catch this and communicate back to the CP (this could result in partial config application) type: feature scope: Core diff --git a/changelog/unreleased/kong/feat-increase-ai-anthropic-regex-expression-length.yml b/changelog/unreleased/kong/feat-increase-ai-anthropic-regex-expression-length.yml index 9d7d15da0b00..83fb98320185 100644 --- a/changelog/unreleased/kong/feat-increase-ai-anthropic-regex-expression-length.yml +++ b/changelog/unreleased/kong/feat-increase-ai-anthropic-regex-expression-length.yml @@ -1,4 +1,4 @@ message: | - **AI-Prompt-Guard**: increase the maximum length of regex expression to 500 for both allow and deny parameter + **AI Prompt Guard**: Increased the maximum length of regex expressions to 500 for the allow and deny parameters. scope: Plugin type: feature diff --git a/changelog/unreleased/kong/feat-wasm-general-shm-kv.yml b/changelog/unreleased/kong/feat-wasm-general-shm-kv.yml index 0c8eef3c5ec9..1171dca85a2b 100644 --- a/changelog/unreleased/kong/feat-wasm-general-shm-kv.yml +++ b/changelog/unreleased/kong/feat-wasm-general-shm-kv.yml @@ -1,5 +1,5 @@ message: | - Introduce `nginx_wasm_main_shm_kv` configuration entry, which enables + Introduced `nginx_wasm_main_shm_kv` configuration parameter, which enables Wasm filters to use the Proxy-Wasm operations `get_shared_data` and `set_shared_data` without namespaced keys. type: feature diff --git a/changelog/unreleased/kong/fix-aws-lambda-kong-latency.yml b/changelog/unreleased/kong/fix-aws-lambda-kong-latency.yml index 04d5ab637096..3475c8347bc6 100644 --- a/changelog/unreleased/kong/fix-aws-lambda-kong-latency.yml +++ b/changelog/unreleased/kong/fix-aws-lambda-kong-latency.yml @@ -1,3 +1,3 @@ -message: "**AWS-Lambda**: fix an issue that the latency attributed to AWS Lambda API requests will be counted as part of the latency in Kong" +message: "**AWS-Lambda**: Fixed an issue where the latency attributed to AWS Lambda API requests was counted as part of the latency in Kong." type: bugfix scope: Plugin diff --git a/changelog/unreleased/kong/fix-cjson-t-end.yml b/changelog/unreleased/kong/fix-cjson-t-end.yml index 3977de7b12f0..251b176367cc 100644 --- a/changelog/unreleased/kong/fix-cjson-t-end.yml +++ b/changelog/unreleased/kong/fix-cjson-t-end.yml @@ -1,3 +1,3 @@ message: | - Improve the robustness of lua-cjson when handling unexpected input. + Improved the robustness of lua-cjson when handling unexpected input. type: dependency diff --git a/changelog/unreleased/kong/fix-ctx-host-port.yml b/changelog/unreleased/kong/fix-ctx-host-port.yml index a6faa8c5d8fd..467029fb6307 100644 --- a/changelog/unreleased/kong/fix-ctx-host-port.yml +++ b/changelog/unreleased/kong/fix-ctx-host-port.yml @@ -1,5 +1,5 @@ message: | - **PDK:** fix kong.request.get_forwarded_port to always return a number which was caused by an incorrectly - stored string value in ngx.ctx.host_port. + **PDK:** Fixed `kong.request.get_forwarded_port` to always return a number, + which was caused by an incorrectly stored string value in `ngx.ctx.host_port`. type: bugfix scope: PDK diff --git a/changelog/unreleased/kong/fix-dbless-duplicate-target-error.yml b/changelog/unreleased/kong/fix-dbless-duplicate-target-error.yml index 082e5dd52180..1c13d09c7636 100644 --- a/changelog/unreleased/kong/fix-dbless-duplicate-target-error.yml +++ b/changelog/unreleased/kong/fix-dbless-duplicate-target-error.yml @@ -1,3 +1,3 @@ -message: "Fixed an issue wherein `POST /config?flatten_errors=1` could not return a proper response if the input included duplicate upstream targets" +message: "Fixed an issue where `POST /config?flatten_errors=1` could not return a proper response if the input included duplicate upstream targets." type: bugfix scope: Core diff --git a/changelog/unreleased/kong/fix-default-value-of-upstream-keepalive-max-requests.yml b/changelog/unreleased/kong/fix-default-value-of-upstream-keepalive-max-requests.yml index 45eedd995d64..2628170265da 100644 --- a/changelog/unreleased/kong/fix-default-value-of-upstream-keepalive-max-requests.yml +++ b/changelog/unreleased/kong/fix-default-value-of-upstream-keepalive-max-requests.yml @@ -1,5 +1,5 @@ message: | - Fixed default value in kong.conf.default documentation from 1000 to 10000 - for upstream_keepalive_max_requests option. + Fixed the default value in kong.conf.default documentation from 1000 to 10000 + for the `upstream_keepalive_max_requests` option. type: bugfix scope: Configuration diff --git a/changelog/unreleased/kong/fix-external-plugin-instance.yml b/changelog/unreleased/kong/fix-external-plugin-instance.yml index b92665f2d9be..6d3973bdbe27 100644 --- a/changelog/unreleased/kong/fix-external-plugin-instance.yml +++ b/changelog/unreleased/kong/fix-external-plugin-instance.yml @@ -1,5 +1,5 @@ message: | - Fix an issue where an external plugin (Go, Javascript, or Python) would fail to + Fixed an issue where an external plugin (Go, Javascript, or Python) would fail to apply a change to the plugin config via the Admin API. type: bugfix scope: Configuration diff --git a/changelog/unreleased/kong/fix-file-permission-of-logrotate.yml b/changelog/unreleased/kong/fix-file-permission-of-logrotate.yml index 2fb24c9e2f54..45452f2e5fdc 100644 --- a/changelog/unreleased/kong/fix-file-permission-of-logrotate.yml +++ b/changelog/unreleased/kong/fix-file-permission-of-logrotate.yml @@ -1,3 +1,3 @@ -message: update file permission of kong.logrotate to 644 +message: Updated the file permission of `kong.logrotate` to 644. type: bugfix scope: Core diff --git a/changelog/unreleased/kong/fix-hybrid-dp-certificate-with-vault-not-refresh.yml b/changelog/unreleased/kong/fix-hybrid-dp-certificate-with-vault-not-refresh.yml index 12f89fee2eca..17ef367fba9b 100644 --- a/changelog/unreleased/kong/fix-hybrid-dp-certificate-with-vault-not-refresh.yml +++ b/changelog/unreleased/kong/fix-hybrid-dp-certificate-with-vault-not-refresh.yml @@ -1,3 +1,3 @@ -message: Fixed a problem that in hybrid DP mode a certificate entity configured with vault reference may not get refreshed on time +message: Fixed a problem on hybrid mode DPs, where a certificate entity configured with a vault reference may not get refreshed on time. type: bugfix scope: Core diff --git a/changelog/unreleased/kong/fix-jwt-plugin-check.yml b/changelog/unreleased/kong/fix-jwt-plugin-check.yml index bbf3ed71b848..fa58f7b7d042 100644 --- a/changelog/unreleased/kong/fix-jwt-plugin-check.yml +++ b/changelog/unreleased/kong/fix-jwt-plugin-check.yml @@ -1,3 +1,3 @@ -message: "**Jwt**: fix an issue where the plugin would fail when using invalid public keys for ES384 and ES512 algorithms." +message: "**Jwt**: Fixed an issue where the plugin would fail when using invalid public keys for ES384 and ES512 algorithms." type: bugfix scope: Plugin diff --git a/changelog/unreleased/kong/fix-missing-router-section-of-request-debugging.yml b/changelog/unreleased/kong/fix-missing-router-section-of-request-debugging.yml index 7ae106f21bb3..b1fe73fced0c 100644 --- a/changelog/unreleased/kong/fix-missing-router-section-of-request-debugging.yml +++ b/changelog/unreleased/kong/fix-missing-router-section-of-request-debugging.yml @@ -1,3 +1,3 @@ -message: Fix the missing router section for the output of the request-debugging +message: Fixed the missing router section for the output of the request-debugging. type: bugfix scope: Core diff --git a/changelog/unreleased/kong/fix-mlcache-renew-lock-leaks.yml b/changelog/unreleased/kong/fix-mlcache-renew-lock-leaks.yml index d81d08171c70..06041d1b1154 100644 --- a/changelog/unreleased/kong/fix-mlcache-renew-lock-leaks.yml +++ b/changelog/unreleased/kong/fix-mlcache-renew-lock-leaks.yml @@ -1,4 +1,4 @@ message: | - Fixed an issue that leaking locks in the internal caching logic + Fixed an issue in the internal caching logic where mutexes could get never unlocked. type: bugfix scope: Core diff --git a/changelog/unreleased/kong/fix-router-rebuing-flag.yml b/changelog/unreleased/kong/fix-router-rebuing-flag.yml index 62740912f3c0..e13bd1c16e9b 100644 --- a/changelog/unreleased/kong/fix-router-rebuing-flag.yml +++ b/changelog/unreleased/kong/fix-router-rebuing-flag.yml @@ -1,5 +1,5 @@ message: | - Fixed an issue where router may not work correctly - when the routes configuration changed. + Fixed an issue where the router didn't work correctly + when the route's configuration changed. type: bugfix scope: Core diff --git a/changelog/unreleased/kong/fix-snis-tls-passthrough-in-trad-compat.yml b/changelog/unreleased/kong/fix-snis-tls-passthrough-in-trad-compat.yml index ab00e318f639..d806836e14ce 100644 --- a/changelog/unreleased/kong/fix-snis-tls-passthrough-in-trad-compat.yml +++ b/changelog/unreleased/kong/fix-snis-tls-passthrough-in-trad-compat.yml @@ -1,5 +1,5 @@ message: | - Fixed an issue where SNI-based routing does not work - using tls_passthrough and the traditional_compatible router flavor + Fixed an issue where SNI-based routing didn't work + using `tls_passthrough` and the `traditional_compatible` router flavor. type: bugfix scope: Core diff --git a/changelog/unreleased/kong/fix-upstream-status-unset.yml b/changelog/unreleased/kong/fix-upstream-status-unset.yml index eefb1e02bcf4..96fc0c1ee6d3 100644 --- a/changelog/unreleased/kong/fix-upstream-status-unset.yml +++ b/changelog/unreleased/kong/fix-upstream-status-unset.yml @@ -1,3 +1,3 @@ -message: fix a bug that `X-Kong-Upstream-Status` will not appear in the response headers even if it is set in the `headers` parameter in the kong.conf when the response is hit and returned by proxy cache plugin. +message: Fixed a bug that `X-Kong-Upstream-Status` didn't appear in the response headers even if it was set in the `headers` parameter in the `kong.conf` file when the response was hit and returned by the Proxy Cache plugin. scope: Core type: bugfix diff --git a/changelog/unreleased/kong/fix-vault-init-worker.yml b/changelog/unreleased/kong/fix-vault-init-worker.yml index d5315d0d7c28..e43ebfd529e3 100644 --- a/changelog/unreleased/kong/fix-vault-init-worker.yml +++ b/changelog/unreleased/kong/fix-vault-init-worker.yml @@ -1,3 +1,3 @@ -message: fix vault initialization by postponing vault reference resolving on init_worker +message: Fixed vault initialization by postponing vault reference resolving on init_worker type: bugfix scope: Core diff --git a/changelog/unreleased/kong/fix-wasm-disable-pwm-lua-resolver.yml b/changelog/unreleased/kong/fix-wasm-disable-pwm-lua-resolver.yml index f8c49499ee91..e7113efc506b 100644 --- a/changelog/unreleased/kong/fix-wasm-disable-pwm-lua-resolver.yml +++ b/changelog/unreleased/kong/fix-wasm-disable-pwm-lua-resolver.yml @@ -1,4 +1,4 @@ message: | - Disable usage of the Lua DNS resolver from proxy-wasm by default. + Disabled usage of the Lua DNS resolver from proxy-wasm by default. type: bugfix scope: Configuration diff --git a/changelog/unreleased/kong/flavor-expressions-supports-traditional-fields.yml b/changelog/unreleased/kong/flavor-expressions-supports-traditional-fields.yml index e6169297461e..13a86d486fec 100644 --- a/changelog/unreleased/kong/flavor-expressions-supports-traditional-fields.yml +++ b/changelog/unreleased/kong/flavor-expressions-supports-traditional-fields.yml @@ -1,7 +1,7 @@ message: | - Supported fields `methods`, `hosts`, `paths`, `headers`, - `snis`, `sources`, `destinations` and `regex_priority` - for the `route` entity when the `router_flavor` is `expressions`. + The route entity now supports the following fields when the + `router_flavor` is `expressions`: `methods`, `hosts`, `paths`, `headers`, + `snis`, `sources`, `destinations`, and `regex_priority`. The meaning of these fields are consistent with the traditional route entity. type: feature scope: Core diff --git a/changelog/unreleased/kong/key_auth_www_authenticate.yml b/changelog/unreleased/kong/key_auth_www_authenticate.yml index 3d1e12b085d7..c9d8fbb8f6fa 100644 --- a/changelog/unreleased/kong/key_auth_www_authenticate.yml +++ b/changelog/unreleased/kong/key_auth_www_authenticate.yml @@ -1,3 +1,3 @@ -message: Add WWW-Authenticate headers to all 401 response in key auth plugin. +message: Added WWW-Authenticate headers to all 401 responses in the Key Auth plugin. type: bugfix scope: Plugin diff --git a/changelog/unreleased/kong/log-serializer-receive-latency.yml b/changelog/unreleased/kong/log-serializer-receive-latency.yml index 75aaae7a75df..a032cd3a52d8 100644 --- a/changelog/unreleased/kong/log-serializer-receive-latency.yml +++ b/changelog/unreleased/kong/log-serializer-receive-latency.yml @@ -1,3 +1,3 @@ -message: 'Add `latencies.receive` property to log serializer' +message: 'Added the `latencies.receive` property to the log serializer' type: feature scope: PDK diff --git a/changelog/unreleased/kong/otel-increase-queue-max-batch-size.yml b/changelog/unreleased/kong/otel-increase-queue-max-batch-size.yml index 6936adcf7615..b6fec110784d 100644 --- a/changelog/unreleased/kong/otel-increase-queue-max-batch-size.yml +++ b/changelog/unreleased/kong/otel-increase-queue-max-batch-size.yml @@ -1,3 +1,3 @@ -message: "**Opentelemetry**: increase queue max batch size to 200" +message: "**Opentelemetry**: Increased queue max batch size to 200." type: performance scope: Plugin diff --git a/changelog/unreleased/kong/otel-sampling-panic-when-header-trace-id-enable.yml b/changelog/unreleased/kong/otel-sampling-panic-when-header-trace-id-enable.yml index 5efdededa3b4..5354c83e9f7f 100644 --- a/changelog/unreleased/kong/otel-sampling-panic-when-header-trace-id-enable.yml +++ b/changelog/unreleased/kong/otel-sampling-panic-when-header-trace-id-enable.yml @@ -1,3 +1,3 @@ -message: "**Opentelemetry**: fix otel sampling mode lua panic bug when http_response_header_for_traceid option enable" +message: "**Opentelemetry**: Fixed an OTEL sampling mode Lua panic bug, which happened when the `http_response_header_for_traceid` option was enabled." type: bugfix scope: Plugin diff --git a/changelog/unreleased/kong/plugin_server_restart.yml b/changelog/unreleased/kong/plugin_server_restart.yml index ed46b92bb16e..7e368b05c81c 100644 --- a/changelog/unreleased/kong/plugin_server_restart.yml +++ b/changelog/unreleased/kong/plugin_server_restart.yml @@ -1,3 +1,3 @@ -message: "**Plugin Server**: fix an issue where Kong fails to properly restart MessagePack-based pluginservers (used in Python and Javascript plugins, for example)" +message: "**Plugin Server**: Fixed an issue where Kong failed to properly restart MessagePack-based pluginservers (used in Python and Javascript plugins, for example)." type: bugfix scope: Core diff --git a/changelog/unreleased/kong/propagation-module-rework.yml b/changelog/unreleased/kong/propagation-module-rework.yml index 69f3dcb76752..249954c4a762 100644 --- a/changelog/unreleased/kong/propagation-module-rework.yml +++ b/changelog/unreleased/kong/propagation-module-rework.yml @@ -1,5 +1,5 @@ message: | - **OpenTelemetry, Zipkin**: the propagation module has been reworked, new + **OpenTelemetry, Zipkin**: The propagation module has been reworked. The new options allow better control over the configuration of tracing headers propagation. type: feature scope: Plugin diff --git a/changelog/unreleased/kong/revert-req-body-limitation-patch.yml b/changelog/unreleased/kong/revert-req-body-limitation-patch.yml index 55da8ff91977..4eb1d36f69f5 100644 --- a/changelog/unreleased/kong/revert-req-body-limitation-patch.yml +++ b/changelog/unreleased/kong/revert-req-body-limitation-patch.yml @@ -1,3 +1,3 @@ -message: revert the hard-coded limitation of the ngx.read_body() API in OpenResty upstreams' new versions when downstream connections are in HTTP/2 or HTTP/3 stream modes. +message: Reverted the hard-coded limitation of the `ngx.read_body()` API in OpenResty upstreams' new versions when downstream connections are in HTTP/2 or HTTP/3 stream modes. type: bugfix scope: Core diff --git a/changelog/unreleased/kong/set_grpc_tls_seclevel.yml b/changelog/unreleased/kong/set_grpc_tls_seclevel.yml index 02d068713e9f..a6b749e5b8dc 100644 --- a/changelog/unreleased/kong/set_grpc_tls_seclevel.yml +++ b/changelog/unreleased/kong/set_grpc_tls_seclevel.yml @@ -1,3 +1,3 @@ -message: Set security level of gRPC's TLS to 0 when ssl_cipher_suite is set to old +message: Set security level of gRPC's TLS to 0 when `ssl_cipher_suite` is set to `old`. type: bugfix scope: Configuration diff --git a/changelog/unreleased/kong/speed_up_router.yml b/changelog/unreleased/kong/speed_up_router.yml index c7e92efbe83c..5bafe74c293e 100644 --- a/changelog/unreleased/kong/speed_up_router.yml +++ b/changelog/unreleased/kong/speed_up_router.yml @@ -1,3 +1,3 @@ -message: Speeded up the router matching when the `router_flavor` is `traditional_compatible` or `expressions`. +message: Sped up the router matching when the `router_flavor` is `traditional_compatible` or `expressions`. type: performance scope: Performance diff --git a/changelog/unreleased/kong/update-ai-proxy-telemetry.yml b/changelog/unreleased/kong/update-ai-proxy-telemetry.yml index fcb68b218de6..d07e42b2fb18 100644 --- a/changelog/unreleased/kong/update-ai-proxy-telemetry.yml +++ b/changelog/unreleased/kong/update-ai-proxy-telemetry.yml @@ -1,3 +1,3 @@ -message: Update telemetry collection for AI Plugins to allow multiple plugins data to be set for the same request. +message: Updated telemetry collection for AI Plugins to allow multiple plugins data to be set for the same request. type: bugfix scope: Core diff --git a/changelog/unreleased/kong/wasm-bundled-filters.yml b/changelog/unreleased/kong/wasm-bundled-filters.yml index 836140270440..e826d6dcf6ee 100644 --- a/changelog/unreleased/kong/wasm-bundled-filters.yml +++ b/changelog/unreleased/kong/wasm-bundled-filters.yml @@ -1,3 +1,3 @@ -message: Add `wasm_filters` configuration value for enabling individual filters +message: Added the `wasm_filters` configuration parameter for enabling individual filters type: feature scope: Configuration From 1d1056e3d9ed0d6c51bc59695a12a3faf7b3fc6d Mon Sep 17 00:00:00 2001 From: hulk Date: Mon, 27 May 2024 15:44:13 +0800 Subject: [PATCH 2/3] fix(router/atc): URI captures are unavailable when the first capture group is absent (#13024) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix https://github.com/Kong/kong/issues/13014, https://konghq.atlassian.net/browse/KAG-4474 Co-authored-by: Xumin <100666470+StarlightIbuki@users.noreply.github.com> Co-authored-by: Chrono Co-authored-by: MikoĊ‚aj Nowak Co-authored-by: xumin --- .../fix-request-transformer-uri-replace.yml | 4 ++ kong/router/atc.lua | 16 ++++++- spec/01-unit/08-router_spec.lua | 20 +++++++++ .../36-request-transformer/02-access_spec.lua | 42 +++++++++++++++++++ 4 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/kong/fix-request-transformer-uri-replace.yml diff --git a/changelog/unreleased/kong/fix-request-transformer-uri-replace.yml b/changelog/unreleased/kong/fix-request-transformer-uri-replace.yml new file mode 100644 index 000000000000..02c55a15f70b --- /dev/null +++ b/changelog/unreleased/kong/fix-request-transformer-uri-replace.yml @@ -0,0 +1,4 @@ +message: | + Fixed an issue where the URI captures are unavailable when the first capture group is absent. +type: bugfix +scope: Core diff --git a/kong/router/atc.lua b/kong/router/atc.lua index c41af0da0bde..31aaf6c5a4ed 100644 --- a/kong/router/atc.lua +++ b/kong/router/atc.lua @@ -15,6 +15,7 @@ local assert = assert local setmetatable = setmetatable local pairs = pairs local ipairs = ipairs +local next = next local max = math.max @@ -344,6 +345,19 @@ local function set_upstream_uri(req_uri, match_t) end +-- captures has the form { [0] = full_path, [1] = capture1, [2] = capture2, ..., ["named1"] = named1, ... } +-- and captures[0] will be the full matched path +-- this function tests if there are captures other than the full path +-- by checking if there are 2 or more than 2 keys +local function has_capture(captures) + if not captures then + return false + end + local next_i = next(captures) + return next_i and next(captures, next_i) ~= nil +end + + function _M:matching(params) local req_uri = params.uri local req_host = params.host @@ -387,7 +401,7 @@ function _M:matching(params) service = service, prefix = request_prefix, matches = { - uri_captures = (captures and captures[1]) and captures or nil, + uri_captures = has_capture(captures) and captures or nil, }, upstream_url_t = { type = service_hostname_type, diff --git a/spec/01-unit/08-router_spec.lua b/spec/01-unit/08-router_spec.lua index 046cb25bd8b0..025120392ecf 100644 --- a/spec/01-unit/08-router_spec.lua +++ b/spec/01-unit/08-router_spec.lua @@ -3484,6 +3484,26 @@ for _, flavor in ipairs({ "traditional", "traditional_compatible", "expressions" assert.is_nil(match_t.matches.headers) end) + it("uri_captures works well with the optional capture group. Fix #13014", function() + local use_case = { + { + service = service, + route = { + id = "e8fb37f1-102d-461e-9c51-6608a6bb8101", + paths = { [[~/(users/)?1984/(?profile)$]] }, + }, + }, + } + + local router = assert(new_router(use_case)) + local _ngx = mock_ngx("GET", "/1984/profile", { host = "domain.org" }) + router._set_ngx(_ngx) + local match_t = router:exec() + assert.falsy(match_t.matches.uri_captures[1]) + assert.equal("profile", match_t.matches.uri_captures.subpath) + assert.is_nil(match_t.matches.uri_captures.scope) + end) + it("returns uri_captures from a [uri regex]", function() local use_case = { { diff --git a/spec/03-plugins/36-request-transformer/02-access_spec.lua b/spec/03-plugins/36-request-transformer/02-access_spec.lua index bf3de4192826..aeffa72c7f45 100644 --- a/spec/03-plugins/36-request-transformer/02-access_spec.lua +++ b/spec/03-plugins/36-request-transformer/02-access_spec.lua @@ -131,6 +131,12 @@ describe("Plugin: request-transformer(access) [#" .. strategy .. "]", function() hosts = { "test28.test" } }) + local route29 = bp.routes:insert({ + hosts = { "test29.test" }, + paths = { "~/(gw/)?api/(?htest)$" }, + strip_path = false, + }) + bp.plugins:insert { route = { id = route1.id }, name = "request-transformer", @@ -471,6 +477,16 @@ describe("Plugin: request-transformer(access) [#" .. strategy .. "]", function() } } + bp.plugins:insert { + route = { id = route29.id }, + name = "request-transformer", + config = { + replace = { + uri = "/api/v2/$(uri_captures[\"subpath\"])", + } + } + } + assert(helpers.start_kong({ database = strategy, plugins = "bundled, request-transformer", @@ -1114,6 +1130,32 @@ describe("Plugin: request-transformer(access) [#" .. strategy .. "]", function() assert.is_truthy(string.find(json.data, "\"emptyarray\":[]", 1, true)) end) + it("replaces request uri with optional capture prefix", function() + local r = assert(client:send { + method = "GET", + path = "/api/htest", + headers = { + host = "test29.test" + } + }) + assert.response(r).has.status(404) + local body = assert(assert.response(r).has.jsonbody()) + assert.equals("/api/v2/htest", body.vars.request_uri) + end) + + it("replaces request uri with the capature prefix", function() + local r = assert(client:send { + method = "GET", + path = "/gw/api/htest", + headers = { + host = "test29.test" + } + }) + assert.response(r).has.status(404) + local body = assert(assert.response(r).has.jsonbody()) + assert.equals("/api/v2/htest", body.vars.request_uri) + end) + pending("escape UTF-8 characters when replacing upstream path - enable after Kong 2.4", function() local r = assert(client:send { method = "GET", From 80b02ec6b06fecca879e2af6de12a4e53f09e351 Mon Sep 17 00:00:00 2001 From: Chrono Date: Mon, 27 May 2024 16:40:48 +0800 Subject: [PATCH 3/3] refactor(admin_gui): break the loop early and minor style clean (#13079) --- kong/admin_gui/utils.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kong/admin_gui/utils.lua b/kong/admin_gui/utils.lua index fdd2f31943cb..3567f1652fcf 100644 --- a/kong/admin_gui/utils.lua +++ b/kong/admin_gui/utils.lua @@ -1,20 +1,25 @@ local _M = {} + -- return first listener matching filters function _M.select_listener(listeners, filters) for _, listener in ipairs(listeners) do local match = true + for filter, value in pairs(filters) do if listener[filter] ~= value then match = false + break end end + if match then return listener end end end + function _M.prepare_variable(variable) if variable == nil then return "" @@ -23,4 +28,5 @@ function _M.prepare_variable(variable) return tostring(variable) end + return _M