Skip to content

Bug: dump missing upstreams and routes #218

Open

Description

@NiuBlibing

Current Behavior

./adc dump --tls-skip-verify --verbose 2 -o service-configuration.yaml

generate empty output for upstreams and routes.
Debug log shown the server return upstreams and routes correctly.

[7:23:16 PM] [APISIX] › ⬤  debug     Get upstreams
GET https://10.0.0.1:9180/apisix/admin/upstreams
Accept: application/json, text/plain, */*
Content-Type: application/json
X-API-KEY: *****
User-Agent: axios/1.7.2
Accept-Encoding: gzip, compress, deflate, br

200 OK
Date: Tue, 17 Dec 2024 11:23:16 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Server: APISIX/3.9.1
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: *
Access-Control-Max-Age: 3600
X-Api-Version: v3

{
    "total": 1,
    "list": [
        {
            "value": {
                "hash_on": "vars",
                "type": "roundrobin",
                "checks": {
                    "active": {
                        "https_verify_certificate": true,
                        "healthy": {
                            "http_statuses": [
                                200,
                                302
                            ],
                            "interval": 1,
                            "successes": 2
                        },
                        "type": "tcp",
                        "http_path": "/",
                        "unhealthy": {
                            "http_statuses": [
                                429,
                                404,
                                500,
                                501,
                                502,
                                503,
                                504,
                                505
                            ],
                            "http_failures": 5,
                            "tcp_failures": 2,
                            "timeouts": 3,
                            "interval": 1
                        },
                        "concurrency": 10,
                        "timeout": 1
                    }
                },
                "create_time": 1718966926,
                "id": "472184775684129492",
                "update_time": 1718966926,
                "keepalive_pool": {
                    "size": 320,
                    "idle_timeout": 60,
                    "requests": 1000
                },
                "nodes": [
                    {
                        "weight": 1,
                        "port": 80,
                        "priority": 0,
                        "host": "10.0.0.206"
                    },
                    {
                        "weight": 1,
                        "port": 80,
                        "priority": 0,
                        "host": "10.0.0.82"
                    }
                ],
                "pass_host": "pass",
                "scheme": "http",
                "name": "ocr-http",
                "timeout": {
                    "send": 6,
                    "connect": 6,
                    "read": 120
                }
            },
            "key": "/apisix/upstreams/472184775684129492",
            "createdIndex": 35,
            "modifiedIndex": 35
        }
    ]
}

Exxpected Behavior

Dump all upstreams and routes.

Steps to Reproduce

./adc dump --tls-skip-verify --verbose 2 -o service-configuration.yaml

Environment

  • APISIX version: 3.9.1
  • ADC version (run adc version): 0.16.2
  • Operating system (run uname -a): Linux manjaro 6.1.119-1-MANJARO x86_64 GNU/Linux

Activity

  1. added
    wontfixThis will not be worked on
    and removed
    bugSomething isn't working
    on Dec 27, 2024
  2. bzp2010 commented on Dec 27, 2024

    @bzp2010
    Collaborator

    According to the description in the https://github.com/api7/adc/blob/main/libs/backend-apisix/README.md#the-output-of-dump-is-not-same-which-apache-apisix, this is what is expected. The current ADC design follows a fixed paradigm, and regardless of the backend, they all use a common YAML format. The flexible configuration format of APISIX prevents it from being fully structured and therefore cannot be converted to a configuration as is.

    Instead, the requirement that routes must be associated to a service provides a more flexible model where you can configure upstream and shared plugin configurations for a batch of routes without the need to use plugin templates (plugin_config, which is in fact not a resource supported by the ADC; no need to worry about the inherent complexity in overriding the logic of prioritization-based overrides for plugin configurations).
    This does not prevent certain features from being implemented, and therefore does not pose a barrier to scratch use.

    Currently this is a fixed design and there are no ideas to change it for the time being, so this won't get improved straight away for a while. However, the APISIX exporter logic could be improved to allow more best-effort conversion of unorganized configurations.

    This issue will remain open for more discussion.

  3. juzn01 commented on May 16, 2025

    @juzn01

    i use apisix 3.9.1 and get same error, only consumer and tls info, not route,upstream show.
    Please update bro. Thank you !

  4. zachsirotto commented on Sep 24, 2025

    @zachsirotto

    I and others would like to see this too 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions