Skip to content

Commit cc38225

Browse files
Merge branch 'master' of github.com:apache/apisix into feat/support-more-algo
2 parents ae04a8a + 06f0fbc commit cc38225

87 files changed

Lines changed: 4053 additions & 1428 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ jobs:
2828
- ubuntu-latest
2929
os_name:
3030
- linux_openresty
31-
events_module:
32-
- lua-resty-worker-events
33-
- lua-resty-events
3431
test_dir:
3532
- t/plugin/[a-k]*.t
3633
- t/stream-plugin t/plugin/[l-z]*.t
@@ -170,7 +167,6 @@ jobs:
170167
- name: Linux Script
171168
env:
172169
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
173-
TEST_EVENTS_MODULE: ${{ matrix.events_module }}
174170
run: sudo -E ./ci/${{ matrix.os_name }}_runner.sh script
175171

176172
- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}

.github/workflows/doc-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v5
2626
- name: 🚀 Use Node.js
27-
uses: actions/setup-node@v6.1.0
27+
uses: actions/setup-node@v6.2.0
2828
with:
2929
node-version: "12.x"
3030
- run: npm install -g markdownlint-cli@0.25.0

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/checkout@v5
3434

3535
- name: Setup Nodejs env
36-
uses: actions/setup-node@v6.1.0
36+
uses: actions/setup-node@v6.2.0
3737
with:
3838
node-version: '12'
3939

.github/workflows/redhat-ci.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
events_module:
27-
- lua-resty-worker-events
28-
- lua-resty-events
2926
test_dir:
3027
- t/plugin/[a-k]*
3128
- t/plugin/[l-z]*
@@ -120,9 +117,8 @@ jobs:
120117
- name: Run redhat docker and mapping apisix into container
121118
env:
122119
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
123-
TEST_EVENTS_MODULE: ${{ matrix.events_module }}
124120
run: |
125-
docker run -itd -v ${{ github.workspace }}:/apisix --env TEST_FILE_SUB_DIR="$TEST_FILE_SUB_DIR" --env TEST_EVENTS_MODULE="$TEST_EVENTS_MODULE" --name ubiInstance --net="host" --dns 8.8.8.8 --dns-search apache.org registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash
121+
docker run -itd -v ${{ github.workspace }}:/apisix --env TEST_FILE_SUB_DIR="$TEST_FILE_SUB_DIR" --name ubiInstance --net="host" --dns 8.8.8.8 --dns-search apache.org registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash
126122
127123
- name: Cache images
128124
id: cache-images

apisix-master-0.rockspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ dependencies = {
4141
"lua-resty-ngxvar = 0.5.2-0",
4242
"lua-resty-jit-uuid = 0.0.7-2",
4343
"lua-resty-ksuid = 1.0.1-0",
44-
"lua-resty-worker-events = 1.0.0",
4544
"lua-resty-healthcheck-api7 = 3.2.0-0",
4645
"api7-lua-resty-jwt = 0.2.6-0",
4746
"lua-resty-hmac-ffi = 0.06-1",

apisix/cli/config.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ local _M = {
7777
enable_encrypt_fields = true,
7878
keyring = { "qeddd145sfvddff3", "edd1c9f0985e76a2" }
7979
},
80-
events = {
81-
module = "lua-resty-events"
82-
},
8380
lru = {
8481
secret = {
8582
ttl = 300,
@@ -113,7 +110,7 @@ local _M = {
113110
enable_access_log = false,
114111
access_log = "logs/access_stream.log",
115112
-- luacheck: push max code line length 300
116-
access_log_format = "$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time",
113+
access_log_format = "$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time $apisix_request_id",
117114
-- luacheck: pop
118115
access_log_format_escape = "default",
119116
lua_shared_dict = {

apisix/cli/ngx_tpl.lua

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ env PATH; # for searching external plugin runner's binary
5353
5454
# reserved environment variables for configuration
5555
env APISIX_DEPLOYMENT_ETCD_HOST;
56+
env GCP_SERVICE_ACCOUNT;
5657
5758
{% if envs then %}
5859
{% for _, name in ipairs(envs) do %}
@@ -211,7 +212,6 @@ stream {
211212
apisix.stream_init_worker()
212213
}
213214
214-
{% if (events.module or "") == "lua-resty-events" then %}
215215
# the server block for lua-resty-events
216216
server {
217217
listen unix:{*apisix_lua_home*}/logs/stream_worker_events.sock;
@@ -220,7 +220,6 @@ stream {
220220
require("resty.events.compat").run()
221221
}
222222
}
223-
{% end %}
224223
225224
server {
226225
{% for _, item in ipairs(stream_proxy.tcp or {}) do %}
@@ -532,7 +531,6 @@ http {
532531
apisix.http_exit_worker()
533532
}
534533
535-
{% if (events.module or "") == "lua-resty-events" then %}
536534
# the server block for lua-resty-events
537535
server {
538536
listen unix:{*apisix_lua_home*}/logs/worker_events.sock;
@@ -543,7 +541,6 @@ http {
543541
}
544542
}
545543
}
546-
{% end %}
547544
548545
{% if enable_control then %}
549546
server {
@@ -643,6 +640,10 @@ http {
643640
allow all;
644641
{%end%}
645642
643+
{% if use_apisix_base then %}
644+
set $apisix_request_id $request_id;
645+
lua_error_log_request_id $apisix_request_id;
646+
{% end %}
646647
location /apisix/admin {
647648
content_by_lua_block {
648649
apisix.http_admin()
@@ -822,6 +823,11 @@ http {
822823
set $llm_completion_tokens '0';
823824
824825
826+
{% if use_apisix_base then %}
827+
set $apisix_request_id $request_id;
828+
lua_error_log_request_id $apisix_request_id;
829+
{% end %}
830+
825831
access_by_lua_block {
826832
apisix.http_access_phase()
827833
}

apisix/core/ctx.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ do
234234
upstream_connection = true,
235235
upstream_uri = true,
236236
llm_content_risk_level = true,
237+
apisix_request_id = true,
237238

238239
request_type = true,
239240
apisix_upstream_response_time = true,

0 commit comments

Comments
 (0)