Skip to content
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

[pull] master from Kong:master #69

Open
wants to merge 4,427 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
4427 commits
Select commit Hold shift + click to select a range
af9eb5e
chore(clustering): adjust error log levels for control plane connecti…
tzssangglass Nov 18, 2024
dcf89f3
fix(plugins/jwt): ensure `rsa_public_key` isn't base64-decoded
jizhilong Nov 18, 2024
cc7c373
feat(prometheus): add wasmx metrics (#13681)
casimiro Nov 18, 2024
96a8bac
chore(ci): resolve redis port conflicts for redis-auth
windmgc Oct 29, 2024
3140f81
chore(make): install rust toolchain in the dev target (#13873)
oowl Nov 19, 2024
7c17e3b
tests(basic-auth): fix flaky on invalidations spec (#13890)
Oyami-Srk Nov 19, 2024
4ab1a4a
tests(clustering): enable incremental sync in node-id-persistence_spe…
chronolaw Nov 20, 2024
05f3136
tests(clustering): enable incremental sync in pki_spec (#13892)
chronolaw Nov 20, 2024
7d2f2c1
feat(clustering/rpc): use meta RPC call for handshaking with CP (#13887)
chronolaw Nov 20, 2024
007d34e
feat(llm): implement the new ai plugin base framework
fffonion Nov 19, 2024
3f05ce3
fix(pdk): throw check phases error in correct level
fffonion Nov 19, 2024
a4c1309
refactor(ai-proxy): migrate ai-proxy to new framework
fffonion Nov 19, 2024
ddb18c8
refactor(ai-prompt-decorator): migrate ai-prompt-decorator to new
fffonion Nov 19, 2024
ba2ef90
refactor(ai-prompt-guard): migrate ai-prompt-guard to new framework
fffonion Nov 19, 2024
8cc4730
refactor(ai-prompt-template): migrate ai-prompt-template to new
fffonion Nov 19, 2024
962e1f3
refactor(ai-plugins): migrate ai transformer plugins to new framework
fffonion Nov 19, 2024
5901c5a
chore(build): add a shortcut to build cacheable targets
ADD-SP Nov 5, 2024
9918f6d
chore(build): refine the locking of Rust dependencies
ADD-SP Nov 5, 2024
9eaf491
chore(build): bump rust toolchain to 1.82.0 (#13905)
Oyami-Srk Nov 21, 2024
251665a
chore(deps): bump atc-router from v1.6.2 to v1.7.0 (#13903)
Oyami-Srk Nov 22, 2024
c924a23
fix(dao): page size `1` now works correctly for DB-less (#13908)
StarlightIbuki Nov 22, 2024
b4f1c20
tests(sync): temporarily disable incremental sync tests (#13906)
StarlightIbuki Nov 22, 2024
7bb20ea
feat(dbless): restore the removed tags based query support (#13907)
chobits Nov 22, 2024
fa9bed9
feat(plugin/redirect): plugin to redirect requests to a new location …
mheap Nov 22, 2024
11bc3b6
feat(cli): add 'drain' CLI command to set /status/ready to 503 (#13838)
tzssangglass Nov 25, 2024
33407df
fix(llm): only send gzip header when response is from upstream (#13912)
fffonion Nov 25, 2024
c5199ff
feat(llm): add huggingface provider (#13484)
srb3 Nov 25, 2024
e5f5ca8
fix(ai-proxy): (Bedrock)(AG-154) fixed tools-functions calls coming b…
tysoekong Oct 16, 2024
0428487
fix(ai-proxy): (Gemini)(AG-154) fixed tools-functions calls coming ba…
tysoekong Oct 16, 2024
720ab02
fix(ai-proxy): (Gemini)(AG-154): content-safety failure no longer blo…
tysoekong Oct 21, 2024
d19edcf
fix(ai-proxy): (Cohere-Anthropic)(AG-154): fix cohere and anthropic f…
AntoineJac Nov 13, 2024
db9d6ae
fix(ai-proxy): (Bedrock)(AG-166) properly map guardrails between requ…
tysoekong Nov 17, 2024
0feb92a
Update changelog for 3.8.1 (#13921)
kevwilliams Nov 25, 2024
6fdad25
fix(clustering/rpc): remove header `X-Kong-Node-ID` (#13918)
chronolaw Nov 26, 2024
60d4bad
fix(cd): install config-manager for rhel9 (#10796) (#13926)
fffonion Nov 26, 2024
8ef295c
chore(deps): bump ngx_wasm_module to 9136e463a6f1d80755ce66c88c3ddecd…
github-actions[bot] Nov 26, 2024
b1cf758
fix(plugins): load wasm filter plugins before external plugins
flrgh Nov 26, 2024
23b2ae1
fix(clustering/rpc): try sync after rpc is ready (#13901)
chronolaw Nov 27, 2024
5291391
fix(clustering/rpc): inert rpc protocol by default in 3.9 (#13925)
chronolaw Nov 27, 2024
67bb527
fix(core): initialize route to avoid race (HTTP 500 error) (#13924)
StarlightIbuki Nov 27, 2024
dee55bd
fix(db): restore default db page size (#13913)
chronolaw Nov 27, 2024
c98f385
fix(clustering): use RPC handshake reported node info in `clustering_…
chronolaw Nov 27, 2024
ad5fdef
fix(clustering/rpc): `rpc_capabilities` should be encoded as array (#…
chronolaw Nov 27, 2024
e457f6c
tests(clustering): enable incremental sync in hybrid mode (#13914)
chronolaw Nov 28, 2024
ef762bb
refactor(clustering/sync): use CLUSTERING_PING_INTERVAL as sync delay…
chronolaw Nov 28, 2024
98563fd
chore(cd): run CD in ubuntu-24.04
fffonion Nov 28, 2024
a13ed4a
fix(schema): run check on invalid field (#13923)
gszr Nov 28, 2024
3f5e6ce
docs(acme): describe storage limitations in hybrid and Konnect for AC…
lena-larionova Nov 29, 2024
5ba6e7e
tests(dao): match plugin versions greater than 9 (#13945)
locao Nov 29, 2024
f430026
fix(AG-178): set correct conf field for error logger
tysoekong Nov 26, 2024
1f158b1
fix(AG-178): send correct object to ctx buffer
tysoekong Nov 26, 2024
55e7241
fix(AG-178): make analytics collection run AFTER response transformation
tysoekong Nov 26, 2024
08bf1a2
fix(AG-178): divide by zero protection on analytics maths
tysoekong Nov 26, 2024
34cd042
fix(AG-178): properly support all streaming content types
tysoekong Nov 26, 2024
e02fd84
fix(AG-178): (ai-transformers): add statistic logger test for non-ope…
tysoekong Nov 26, 2024
db5618f
fix(AG-178): add logging tests for non-openai format 'gemini'
tysoekong Nov 27, 2024
bd526e5
fix(AG-178): add logging tests for streaming
tysoekong Nov 27, 2024
581571b
fix(AG-178): fix gemini parsing multiple chained tool calls
tysoekong Nov 27, 2024
e053601
fix(llm): fix streaming sse filter not ran twice and prompt token cou…
tysoekong Nov 28, 2024
a87e708
fix(sync): extend wait time for RPC layer initialization (#13939)
chobits Nov 29, 2024
eff5e8f
fix(patches): add patches from upstream openresty (#13640)
catbro666 Nov 29, 2024
78577cc
refactor(clustreing/rpc): constant for json rpc version (#13902)
chronolaw Nov 29, 2024
fd73779
fix(clustering/sync): avoid long delay caused by race condition (#13896)
StarlightIbuki Nov 29, 2024
bc0acea
fix(vault): support array type config reference and multiple nginx su…
windmgc Nov 29, 2024
9ca6f8c
chore(release): bump version to 3.10 as part of the feature freeze
kikito Nov 28, 2024
35aa605
fix(plugins): Improved the error message when an anonymous consumer
catbro666 Nov 27, 2024
b2f8366
Revert "chore(deps): bump atc-router from v1.6.2 to v1.7.0 (#13903)" …
Oyami-Srk Dec 2, 2024
f345fb5
feat(clustering): full sync threshold should be configureable (#13893)
chronolaw Dec 2, 2024
fb99349
tests(clustering/rpc): enable 09-hybrid_mode/01-sync_spec.lua for inc…
chobits Dec 2, 2024
a850c26
fix(ai-proxy): set content-length for non compressed response
fffonion Dec 2, 2024
2cdafdd
fix(ai-proxy): fix content-encoding for non 200 responses
fffonion Dec 2, 2024
0d59bd0
fix(wasm): execute filter plugins in a consistent order (#13946)
flrgh Dec 2, 2024
127d0a2
refactor(clustering/sync): clean the logic of sync_once (#13956)
chronolaw Dec 3, 2024
5e6b1f0
tests(clustering/sync): test with multiple dp nodes (#13957)
chronolaw Dec 3, 2024
a82ef7e
chore(ai): remove unused debug line
oowl Dec 2, 2024
0e8d3fb
fix(ai-prompr-decorator): fix unable to modify request
fffonion Dec 2, 2024
2df6a82
fix: prompt decorator crashes AI Gateway when trying to decorate "pre…
tysoekong Dec 2, 2024
9b2e133
Revert "refactor(clustering/sync): clean the logic of sync_once (#139…
chronolaw Dec 3, 2024
d921983
chore(tools): show PR title in the changelog/verify-prs report (#13974)
AndyZhang0707 Dec 5, 2024
10ed044
tests(*): remove useless strategy arg from reload_kong helper function
windmgc Dec 5, 2024
88ffdda
tests(clustering/rpc): add rpc service in custom plugin for testing (…
chronolaw Dec 6, 2024
7eecd96
tests(busted): make all setup() and teardown() calls lazy (#13984)
flrgh Dec 9, 2024
8f35f67
tests(wasm): add missing filter tags (#13995)
flrgh Dec 9, 2024
9251dc7
chore(cd): remove ubuntu-20.04
fffonion Dec 6, 2024
96076c3
Revert "chore(cd): remove ubuntu-20.04"
fffonion Dec 10, 2024
b594b1d
style(clustering): log pings only when the hash changes (#13885)
aryan9600 Dec 10, 2024
ce668cc
fix(sync): do not introduce router rebuild timer for full sync (#14001)
chobits Dec 10, 2024
d40cedd
fix(prometheus): use configure() handler to toggle upstream_health_me…
flrgh Dec 11, 2024
358fff3
tests(*): shutdown timerng instance after test completion (#14005)
flrgh Dec 11, 2024
2af3a76
refactor(sandbox): improve sandbox (#10900)
bungle Dec 13, 2024
9dded31
fix(dbless): nest unique field errors for child entities (#14017)
flrgh Dec 16, 2024
f10cd09
chore(wasm): remove bundled datakit filter (#14013)
flrgh Dec 16, 2024
eeded78
refactor(clustering/sync): clean the logic of sync_once_impl() (#14024)
chronolaw Dec 16, 2024
fad17ba
fix(clustering/rpc): support `cluster_use_proxy` option for clusterin…
chobits Dec 17, 2024
f3f77eb
chore(build): allow github_release to download without extract (#14027)
fffonion Dec 17, 2024
59118e2
refactor(clustering/rpc): rename to cluster_rpc_sync (#14025)
chronolaw Dec 18, 2024
be7e356
feat(clustering/rpc): support jsonrpc notification (#13948)
chronolaw Dec 18, 2024
33a43c7
docs(release): generate 3.9.0 changelog (#13935) (#14031)
kikito Dec 18, 2024
f7f7a23
fix(db): ensure that flattened_errors is encoded as a JSON array (#14…
flrgh Dec 18, 2024
705860c
docs(readme): add references to Konnect in getting started guide
jessemiller Dec 19, 2024
14b1bf9
chore(deps): bump lua-kong-nginx-module to 0.14.0 (#14037)
tzssangglass Dec 20, 2024
ab888cc
feat(clustering/rpc): emit event when RPC becomes ready (#14034)
chronolaw Dec 20, 2024
d07425b
refactor(clustering/rpc): simplify the implementation (#14026)
chronolaw Dec 23, 2024
1458161
perf(core): reduce LMDB size by optimizing key format (#14028)
chobits Dec 23, 2024
51cb5f1
tests(clustering): dp status ready when use RPC Sync (#14035)
lhanjian Dec 23, 2024
dc1a42d
close socket connection when websocket connect failed to avoid potent…
ProBrian Dec 23, 2024
5ab8c15
feat(opentelemetry):set variable resource attributes
SuzyWangIBMer Nov 5, 2024
5b0da6d
test(opentelemetry): support variable resource attributes
SuzyWangIBMer Nov 6, 2024
c77a178
feat(patch): control the proxy_upstream in lua side (#14029)
oowl Dec 23, 2024
8e14a18
feat(clustering/rpc): add dp labels support (#14046)
chronolaw Dec 24, 2024
91367c4
tests(balancer): assertions in test should using `asset.is_true` (#14…
StarlightIbuki Dec 26, 2024
bea968c
docs(changelog): fix the broken 3.9.0 link in CHANGELOG.md (#14058)
AndyZhang0707 Dec 27, 2024
d303ae6
tests(clustering): rpc test framework (#14030)
StarlightIbuki Dec 27, 2024
0ebc358
feat(clustering/rpc): add support for cert details (#14050)
chronolaw Dec 30, 2024
0b74d0f
style(pdk): rename some variables (#14063)
chronolaw Dec 30, 2024
5c78fb8
perf(runloop): load service with `route.ws_id` while building routers…
chobits Dec 30, 2024
938747a
feat(sessions): store session's meatadata (#13990)
raoxiaoyan Dec 31, 2024
4c1bd2e
docs(changelog): remove the incorrect merge conflict line (#14060)
AndyZhang0707 Dec 31, 2024
24bdacb
docs(changelog): clarify the changelog entry of #14038 (#14066)
ProBrian Dec 31, 2024
6a36c4d
fix(certificate): unable to refresh certificate entity with vault ref…
ms2008 Dec 24, 2024
1b52c4a
feat(clustering/rpc): always sync when rpc connected (#14070)
chronolaw Jan 2, 2025
e0d6df7
fix(clustering/rpc): check deltas if it is nil (#14064)
chronolaw Jan 2, 2025
33523c9
fix(clustering/rpc): invoke `notify_new_version` on events `clusterin…
chronolaw Jan 3, 2025
45afb4d
feat(clustering/rpc): stop `ngx.timer.every` if no `sync.v2` (#14076)
chronolaw Jan 3, 2025
eb3293c
feat(clustering/rpc): generate rpc disconnected event
chronolaw Jan 2, 2025
df6cc59
fix(clustering/rpc): fix mistake of stop timer
chronolaw Jan 6, 2025
3636949
fix(clustering/rpc): dont start too many timers for sync (#14089)
chronolaw Jan 8, 2025
096d475
fix(session): adds a compatablity for session (#14085)
raoxiaoyan Jan 8, 2025
bb0a33e
chore(CI): remove `release-and-tests-fail-bot.yml` (#14090)
ADD-SP Jan 8, 2025
bd70457
fix(clustering/rpc): check return value of `kong.timer` (#14112)
chronolaw Jan 9, 2025
0a440b6
chore(ci): pin third-party GitHub actions to specific commit hashes (…
Water-Melon Jan 9, 2025
b7f5ed2
fix(llm): response stream chunking de-buffering (#14079)
oowl Jan 9, 2025
f4d9c7f
fix(core): set correct permissions for socket path when umask is set …
tzssangglass Jan 9, 2025
24b6212
fix(workflow): rename workflows (#14117)
AndyZhang0707 Jan 9, 2025
3e1faac
fix(workflow): remove unused pr-diff workflow (#14119)
AndyZhang0707 Jan 9, 2025
1903d97
chore(build): rename rust target wasm32-wasi to wasm32-wasip1 (#13708)
flrgh Jan 10, 2025
4ee00b3
feat(clustering/rpc): change sync version to string (#14078)
chronolaw Jan 12, 2025
8593695
fix(balancer): handle hyphenated-Pascal-case headers in consistent ha…
tzssangglass Jan 13, 2025
162a782
fix(clustering/rpc): sync if versions dont equal (#14125)
chronolaw Jan 13, 2025
95755c3
docs: fix a typo in bash commands of crate_locks readme (#14137)
Oyami-Srk Jan 13, 2025
8b65c9d
chore(deps): bump atc-router from v1.6.2 to 1.7.1 (#14138)
Oyami-Srk Jan 13, 2025
9c48b27
tests(clustering): simplify hybrid status tests (#14136)
chronolaw Jan 13, 2025
4d56a90
refactor(clustering/rpc): move is_valid_version() to strategies (#14135)
chronolaw Jan 14, 2025
65f43be
fix(runloop): skip router rebuilding if reconfigure is running (#14056)
ADD-SP Jan 14, 2025
a4d126c
tests(clustering/rpc): add cases for notifications (#14129)
chronolaw Jan 14, 2025
9aacc33
fix(clustering/rpc): record the default workspace after the dropping …
ADD-SP Jan 14, 2025
b441f1e
tests(clustering): enable rpc sync on test (#14142)
lhanjian Jan 14, 2025
1c2ea57
feat(clustering/rpc): support rpc batching on dp side (#14040)
chronolaw Jan 14, 2025
a61ef41
fix(changelog): add the missing changelog of AI analytics breaking (#…
fffonion Jan 14, 2025
f1f947d
style(clustering/rpc): fix typo of META_V1 (#14158)
chronolaw Jan 14, 2025
f68de81
Revert "tests(clustering): enable rpc sync on test (#14142)"
chronolaw Jan 14, 2025
55afae5
fix(declarative): generate correct uuid for transient entities (#14082)
windmgc Jan 14, 2025
e9510e9
chore(cd): update prerelease docker repository (#14121)
AndyZhang0707 Jan 15, 2025
17836b4
fix(ai): fix Azure streaming with raw JSON transmission mode (#14148)
tysoekong Jan 15, 2025
665eaad
fix(grpc-web & grpc-gateway plugins): Fixed a bug where the `TE`
liverpool8056 Jan 15, 2025
6df1cf9
chore(ci): pin 3rd-party actions to specific commit hashes (#14165)
Water-Melon Jan 16, 2025
522c512
tests(clustering/rpc): add cases for sync.v2.get_delta (#14151)
chronolaw Jan 16, 2025
a6895f6
tests(clustering/rpc): add cases for rpc error handler (#14164)
chronolaw Jan 16, 2025
ce15c78
fix(file-log): reject file path that has leading/trailing space (#14141)
raoxiaoyan Jan 16, 2025
902e16a
tests(clustering): clean assertions in batch call tests (#14177)
chronolaw Jan 17, 2025
dbc9e8a
tests(correlation-id): fix flaky test (#14176)
ADD-SP Jan 17, 2025
e5f959d
chore(ci): bump action-slack-notify and public-shared-actions (#14181)
Water-Melon Jan 17, 2025
6a81453
tests(clustering): errors spec only for sync.v1 (#14179)
chronolaw Jan 17, 2025
4b57b91
fix(ai-proxy): fix a bug in the Azure provider where overrides would…
oowl Jan 17, 2025
443c075
fix(ai): (cohere) support new application/stream+json default stream …
oowl Jan 17, 2025
63c497f
tests(clustering/rpc): add cases for sync.v2.notify_new_version (#14174)
chronolaw Jan 20, 2025
3a13b91
chore(deps): bump libexpat to 2.6.4 (#14191)
Water-Melon Jan 20, 2025
9401292
feat(patch): refresh upstream uri variable when proxy pass balancer r…
oowl Jan 20, 2025
398172d
feat(patch): backport balancer.set_upstream_tls feature from openrest…
oowl Jan 20, 2025
7fd7f04
feat(pdk): dynamic control upstream tls when kong.service.request.set…
oowl Jan 20, 2025
122810c
refactor(clustering): use tools.table.EMPTY to avoid overhead (#14180)
chronolaw Jan 20, 2025
4448eef
feat(clustering/rpc): rpc batching on concentrator (#14055)
chronolaw Jan 20, 2025
d979887
feat(sync): more logs during the sync (#14197)
StarlightIbuki Jan 20, 2025
78d2712
fix(core): add `tls_verify`, `tls_verify_depth`, `ca_certificates` of…
catbro666 Jan 21, 2025
0add6a5
chore(changelog): add a changelog for bumping libexpat (#14207)
Water-Melon Jan 21, 2025
b728232
chore(changelog): update changelog for bumping libexpat (#14210)
Water-Melon Jan 21, 2025
dfc955e
fix(clustering/rpc): sync retry timeout due to block (#14195)
StarlightIbuki Jan 21, 2025
576cdc8
chore(deps): bump openssl to 3.4.0 (#14146)
locao Jan 21, 2025
f657890
feat(clustering/rpc): update dp status after syncing (#14205)
chronolaw Jan 22, 2025
cb31e28
fix(clustering/rpc): warning log level for sync retry failing (#14192)
chronolaw Jan 22, 2025
be10aa9
refactor(clustering/rpc): wait 5 seconds for rpc queue (#14189)
chronolaw Jan 22, 2025
91161d9
fix(clustering): the version `3.10.0.0` assigned incorrect number (#1…
raoxiaoyan Jan 22, 2025
d80ff4b
tests(clustering): enable rpc sync for correlation-id (#14171)
lhanjian Jan 22, 2025
1d0f212
refactor(clustering/rpc): reshape do_sync (#14199)
StarlightIbuki Jan 22, 2025
c85bc75
feat(clustering/sync): validate deltas when syncing (#14127)
chobits Jan 22, 2025
c4093c0
fix(clustering/rpc): added required field for mocked workspace to byp…
chobits Jan 22, 2025
78c6923
chore(ci): fix luarocks script redirect typo (#14153)
windmgc Jan 22, 2025
6837e4d
tests(clustering): move validate_deltas to unit tests (#14215)
chronolaw Jan 23, 2025
7a505ea
fix(core): separate pluginserver runtime data from kong configuration…
ProBrian Jan 23, 2025
e482298
chore: remove kong.tls.plugin code to reduce ce and ee conflict
oowl Jan 24, 2025
35a1052
chore: backport ee next upstream retry runloop change to ce
oowl Jan 24, 2025
8e441df
chore(deps): bump openresty to 1.27.1.1 (#14163)
bungle Jan 27, 2025
71e7019
chore(*): new dns client consistent with EE
samugi Jan 21, 2025
009e80c
feat(prometheus): expose controlplane connectivity state as a gauge (…
aryan9600 Jan 28, 2025
7dbaebd
chore(patches): backport revert override of ljitd (#14230)
bungle Jan 29, 2025
9d73444
chore(deps): bump dev dep of luacov from 1.5.0 to 1.6.0
bungle Jan 28, 2025
ac6d865
chore(deps): bump dev dep of bazelisk from 1.20.0 to 1.25.0
bungle Jan 28, 2025
ebfac0c
chore(deps): bump kong nginx module from 0.15.0 to 0.15.1
bungle Jan 28, 2025
b90220c
chore(deps): bump snappy from 1.2.0 to 1.2.1
bungle Jan 28, 2025
177c22f
chore(deps): bump lua-resty-simdjson from 1.1.0 to 1.2.0
bungle Jan 28, 2025
8eaeef1
chore(deps): bump nfpm from 2.37.1 to 2.41.2
bungle Jan 28, 2025
3d921b1
fix(clustering/sync): fix default workspace check (#14220)
Oyami-Srk Jan 31, 2025
a5c092e
change key-sets to Key Sets to match Konnect in description text
Guaris Jan 30, 2025
befb322
chore(ci): update build-wasm-test-filters action
flrgh Jan 27, 2025
36e329e
chore(clustering): do not enable kong.sync.v2 when connecting dp is o…
bungle Feb 3, 2025
e48dfcc
chore(deps): bump ngx_wasm_module to 7042e29b059ae9831dc2d8cec6043e0d…
Jan 23, 2025
60b181f
Revert "chore(deps): bump openssl to 3.4.0 (#14146)"
locao Feb 4, 2025
24f312c
fix(prometheus): add a toggle switch for wasm metrics export
flrgh Dec 2, 2024
c7a80d7
tests(*): make nginx_worker_processes to take effect properly (#14222)
ms2008 Feb 5, 2025
d47eab6
fix(clustering/sync): insert default values to delta entities before …
chobits Feb 5, 2025
004eee9
fix(llm): fix gzip handling when using multiple AI plugins
fffonion Jan 21, 2025
6617d58
fix(clustering/rpc): add random for timer‘s name (#14241)
chronolaw Feb 5, 2025
cb90115
fix(certificate): properly throw errors when parsing certificate from…
ms2008 Feb 5, 2025
70b4689
tests(clustering/rpc): add integration test for deltas validation (#1…
chronolaw Feb 5, 2025
55e4ff5
style(daos): rename function parameter to keep consistency (#14242)
Oyami-Srk Feb 6, 2025
2582e76
fix(response-ratelimiting): fix missing usage headers for upstream (#…
t-yuki Feb 6, 2025
0ba6c08
fix(llm): mark model.options.upstream_path as deprecated (#14178)
fffonion Feb 6, 2025
7d0e5c9
tests(clustering/rpc): more cases for deltas validation (#14243)
chronolaw Feb 7, 2025
e950249
tests(clustering/rpc): enable rpc sync for config compat (#14245)
chronolaw Feb 7, 2025
b1d10c4
fix(llm): fix error when upstream_url missing trailing slash (#14186)
fffonion Feb 7, 2025
04f8094
fix(config): correct option name for kong_cache (#14173)
ms2008 Feb 10, 2025
706a32e
fix(clustering/rpc): do not log disconnected node for `kong.sync.v2.n…
chronolaw Feb 12, 2025
2af61c1
chore(sandbox): allow more sub-modules with sandboxed handlers (#14247)
bungle Feb 12, 2025
99fb920
chore(tests): stabilize flaky tests of response rate limiting plugin …
ProBrian Feb 12, 2025
417a7f9
feat(clustering/sync): flatten and report validation error (#14262)
chobits Feb 14, 2025
d1af0ef
feat(clustering/rpc): correct rpc disconnected event on dp side (#14279)
chronolaw Feb 14, 2025
5e7b8b5
perf(tools/string): a way faster strip function
bungle Feb 10, 2025
ad18d7d
chore(logging): reduce excessive log flooding on debug logs (#10652)
bungle Feb 13, 2025
5badd8e
chore(logging): reduce excessive log flooding on debug logs (follow up)
bungle Feb 13, 2025
712efe9
chore(changelog): add some entries to changelog (#14258)
bungle Feb 14, 2025
479274e
fix(pdk): make kong.service.request.clear_query_arg encode spaces as …
bungle Feb 14, 2025
716a11b
fix(clustering/rpc): fix error message for metacall (#14283)
chronolaw Feb 17, 2025
d5fcb42
tests(clustering/wasm): enable rpc sync tests for wasm partially (#14…
chronolaw Feb 17, 2025
116babe
fix(clustering/rpc): do not send error response for rpc notification …
chronolaw Feb 17, 2025
87e9a76
feat(cors): add an option to skip return ACAO when no origin in requ…
lhanjian Feb 17, 2025
568d23a
refactor(clustering/rpc): rpc sync should start without delay (#14285)
chronolaw Feb 17, 2025
840b9bd
chore(deps): bump pcre2 library from 10.44 to 10.45 (#14280)
bungle Feb 17, 2025
dfa83fb
ci(*): skip labeler on fork PRs
samugi Feb 14, 2025
f4835f2
fix(db): add missing select statement for export (#14290)
Oyami-Srk Feb 19, 2025
296d682
feat(clustering/sync): add strict validation for delta workspace id (…
chobits Feb 19, 2025
a4c0b46
fix(clustering/rpc): set default value for sync entities (#14293)
chronolaw Feb 20, 2025
7fcde18
chore(tracing): log instead of throwing error
samugi Feb 19, 2025
e20ab83
fix(clustering/sync): prioritize using entity ws_id during validation…
chobits Feb 20, 2025
b1cd4bb
chore(deps): bump OpenSSL to 3.4.1
locao Feb 13, 2025
f040604
tests(cmd): fix flaky test (#14301)
ADD-SP Feb 21, 2025
bd936d5
tests(clustering/sync): wait for rpc sync log line (#14274)
Oyami-Srk Feb 21, 2025
a77c8d9
refactor(clustering/rpc): code clean for `validate_deltas()` (#14303)
chronolaw Feb 24, 2025
4278c1b
chore(spec): generate_keys supports EC key (#14184)
catbro666 Feb 24, 2025
113af31
fix(clustering/rpc): validate version string more strictly (#14311)
ADD-SP Feb 25, 2025
30befab
refactor(clustering/rpc): clean default_workspace logic (#14304)
chronolaw Feb 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(clustering/rpc): emit event when RPC becomes ready (Kong#14034)
This removes the artificial race condition on sleeping a few seconds before starting the sync poll, resulting
in cleaner code and less error logs.

KAG-5895
KAG-5891
  • Loading branch information
chronolaw authored Dec 20, 2024
commit ab888cc7951277b522e4393c43b38968cd79ae1d
48 changes: 44 additions & 4 deletions kong/clustering/data_plane.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,50 @@ function _M:init_worker(basic_info)
self.plugins_list = basic_info.plugins
self.filters = basic_info.filters

-- only run in process which worker_id() == 0
assert(ngx.timer.at(0, function(premature)
self:communicate(premature)
end))
local function start_communicate()
assert(ngx.timer.at(0, function(premature)
self:communicate(premature)
end))
end

-- does not config rpc sync
if not kong.sync then
start_communicate()
return
end

local worker_events = assert(kong.worker_events)

-- if rpc is ready we will check then decide how to sync
worker_events.register(function(capabilities_list)
-- we only check once
if self.inited then
return
end

local has_sync_v2

-- check cp's capabilities
for _, v in ipairs(capabilities_list) do
if v == "kong.sync.v2" then
has_sync_v2 = true
break
end
end

-- cp supports kong.sync.v2
if has_sync_v2 then
return
end

ngx_log(ngx_WARN, "sync v1 is enabled due to rpc sync can not work.")

self.inited = true

-- only run in process which worker_id() == 0
start_communicate()

end, "clustering:jsonrpc", "connected")
end


Expand Down
10 changes: 10 additions & 0 deletions kong/clustering/rpc/manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,16 @@ function _M:_meta_call(c, meta_cap, node_id)
list = capabilities_list,
}

-- tell outside that rpc is ready
local worker_events = assert(kong.worker_events)

-- notify this worker
local ok, err = worker_events.post_local("clustering:jsonrpc", "connected",
capabilities_list)
if not ok then
ngx_log(ngx_ERR, _log_prefix, "unable to post rpc connected event: ", err)
end

return true
end

Expand Down
35 changes: 32 additions & 3 deletions kong/clustering/services/sync/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,39 @@ function _M:init_worker()
return
end

-- sync to CP ASAP
assert(self.rpc:sync_once(FIRST_SYNC_DELAY))
local worker_events = assert(kong.worker_events)

assert(self.rpc:sync_every(EACH_SYNC_DELAY))
-- if rpc is ready we will start to sync
worker_events.register(function(capabilities_list)
-- we only check once
if self.inited then
return
end

local has_sync_v2

-- check cp's capabilities
for _, v in ipairs(capabilities_list) do
if v == "kong.sync.v2" then
has_sync_v2 = true
break
end
end

-- cp does not support kong.sync.v2
if not has_sync_v2 then
ngx.log(ngx.WARN, "rpc sync is disabled in CP.")
return
end

self.inited = true

-- sync to CP ASAP
assert(self.rpc:sync_once(FIRST_SYNC_DELAY))

assert(self.rpc:sync_every(EACH_SYNC_DELAY))

end, "clustering:jsonrpc", "connected")
end


Expand Down
1 change: 1 addition & 0 deletions kong/clustering/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ end

function _M.is_dp_worker_process()
if kong.configuration.role == "data_plane"
and not kong.sync -- privileged agent is only enabled when rpc sync is off
and kong.configuration.dedicated_config_processing == true then
return process_type() == "privileged agent"
end
Expand Down
10 changes: 3 additions & 7 deletions kong/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ function Kong.init()

require("resty.kong.var").patch_metatable()

-- NOTE: privileged_agent is disabled when rpc sync is on
if config.dedicated_config_processing and is_data_plane(config) and not kong.sync then
-- TODO: figure out if there is better value than 4096
-- 4096 is for the cocurrency of the lua-resty-timer-ng
Expand Down Expand Up @@ -881,19 +882,14 @@ function Kong.init_worker()
end

if kong.clustering then
local is_cp = is_control_plane(kong.configuration)
local is_dp_sync_v1 = is_data_plane(kong.configuration) and not kong.sync
local using_dedicated = kong.configuration.dedicated_config_processing

-- CP needs to support both v1 and v2 sync
-- v1 sync is only enabled for DP if v2 sync is disabled
if is_cp or is_dp_sync_v1 then
kong.clustering:init_worker()
end
-- v1 sync is only enabled for DP if v2 sync is unavailble
kong.clustering:init_worker()

-- see is_dp_worker_process() in clustering/utils.lua
if using_dedicated and process.type() == "privileged agent" then
assert(not is_cp)
return
end
end
Expand Down
124 changes: 124 additions & 0 deletions spec/02-integration/09-hybrid_mode/15-cp_inert_rpc_sync_spec.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
local helpers = require "spec.helpers"
local cjson = require("cjson.safe")
local CLUSTERING_SYNC_STATUS = require("kong.constants").CLUSTERING_SYNC_STATUS

for _, strategy in helpers.each_strategy() do

describe("CP diabled Sync RPC #" .. strategy, function()

lazy_setup(function()
helpers.get_db_utils(strategy, {
"clustering_data_planes",
}) -- runs migrations

assert(helpers.start_kong({
role = "control_plane",
cluster_cert = "spec/fixtures/kong_clustering.crt",
cluster_cert_key = "spec/fixtures/kong_clustering.key",
database = strategy,
cluster_listen = "127.0.0.1:9005",
nginx_conf = "spec/fixtures/custom_nginx.template",
nginx_worker_processes = 2, -- multiple workers

cluster_rpc = "on", -- CP ENABLE rpc
cluster_rpc_sync = "off", -- CP DISABLE rpc sync
}))

assert(helpers.start_kong({
role = "data_plane",
database = "off",
prefix = "servroot2",
cluster_cert = "spec/fixtures/kong_clustering.crt",
cluster_cert_key = "spec/fixtures/kong_clustering.key",
cluster_control_plane = "127.0.0.1:9005",
proxy_listen = "0.0.0.0:9002",
nginx_conf = "spec/fixtures/custom_nginx.template",
nginx_worker_processes = 2, -- multiple workers

cluster_rpc = "on", -- DP ENABLE rpc
cluster_rpc_sync = "on", -- DP ENABLE rpc sync
}))
end)

lazy_teardown(function()
helpers.stop_kong("servroot2")
helpers.stop_kong()
end)

after_each(function()
helpers.clean_logfile("servroot2/logs/error.log")
helpers.clean_logfile()
end)

describe("works", function()
it("shows DP status", function()
helpers.wait_until(function()
local admin_client = helpers.admin_client()
finally(function()
admin_client:close()
end)

local res = assert(admin_client:get("/clustering/data-planes"))
local body = assert.res_status(200, res)
local json = cjson.decode(body)

for _, v in pairs(json.data) do
if v.ip == "127.0.0.1" then
assert.near(14 * 86400, v.ttl, 3)
assert.matches("^(%d+%.%d+)%.%d+", v.version)
assert.equal(CLUSTERING_SYNC_STATUS.NORMAL, v.sync_status)
return true
end
end
end, 10)

-- cp will not run rpc
assert.logfile().has.no.line("[rpc]", true)

-- dp will not run rpc too
assert.logfile("servroot2/logs/error.log").has.line(
"rpc sync is disabled in CP")
assert.logfile("servroot2/logs/error.log").has.line(
"sync v1 is enabled due to rpc sync can not work.")
end)
end)

describe("sync works", function()
it("proxy on DP follows CP config", function()
local admin_client = helpers.admin_client(10000)
finally(function()
admin_client:close()
end)

local res = assert(admin_client:post("/services", {
body = { name = "mockbin-service", url = "https://127.0.0.1:15556/request", },
headers = {["Content-Type"] = "application/json"}
}))
assert.res_status(201, res)

res = assert(admin_client:post("/services/mockbin-service/routes", {
body = { paths = { "/" }, },
headers = {["Content-Type"] = "application/json"}
}))

helpers.wait_until(function()
local proxy_client = helpers.http_client("127.0.0.1", 9002)

res = proxy_client:send({
method = "GET",
path = "/",
})

local status = res and res.status
proxy_client:close()
if status == 200 then
return true
end
end, 10)
end)
end)


end)

end -- for _, strategy