fix(deploy): the caddy override belonged under services, not networks #5567
ccantynzAI Reviewcommented 2d ago
AI Triage
(no summary)
Priority: medium Risk area: mixed
Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)
Suggestions only — nothing has been applied. The PR author stays in control.
gluecron[bot]🤖 botAI Reviewcommented 2d ago
AI review unavailable
The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
main has been undeployable since #5565 merged
Both deploys since died in about a second:
Not a build failure — an invalid compose file. The caddy block was appended to the end of
scripts/docker-compose.coolify-override.yml, below the top-levelnetworks:key, so compose read it as a network namedcaddycarrying aprofileskey and rejected the file. The indentation looked right; indentation does not say which section a key belongs to.The guard passed anyway, which is the worse half
The test shipped with #5565 asserted:
expect(yaml).toMatch(/^\s{2}caddy:/m); // "text at two-space indent, somewhere"That matches perfectly with
caddyin the wrong section. CI went green on a file that could not be parsed.It is now structural: the file is split into top-level sections and the assertions name the section —
caddyMUST appear underservices:caddyMUST NOT appear undernetworks:networks:is pinned to exactly["coolify"], so a stray key landing there fails instead of passing unnoticedVerified by mutation, not by assertion alone: reintroducing the original layout fails both new tests; restoring the fix passes 26.
What worked
Nothing shipped broken. Build-first ordering kept the previous release running, the health gate never let a bad container take traffic, and production stayed 200 on
f88fdfcthroughout.FAILED_MARKERstopped the timer retrying the same doomed sha every 60s. The deploy path behaved exactly as designed — the change was wrong, and it was caught by the machinery built for it.No manual marker clearing is needed: the marker pins one sha, so this new commit supersedes it.