Skip to content

Conversation

@bzp2010
Copy link
Collaborator

@bzp2010 bzp2010 commented Dec 24, 2025

Description

When syncing to the apisix-standalone backend 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_status field instead of the previously used success and failed fields.

  • failed will always be an empty array.

  • success contains records generated by the diff returns events. However, you should not assume all synchronizations succeeded based on this; the synchronization status is confirmed by the success_count, failed_count, status, and endpoint_status values.

  • total_resources will always be 0.

  • status, success_count, and failed_count reflect 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

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible

@bzp2010 bzp2010 added the test/apisix-standalone Trigger the APISIX standalone test on the PR label Dec 29, 2025
@bzp2010 bzp2010 merged commit 81c8cac into main Dec 29, 2025
57 of 60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test/apisix-standalone Trigger the APISIX standalone test on the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants