Skip to content

ci: test_status_api fails when /status/ready returns non-200 #12257

Open
@flearc

Description

@flearc

Description

The new /status/ready endpoints only return 200 after configuration is fully loaded into all worker processes.

sync_status_to_shdict(true)

But in CI script test_status_api.sh, these endpoints are called immediately after make run. This occasionally causes CI failures because the workers haven’t finished loading configuration yet, and the endpoints respond with 503.

docker compose -f ./t/cli/docker-compose-etcd-cluster.yaml up -d
make run
curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:7085/status | grep 200 \
|| (echo "failed: status api didn't return 200"; exit 1)
curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:7085/status/ready | grep 200 \
|| (echo "failed: status/ready api didn't return 200"; exit 1)

see
https://github.com/apache/apisix/actions/runs/15176488267/job/42763756417#step:7:7552

As a workaround, we can retry the /status and /status/ready requests a few times in the CI script after make run, with a small delay, to wait for the config to be loaded.

failed ci tests:
https://github.com/apache/apisix/actions/runs/15155952361/job/42610819707
https://github.com/apache/apisix/actions/runs/15155952361/job/42610820574
https://github.com/apache/apisix/actions/runs/15176488267/job/42763756417

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions