No reviewers
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:apply
scope:capture
scope:coolify-api
scope:fleet
scope:manifest
scope:secrets
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/cast#42
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/dest-and-default-env"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #40. Closes #41.
Both were found by the same run — the genuinely-from-nothing apply that #38 was also hiding in, against a box that shares its server with another project. Neither is a bug in what
applydoes; both are bugs in what it leaves behind and what it says.#40 — cast removes the default environment it made Coolify create
POST /projectshands a new project Coolify's own default environment,production. #39 taught apply to create the environment its resources actually name — so a project cast creates from nothing now carries two: ours, holding everything, and an emptyproductionthat nothing will ever use.That is precisely the shape that makes a box unreadable later, and we have the live example: on the box being migrated away from,
productionis empty and everything runs instaging, and "the obvious guess is the wrong one" is a note we had to write down for ourselves.This is the only delete cast performs, so it has to argue for itself against apply never deletes. What that rule protects is things cast did not make; this is a byproduct of cast's own
POST /projectsseconds earlier, holding nothing and having never held anything. Three conditions, jointly, or nothing is touched:--environment productionkeeps itsproduction: that is where everything is about to liveBest-effort: a delete that fails is reported and never fails an apply that otherwise worked. Tidying is not worth a half-applied run.
#41 — the multi-destination 400 says what to do, and the plan says what it assumed
cast cannot pre-flight this, and that half is not fixable: 4.1.2 serves no destinations API at all, and
GET /servers/{uuid}does not carry them either, so a server's destination count is unknowable until a create has been attempted. The diagnosis is what is fixable.Before, at the first create, after the project and environment had already been made:
After:
The server is named as the operator wrote it (not
srv-1), Coolify's own words are kept verbatim so the next person's search still works, and the run is re-runnable.And the assumption behind an undeclared destination is now on screen at the moment it is made:
⚠️ This reverses a judgment cast held explicitly — "a line on every diff that says nothing is how a report stops being read", the test this replaces. The line does not say nothing: it says which network the next create lands on. It stays on a clean run that creates nothing, too, because the trap is set precisely for projects that are already built — the day their server gains a second destination, every one of them that declared no destination stops being able to create, and nothing will have warned them. Kept to two lines, because the old judgment was not wrong about noise, only about which side of it silence was on.
Tests
294 pass (
build+test+checkclean). New coverage drives the real behavior, not call counts:--environment production; and a failing delete still creates the resource.For the prod migration
This is the message the Task 8 step-4 apply should have produced. The remedy it prints is exactly infra PR #23 — and per D-248/D-252, re-run the installer after this merges.
🤖 Generated with Claude Code