From 8e1bd64cff7b164c6fb24c41476fbe03d0d6dbd9 Mon Sep 17 00:00:00 2001 From: Nicolas Dreno Date: Wed, 18 Nov 2026 22:19:55 +0100 Subject: [PATCH 1/2] Check the control plane with `barbacane-control health` From barbacane-dev/barbacane#411 on, the barbacane-control image has no shell, so the compose health check `bash -c 'echo > /dev/tcp/...'` cannot run and the container stays unhealthy. The image ships `barbacane-control health`, which calls GET /health; the check runs it. CI did not notice: the smoke test reaches the control plane over HTTP and nothing waits for its health check. A new step after the smoke test requires every running service with a health check to report healthy. 1.0.0-rc.1 has no `health` subcommand, so this goes in with the bump to the first release that has it. Signed-off-by: Nicolas Dreno --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ docker-compose.yml | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a63e90..9dce30f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,27 @@ jobs: - name: Run the smoke test run: bash scripts/smoke.sh + # Every running service with a health check reports healthy: a check the + # image cannot run (a shell command in an image without a shell) fails + # here, though the smoke test reaches the service over HTTP. + - name: Check the health checks + run: | + for container in $(docker compose ps -q); do + name=$(docker inspect -f '{{.Name}}' "$container") + [ -n "$(docker inspect -f '{{if .State.Health}}yes{{end}}' "$container")" ] || continue + status= + for _ in $(seq 1 30); do + status=$(docker inspect -f '{{.State.Health.Status}}' "$container") + [ "$status" = healthy ] && break + sleep 3 + done + echo "$name: $status" + if [ "$status" != healthy ]; then + docker inspect -f '{{json .State.Health.Log}}' "$container" + exit 1 + fi + done + - name: Dump logs on failure if: failure() run: docker compose logs --no-color --tail 300 diff --git a/docker-compose.yml b/docker-compose.yml index 2ac0cab..51e4d35 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -136,7 +136,8 @@ services: postgres: condition: service_healthy healthcheck: - test: ["CMD", "bash", "-c", "echo > /dev/tcp/localhost/9090"] + # The image has no shell: `barbacane-control health` calls GET /health. + test: ["CMD", "/usr/local/bin/barbacane-control", "health"] interval: 10s timeout: 5s retries: 5 From ccedbda02dc3135413c1ad92e41c7184097c6c72 Mon Sep 17 00:00:00 2001 From: Nicolas Dreno Date: Thu, 19 Nov 2026 16:41:25 +0100 Subject: [PATCH 2/2] Pin the playground to Barbacane 1.0.0-rc.2 The control-plane health check runs `barbacane-control health`, which first ships in 1.0.0-rc.2, so that release is also the new minimum. --- .env.example | 4 ++-- README.md | 2 +- docker-compose.yml | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index 197f437..edeec38 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,7 @@ # Barbacane image version to pull from ghcr.io/barbacane-dev -# The playground needs 1.0.0-rc.1 or later. `latest` is the most recent stable +# The playground needs 1.0.0-rc.2 or later. `latest` is the most recent stable # release, which release candidates do not move. -BARBACANE_VERSION=1.0.0-rc.1 +BARBACANE_VERSION=1.0.0-rc.2 # Admin token for the control plane, at least 32 bytes: the control plane # refuses to start without one. This is a demo default: change it for any diff --git a/README.md b/README.md index f2bc993..3c0da55 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ That's it! The API specs are compiled and signed automatically before the gatewa ## Version -The playground pulls the Barbacane release `docker-compose.yml` pins (`1.0.0-rc.1`) from [GitHub Container Registry](https://github.com/orgs/barbacane-dev/packages). It needs 1.0.0-rc.1 or later. To run another release, copy `.env.example` and set the version: +The playground pulls the Barbacane release `docker-compose.yml` pins (`1.0.0-rc.2`) from [GitHub Container Registry](https://github.com/orgs/barbacane-dev/packages). It needs 1.0.0-rc.2 or later. To run another release, copy `.env.example` and set the version: ```bash cp .env.example .env diff --git a/docker-compose.yml b/docker-compose.yml index 51e4d35..3f9e24e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,7 +23,7 @@ services: # public key goes to trusted_key, which the gateway pins. The key survives # restarts; removing the volumes replaces it. keygen: - image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.1} + image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.2} user: "0:0" entrypoint: ["/bin/sh", "-c"] command: @@ -40,7 +40,7 @@ services: # Spec Compiler (init container - compiles specs before gateway starts) # ========================================================================== compiler: - image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.1} + image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.2} command: ["compile", "--spec", "/specs/train-travel-api.yaml", "--spec", "/specs/train-events.yaml", "--spec", "/specs/s3-proxy.yaml", "--spec", "/specs/waf-demo.yaml", "--manifest", "/manifest/barbacane.yaml", "--output", "/output/api.bca", "--allow-plaintext"] # Root, to write the shared artifact volume (root-owned) and read the # signing key (owner-only). The gateway mounts the artifact read-only. @@ -62,7 +62,7 @@ services: # API Gateway (Data Plane) # ========================================================================== barbacane: - image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.1} + image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.2} # serve loads only artifacts signed by the key BARBACANE_TRUSTED_PUBKEY # pins: here, the public key the keygen container wrote. # --admin-bind on 0.0.0.0 exposes the admin API (/health, /metrics, @@ -123,7 +123,7 @@ services: # Control Plane (REST API) # ========================================================================== control-plane: - image: ghcr.io/barbacane-dev/barbacane-control:${BARBACANE_VERSION:-1.0.0-rc.1} + image: ghcr.io/barbacane-dev/barbacane-control:${BARBACANE_VERSION:-1.0.0-rc.2} ports: - "9091:9090" # Control Plane API (Prometheus has 9090 on the host) environment: