mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-28 15:51:26 +00:00
feat(deploy): per-service deploy queue, cancellable deployments, no-cache builds
- internal/deployqueue: serialized FIFO per service — concurrent deploys of one service no longer race (the container-name-conflict failure mode); different services still run in parallel. - Deploys and rollbacks enqueue through the queue; a busy service returns status 'queued' and promotes when the active job finishes. - POST /deployments/:id/cancel — queued jobs drop immediately (200 cancelled); active jobs get ctx cancelled so build/reconcile abort (202 cancelling, settles 'cancelled'); finished deployments return 409 NOT_CANCELLABLE. - Redeploy and variables save now route through the same queue so they can't overlap a build; PUT /services/:id/variables accepts redeploy:true to apply env changes to running containers. - no_cache on deployment create plumbs BuildRequest -> BuildOptions for nixpacks, dockerfile and railpack builders. - CLI: deployments cancel, deploy --no-cache, variables set/unset --redeploy. MCP: containr_deployments_cancel; deploy/variables_set document no_cache/redeploy. UI: Cancel button + queued/cancelled badges on the deployments table. OpenAPI + types regenerated. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
84d58cf808
commit
7839dc48a3
25 files changed
+721
-32
No files matched your search
@@ -811,6 +811,45 @@ paths:
|
||||
deployment:
|
||||
$ref: '#/components/schemas/Deployment'
|
||||
|
||||
/deployments/{id}/cancel:
|
||||
post:
|
||||
tags:
|
||||
- Deployments
|
||||
summary: Cancel a deployment
|
||||
description: Cancel a queued or in-flight deployment. Queued deployments are marked cancelled immediately; running ones get their build/reconcile aborted and settle as 'cancelled' shortly after.
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: Deployment ID
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Queued deployment cancelled
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status: { type: string, example: cancelled }
|
||||
'202':
|
||||
description: Running deployment is cancelling
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status: { type: string, example: cancelling }
|
||||
'409':
|
||||
description: Deployment already finished
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
|
||||
/deployments/{id}/rollback:
|
||||
post:
|
||||
tags:
|
||||
@@ -5108,6 +5147,9 @@ components:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Runtime environment variable overrides
|
||||
no_cache:
|
||||
type: boolean
|
||||
description: Build without Docker layer cache
|
||||
|
||||
RollbackDeploymentResponse:
|
||||
type: object
|
||||
@@ -5989,6 +6031,9 @@ components:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/VariableInput'
|
||||
redeploy:
|
||||
type: boolean
|
||||
description: Queue a service redeploy after saving so running containers pick up the new variables
|
||||
|
||||
ConnectGitHubAppRequest:
|
||||
type: object
|
||||
|
||||
Reference in new issue
Block a user