Skip to content

add --force flag to fly's abort-build command - #9611

Merged
taylorsilva merged 1 commit into
masterfrom
abort-force-flag
Jun 27, 2026
Merged

taylorsilva merged 1 commit into
masterfrom
abort-force-flag

Conversation

@taylorsilva

@taylorsilva taylorsilva commented Jun 19, 2026 •

Copy link
Copy Markdown
Member

Changes proposed by this PR

Users should NOT use this flag unless they've tried regular aborting first and it has failed to abort for more than 1min.

When the API handler sees this flag set it'll go ahead and mark the build as aborted in the database. It still sends the abort command to the atc/engine running the build as usual, so container's in-flight still get interrupted and on_* hook steps still run.

This is meant to help resolve some edge-cases I've seen where builds are stuck "running", even though the worker(s) they were running on are very much dead and gone. In these situations the build is stuck in the running state and pressing abort does nothing. I've not been able to reproduce these cases (I have seen them myself two times over the years), but they are very frustrating as it feels like Concourse is just "hanging" dealing with these "zombie" builds. This --force will help users kill off these zombie builds.

This flag should only be used as a last resort. I did some testing to see what happens to normal in-flight builds. on_* hook steps still fire, but streaming logs does get a bit messed up if you look at them with fly watch. You won't get any logs after the "abort". If you look in the web UI you'll see any logs that happened after "abort". Not horrible and probably preferable to having the build stuck in a running state.

Visually here's what happens.

Build aborted normally
image

Build aborted with --force
image

You can see the "interrupted" build event isn't logged. If you do fly watch on the --force'd build, you won't see any logs from the on_* hook steps either. I did confirm that in-flight containers are still interrupted though, so still gets you the end result desired.

I've added a warning message in the --help text for fly abort-build to urge users to do a regular abort first before trying again with --force.

@taylorsilva
taylorsilva requested a review from a team June 19, 2026 20:55
@Kump3r

Kump3r commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

We experienced the same issues, when workers became overloaded and stalled eventually needing a recreate to be unblocked. The web is still trying to track containers/processes that are no longer there. The current way we mitigated it, was by restarting the web. So we would highly appreciate a feature such as this cc: @IvanChalukov

Users should NOT use this flag unless they've tried regular
aborting first and it has failed to abort for more than 1min.

When the API handler sees this flag set it'll go ahead and mark the
build as aborted in the database. It still sends the abort command to
the atc/engine running the build as usual, so container's in-flight
still get interrupted.

This is meant to help resolve some edge-cases I've seen where builds are
stuck "running", even though the worker(s) they were running on are very
much dead and gone. In these situations the build is stuck in the
running state and pressing abort does nothing. I've not been able to
reproduce these cases (I have seen them myself two times over the
years), but they are very frustrating as it feels like Concourse is just
"hanging" dealing with these "zombie" builds. This `--force` will help
users kill off these zombie builds.

This flag should only be used as a last resort. I did some testing to
see what happens to normal in-flight builds. `on_*` hook steps still
fire, but streaming logs does get a bit messed up if you look at them
with `fly watch`. You won't get any logs after the "abort". If you look
in the web UI you'll see any logs that happened after "abort". Not
horrible and probably preferable to having the build stuck in a running
state.

Signed-off-by: Taylor Silva <[email protected]>
@taylorsilva
taylorsilva merged commit 8b58602 into master Jun 27, 2026
11 checks passed
@taylorsilva
taylorsilva deleted the abort-force-flag branch June 27, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants