-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Current Behavior
Error Details
CI Job: build (ubuntu-latest, linux_apisix_current_luarocks_in_customed_nginx)
Error Log:
2025/12/12 06:10:14 [error] 95223#95223: *1 [lua] config_etcd.lua:602: load_full_data():
failed to check item data of [/apisix/routes]
err:object matches none of the required: ["plugins","uri"] or ["upstream","uri"] or
["upstream_id","uri"] or ["service_id","uri"] or ["plugins","uris"] or ["upstream","uris"]
or ["upstream_id","uris"] or ["service_id","uris"] or ["script","uri"] or ["script","uris"]
,val: {"priority":0,"status":1,"uri":"/2"}, context: init_worker_by_lua*
Impact Scope
Affected CI Jobs:
linux_apisix_current_luarockslinux_apisix_current_luarocks_in_customed_nginx
Trigger Conditions:
- Any PR that modifies files not excluded by workflow paths-ignore filters
- Runs all CLI tests in
t/cli/test_*.shincludingtest_etcd_sync_event_handle.sh
False Positive Nature:
- It's a pre-existing incompatibility between the test's assumptions and APISIX's current error handling in
config_etcd.lua
Expected Behavior
Behavior Mismatch
Expected Behavior (per test design):
- APISIX should gracefully skip invalid route objects during sync event processing
- Route
/2should remain in its last valid state (returning 503) - Other routes should be updated successfully
Actual Behavior (current APISIX):
load_full_data()inapisix/core/config_etcd.luathrows an error when encountering the invalid route- The error occurs during
init_worker_by_lua*phase, causing worker initialization to fail - The entire APISIX instance fails to start, blocking the CI pipeline
Source of Invalid Route
The invalid route object {"uri":"/2"} is intentionally created by the test script at line 78:
File: t/cli/test_etcd_sync_event_handle.sh
Line 78:
etcdctl --endpoints=127.0.0.1:2379 --user=root:apache-api6-sync put /apisix/routes/2 '{"uri":"/2"}' ## set incorrect configurationError Logs
2025/12/13 12:48:48 [error] 158013#158013: *691057 [lua] config_etcd.lua:743: sync_data(): failed to check item data of [/apisix/routes] err:object matches none of the required: ["plugins","uri"] or ["upstream","uri"] or ["upstream_id","uri"] or ["service_id","uri"] or ["plugins","uris"] or ["upstream","uris"] or ["upstream_id","uris"] or ["service_id","uris"] or ["script","uri"] or ["script","uris"] ,val: {"uri":"/2","priority":0,"status":1}, context: ngx.timer
Steps to Reproduce
Reproduction Steps
# 1. Start etcd and APISIX
make ci-env-up
make init
make run
# 2. Manually insert the invalid route
etcdctl --endpoints=127.0.0.1:2379 put /apisix/routes/2 '{"uri":"/2"}'
# 3. Restart APISIX to trigger load_full_data()
./bin/apisix stop
./bin/apisix start
# 4. Observe the error
grep "failed to check item data" logs/error.logExpected: Worker initialization fails with schema validation error
Actual: Same as expected (this is the bug - it should NOT fail)
Files Referenced
t/cli/test_etcd_sync_event_handle.sh(lines 28-93)apisix/core/config_etcd.lua(line 602, functionload_full_data()).github/workflows/cli.yml(job definition)ci/linux_apisix_current_luarocks_runner.sh(test execution)
Environment
- APISIX version: 3.14.1 (Command: ./bin/apisix version)
- Operating system: Linux d328ed307015 6.18.0-5-cachyos change: added doc of how to load plugin. #1 SMP PREEMPT_DYNAMIC Sun, 07 Dec 2025 12:44:05 +0000 x86_64 x86_64 x86_64 GNU/Linux (Command: uname -a)
- OpenResty / Nginx: openresty/1.27.1.2 (Command: openresty -V)
- etcd version: 3.5
- APISIX Dashboard: Not installed (Command: apisix-dashboard version → apisix-dashboard: not installed)
- Plugin runner version: null
- LuaRocks version: 3.12.0 (Command: luarocks --version)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status