Skip to content

feat(compose): M5-04 — wire log-shipper→coraza service_healthy#221

Merged
bihius merged 2 commits into
mainfrom
vigorous-lewin-a8780f
Jun 2, 2026
Merged

feat(compose): M5-04 — wire log-shipper→coraza service_healthy#221
bihius merged 2 commits into
mainfrom
vigorous-lewin-a8780f

Conversation

@bihius
Copy link
Copy Markdown
Owner

@bihius bihius commented Jun 2, 2026

Closes #129

Summary

  • Flips log-shippercoraza dependency from service_started to service_healthy, so the log-shipper only starts once coraza's SPOA port is actually listening
  • haproxycoraza intentionally stays service_started — haproxy must start in degraded mode and serve 503 when coraza is down (Runtime and Deployed Configuration Status Endpoint #69)
  • Scopes the haproxy regression test to the haproxy service block (the previous global substring check would break because log-shipper now introduces a second coraza: service_healthy line in the file)

Everything else in #129 was already shipped by M5-03 in PR #220 (backend /ready probe, compose healthcheck switch, all five service healthcheck blocks, service_healthy wiring for all other deps).

Test plan

  • pytest tests/unit/ — 195 passed, 1 skipped
  • docker compose config — validates cleanly
  • docker compose up -d && docker compose ps — all services healthy; log-shipper starts after coraza healthy

bihius and others added 2 commits June 2, 2026 18:06
Flip log-shipper depends_on coraza from service_started to service_healthy so
the shipper only starts after coraza's SPOA is ready, completing issue #129.

haproxy→coraza intentionally stays service_started to preserve the degraded-mode
fail-closed design (#69): haproxy must be able to start and serve 503-degraded
responses even when coraza is unavailable.

Scope the haproxy regression test to the haproxy service block so the new global
`coraza: service_healthy` (log-shipper) doesn't trip the existing global assertion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… healthcheck test

BusyBox nc in Alpine 3.19 does not support -z, so the coraza healthcheck
(nc -z 127.0.0.1 9000) was silently broken. Now that log-shipper waits for
coraza: service_healthy, a broken healthcheck deadlocks startup. Fix by
installing netcat-openbsd which provides a full nc with -z support.

Also add a regression test asserting that log-shipper -> coraza uses
service_healthy, so a future accidental revert is caught immediately.
@bihius bihius merged commit 06fc641 into main Jun 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

M5-04 — Healthchecks in docker-compose

1 participant