Repository navigation
fix(api): fail a deployment that cannot be planned instead of retrying it - #317
Conversation
…g it When the planner or the scheduler threw, the pipeline run threw too. The job was retried five times and the deployment stayed where it was, holding the application's single active deployment. - A domain error from the planner or from placement now fails the deployment with that reason. Other errors are still thrown and retried. - A node without capacity facts is skipped with a reason instead of making placement throw for the whole organization. Refs #314 Signed-off-by: samuel mbabhazi <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
First of two changes for #314. This one removes the stuck deployment; the second will refuse, when a configuration is saved, the values that can never be deployed.
What changed
When the planner or the scheduler threw, the pipeline run threw too. pg-boss retried the job five times and gave up, and the deployment stayed in its current state. It also kept the application's single active deployment, so nothing else could be deployed until someone cancelled it.
planor from placement becomesdeployment.failedwith that reason, and recovery runs as for any other failure. Errors that are not about the release (a lost connection, for example) are still thrown, so the run is retried.placeReplicathrewInvalid scheduling statefor a capacity of zero, so one such node made every placement of its organization throw. It is now rejected withcpuormemory(architecturewhen it reported none), even for a replica that reserves nothing, and the other nodes are still considered. A negative or fractional capacity still throws.schedulableNodessaid such a node "only accepts unreserved replicas", which never was what happened.How it was tested
cpu: '9999999999999999') fails at placement;failedwith its reason and its audit event, leaves no allocation, and a new deployment of the same application can be queued;Not run on the installation rig: both defects were found by reading the code and reproduced in tests, and the fix changes no agent action and no installer.
Security considerations
Refs #314
Summary by CodeRabbit