feat(server): report apisix-standalone endpoint status #396
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When syncing to the
apisix-standalonebackend on the ADC server mode, report endpoint status information additionally.BREAK CHANGE:
Only for apisix-standalone backend, neither related to apisix nor api7ee
All apisix-standalone endpoint statuses are now reported via the
endpoint_statusfield instead of the previously usedsuccessandfailedfields.failedwill always be an empty array.successcontains records generated by the diff returns events. However, you should not assume all synchronizations succeeded based on this; the synchronization status is confirmed by thesuccess_count,failed_count,status, andendpoint_statusvalues.total_resourceswill always be 0.status,success_count, andfailed_countreflect the synchronization status on the endpoint.{ "status": "partial_failure", "total_resources": 0, "success_count": 3, "failed_count": 1, "success": [ { "event": { "resourceType": "consumer", "type": "delete", "resourceId": "test-consumer1", "resourceName": "test-consumer1" }, "synced_at": "2025-12-29T04:42:59.940Z" }, { "event": { "resourceType": "consumer", "type": "create", "resourceId": "test-consumer2", "resourceName": "test-consumer2" }, "synced_at": "2025-12-29T04:42:59.940Z" } ], "failed": [], "endpoint_status": [ { "server": "http://127.0.0.1:49180", "success": false, "reason": "connect ECONNREFUSED 127.0.0.1:49180", "requested_at": "2025-12-29T04:42:59.940Z" }, { "server": "http://127.0.0.1:19180", "success": true, "requested_at": "2025-12-29T04:42:59.000Z", "response": { "status": 202, "headers": { "date": "Mon, 29 Dec 2025 04:42:59 GMT", "content-type": "application/json", "transfer-encoding": "chunked", "connection": "keep-alive", "server": "APISIX/3.14.1", "access-control-allow-origin": "*", "access-control-allow-credentials": "true", "access-control-expose-headers": "*", "access-control-max-age": "3600", "x-last-modified": "1766983379", "x-digest": "45b9104ccfc3a51fc7444df450e32f8958db1a64" }, "data": "" }, "request": { "url": "http://127.0.0.1:19180/apisix/admin/configs", "method": "put", "headers": { "Accept": "application/json, text/plain, */*", "Content-Type": "application/json", "X-API-KEY": "*****", "x-digest": "45b9104ccfc3a51fc7444df450e32f8958db1a64", "User-Agent": "axios/1.13.2", "Content-Length": "503", "Accept-Encoding": "gzip, compress, deflate, br" }, "data": "{\"protos_conf_version\":0,\"consumer_groups_conf_version\":0,\"plugin_configs_conf_version\":0,\"services_conf_version\":0,\"ssls_conf_version\":0,\"routes_conf_version\":0,\"plugins_conf_version\":0,\"consumers\":[{\"modifiedIndex\":1766983379959,\"username\":\"test-consumer2\",\"plugins\":{\"limit-count\":{\"count\":100,\"time_window\":60}}}],\"stream_routes_conf_version\":0,\"secrets_conf_version\":0,\"upstreams_conf_version\":0,\"plugin_metadata_conf_version\":0,\"consumers_conf_version\":1766983379959,\"global_rules_conf_version\":0}" } }, { "server": "http://127.0.0.1:29180", "success": true, "requested_at": "2025-12-29T04:42:59.000Z", "response": { "status": 202, "headers": { "date": "Mon, 29 Dec 2025 04:42:59 GMT", "content-type": "application/json", "transfer-encoding": "chunked", "connection": "keep-alive", "server": "APISIX/3.14.1", "access-control-allow-origin": "*", "access-control-allow-credentials": "true", "access-control-expose-headers": "*", "access-control-max-age": "3600", "x-last-modified": "1766983379", "x-digest": "45b9104ccfc3a51fc7444df450e32f8958db1a64" }, "data": "" }, "request": { "url": "http://127.0.0.1:29180/apisix/admin/configs", "method": "put", "headers": { "Accept": "application/json, text/plain, */*", "Content-Type": "application/json", "X-API-KEY": "*****", "x-digest": "45b9104ccfc3a51fc7444df450e32f8958db1a64", "User-Agent": "axios/1.13.2", "Content-Length": "503", "Accept-Encoding": "gzip, compress, deflate, br" }, "data": "{\"protos_conf_version\":0,\"consumer_groups_conf_version\":0,\"plugin_configs_conf_version\":0,\"services_conf_version\":0,\"ssls_conf_version\":0,\"routes_conf_version\":0,\"plugins_conf_version\":0,\"consumers\":[{\"modifiedIndex\":1766983379959,\"username\":\"test-consumer2\",\"plugins\":{\"limit-count\":{\"count\":100,\"time_window\":60}}}],\"stream_routes_conf_version\":0,\"secrets_conf_version\":0,\"upstreams_conf_version\":0,\"plugin_metadata_conf_version\":0,\"consumers_conf_version\":1766983379959,\"global_rules_conf_version\":0}" } }, { "server": "http://127.0.0.1:39180", "success": true, "requested_at": "2025-12-29T04:42:59.000Z", "response": { "status": 202, "headers": { "date": "Mon, 29 Dec 2025 04:42:59 GMT", "content-type": "application/json", "transfer-encoding": "chunked", "connection": "keep-alive", "server": "APISIX/3.14.1", "access-control-allow-origin": "*", "access-control-allow-credentials": "true", "access-control-expose-headers": "*", "access-control-max-age": "3600", "x-last-modified": "1766983379", "x-digest": "45b9104ccfc3a51fc7444df450e32f8958db1a64" }, "data": "" }, "request": { "url": "http://127.0.0.1:39180/apisix/admin/configs", "method": "put", "headers": { "Accept": "application/json, text/plain, */*", "Content-Type": "application/json", "X-API-KEY": "*****", "x-digest": "45b9104ccfc3a51fc7444df450e32f8958db1a64", "User-Agent": "axios/1.13.2", "Content-Length": "503", "Accept-Encoding": "gzip, compress, deflate, br" }, "data": "{\"protos_conf_version\":0,\"consumer_groups_conf_version\":0,\"plugin_configs_conf_version\":0,\"services_conf_version\":0,\"ssls_conf_version\":0,\"routes_conf_version\":0,\"plugins_conf_version\":0,\"consumers\":[{\"modifiedIndex\":1766983379959,\"username\":\"test-consumer2\",\"plugins\":{\"limit-count\":{\"count\":100,\"time_window\":60}}}],\"stream_routes_conf_version\":0,\"secrets_conf_version\":0,\"upstreams_conf_version\":0,\"plugin_metadata_conf_version\":0,\"consumers_conf_version\":1766983379959,\"global_rules_conf_version\":0}" } } ] }Checklist