A cast-created project is left carrying Coolify's empty default environment #40
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#40
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Follow-up to #38 / #39.
POST /projects {name}makes Coolify create the project with its own default environment, namedproduction. Since #39, cast then creates the environment it actually wants (--env, e.g.prod) — so a project cast created from nothing now ends up with two environments, one of them permanently empty:That is precisely the shape that makes an adopted box hard to read later, and we have a live example of the confusion it causes: on the box being migrated away from, the project's
productionenvironment is empty and everything runs instaging— "the obvious guess is the wrong one" is a note we had to write down for ourselves.DELETE /projects/{uuid}/environments/{environment_name_or_uuid}exists in the vendored 4.1.2 spec.Suggested behaviour
When cast itself created the project in this run (not adopted an existing one), and the default environment is empty, and its name is not the one cast is about to use — delete it. All three conditions matter:
--environmentlegitimately isproductionmust keep it.Anything else (adopted project, non-empty default, name match) is left exactly as it is.
Alternatively cast could simply use the default environment when it created the project and no
--environmentwas given — but that is worse: it silently adopts Coolify's vocabulary for our environment, which is the collapse--environmentexists to prevent, and the name would then be inherited by every future rebuild.