You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_luarocks
linux_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_*.sh including test_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 /2 should remain in its last valid state (returning 503)
Other routes should be updated successfully
Actual Behavior (current APISIX):
load_full_data() in apisix/core/config_etcd.lua throws 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 configuration
Error 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.log
Expected: Worker initialization fails with schema validation error Actual: Same as expected (this is the bug - it should NOT fail)
Current Behavior
Error Details
CI Job:
build (ubuntu-latest, linux_apisix_current_luarocks_in_customed_nginx)Error Log:
Impact Scope
Affected CI Jobs:
linux_apisix_current_luarockslinux_apisix_current_luarocks_in_customed_nginxTrigger Conditions:
t/cli/test_*.shincludingtest_etcd_sync_event_handle.shFalse Positive Nature:
config_etcd.luaExpected Behavior
Behavior Mismatch
Expected Behavior (per test design):
/2should remain in its last valid state (returning 503)Actual Behavior (current APISIX):
load_full_data()inapisix/core/config_etcd.luathrows an error when encountering the invalid routeinit_worker_by_lua*phase, causing worker initialization to failSource 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.shLine 78:
Error 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
Expected: 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