Repository navigation
Closed
Labels
bugSomething isn't working
Description
What
When the deployment pipeline throws while it plans or places a release, the deployment does not fail. The pg-boss job is retried five times and then abandoned, and the deployment stays in its current state. It also keeps the application's single active deployment slot, so nothing else can be deployed until someone cancels it.
Found while working on #301. Both cases below exist on main before that change.
How to reproduce
- A value the schema accepts and the planner cannot read. Save an application with
resources: { cpu: '9999999999999999' }(16 digits, the schema'smaxLength).cpuMillisthrowsinvalid_application_configbecause the result is not a safe integer.placementRequestandcontainerPlancall it inside the pipeline run (apps/api/src/modules/deployments/application/deployment-pipeline.ts,placeandplan). - A server without CPU or memory facts.
schedulableNodesgives such a node a capacity of zero, andplaceReplica(packages/domain/src/lib/scheduler.ts,assertNode) throwsInvalid scheduling state for node <name>for a capacity of zero. One such node in an organization makes every placement of that organization throw. The comment onschedulableNodessays the node "only accepts unreserved replicas", which is not what happens.
Expected
- A release that cannot be planned fails its deployment with a reason the user can read, like any other failure (
deployment.failed, routing untouched). - A node without capacity facts is rejected for placement (for example
not_ready, or a new reason) instead of throwing for the whole organization. - Values that can never be planned are refused when the configuration is saved. For CPU and memory this also covers limits below what Docker accepts (under 0.01 CPU or 6 MiB), which pass validation today and fail when the container is created.
Done when
- A test deploys a release whose configuration throws in the planner and sees the deployment
failed, not a retried job. - A test places a replica in an organization that has one node without facts and one ready node, and the replica lands on the ready node.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
fix(api): fail a deployment that cannot be planned instead of retryin…
samuelmbabhazi commentedon Nov 16, 2026
A correction to the text above. It says that limits under 0.01 CPU fail when the container is created. I checked on Docker 29.1.3:
docker run --cpus 0.001is accepted, anddocker run -m 5mis refused withMinimum memory limit allowed is 6MB. So there is a memory minimum (6 MiB) and no CPU minimum beyond "greater than zero", which the schema already enforces since #313.Status: #317 (merged) makes a deployment that cannot be planned fail instead of staying stuck, and skips a node without capacity facts. #319 refuses the values behind such deployments when the configuration is saved, and closes this issue.