Repository navigation
add --force flag to fly's abort-build command - #9611
Merged
Merged
Conversation
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
force-pushed
the
abort-force-flag
branch
from
June 26, 2026 19:45
67ac3c5 to
17b63c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
--forcewill 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 withfly 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

Build aborted with

--forceYou can see the "interrupted" build event isn't logged. If you do
fly watchon the--force'd build, you won't see any logs from theon_*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
--helptext forfly abort-buildto urge users to do a regular abort first before trying again with--force.