Skip to content

Make aborting jobs faster when the worker disappears - #9607

Merged
taylorsilva merged 1 commit into
masterfrom
faster-abort-timeout
Jun 19, 2026
Merged

taylorsilva merged 1 commit into
masterfrom
faster-abort-timeout

Conversation

@taylorsilva

Copy link
Copy Markdown
Member

Changes proposed by this PR

This is covering the case where a build is running and the worker it's running on disappears. In this case the web node would eventually error after ~5mins due to the GardenRequest timeout. If a user tries to abort a build in such a state before the GardenRequest timeout, nothing will happen as we would get stuck waiting for GardenContainer.Stop() to hit its own 5min timeout.

We wrap these calls in a shorter timeout of 10s. In this scenario we know the user has called abort, so a shorter timeout makes sense to override GardenRequest's longer timeout of 5mins.

There is an integration tests that I've added which reproduces the abort state I observed on master.

This is covering the case where a build is running and the worker it's
running on disappears. In this case the web node would eventually error
after ~5mins due to the GardenRequest timeout. If a user tries to abort
a build in such a state before the GardenRequest timeout, nothing will
happen as we would get stuck waiting for GardenContainer.Stop() to hit
its own 5min timeout.

We wrap these calls in a shorter timeout of 10s. In this scenario we
know the user has called abort, so a shorter timeout makes sense to
override GardenRequest's longer timeout of 5mins.

Signed-off-by: Taylor Silva <[email protected]>
@taylorsilva
taylorsilva requested a review from a team June 18, 2026 22:23
@taylorsilva

taylorsilva commented Jun 19, 2026 •

Copy link
Copy Markdown
Member Author

one testflight test failing but only with the guardian runtime:

  [FAILED] Got stuck at:
      checking tf-pipeline-3-3e85c7f0-43fd-4a1f-a54e-f2750d4932c8/my-resource in build 138
      initializing check: my-resource
      selected worker: 8edb88aa7572
      failed
      
  Waiting for:
      timeout exceeded
  In [It] at: github.com/concourse/concourse/testflight/resource_check_timeout_test.go:35

On containerd I get this output from that fly command:

initializing check: my-resource
selected worker: ci-workers-worker-1
timeout exceeded
failed

@taylorsilva

Copy link
Copy Markdown
Member Author

Weird, I can't locally reproduce this. I get the "timeout exceeded" string with both runtimes...

@taylorsilva

Copy link
Copy Markdown
Member Author

Yup just some weirdness in CI. Couldn't reproduce it locally and starting a fresh build instead of a re-run worked.

@taylorsilva
taylorsilva merged commit 34bdaf4 into master Jun 19, 2026
11 checks passed
@taylorsilva
taylorsilva deleted the faster-abort-timeout branch June 19, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant