Page MenuHomePhabricator

[components-api,components-cli] add `deploy cancel` feature
Closed, ResolvedPublic

Description

This means adding an endpoint to the api, something like GET /api/v1/tool/<toolname>/deploys/<deployid>/cancel, that will update the deployment CRD to notify the deployment task that it should cancel itself (as that one is running as a background process).

In the task, we should add in the loop that checks the status of the builds checking also for that flag in the CRD and if found cancel all the builds that are running and report back on the CRD.

We should also add the CANCELLED status for a deployment, and show the build as cancelled too.

Note that the runs can't currently be cancelled, so this is just for deployments that have not gotten yet to that stage.

Then the cli should just add a new subcommand deployment cancel and show the new status in the list/show subcommands.

Event Timeline

dcaro triaged this task as Medium priority.May 22 2025, 2:49 PM

This is part of the extended beta.

group_203_bot_f4d95069bb2675e4ce1fff090c1c1620 opened https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/merge_requests/865

components-api: bump to 0.0.131-20250703131710-86770608

dcaro changed the task status from Open to In Progress.Jul 3 2025, 2:17 PM
dcaro claimed this task.
dcaro moved this task from Next Up to In Progress on the Toolforge (Toolforge iteration 21) board.
dcaro moved this task from In Progress to Done on the Toolforge (Toolforge iteration 21) board.