Fix stale executions permanently blocking concurrency=forbid jobs#1947
Merged
Fix stale executions permanently blocking concurrency=forbid jobs#1947
Conversation
When a running execution gets stuck in persistent storage (e.g., due to node crash or gRPC failure), it permanently blocks jobs with concurrency=forbid from running. The fix cross-references storage-based running executions with in-memory active executions. If an execution is in storage but not active in memory and has been running longer than DefaultStaleExecutionThreshold (4 hours), it is automatically cleaned up by marking it as failed via Raft. Co-authored-by: vcastellm <47026+vcastellm@users.noreply.github.com>
Co-authored-by: vcastellm <47026+vcastellm@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix skipping concurrent execution issue in Busy tab
Fix stale executions permanently blocking concurrency=forbid jobs
Mar 14, 2026
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.
Proposed changes
Jobs with
concurrency=forbidget permanently blocked when an execution gets stuck as "running" in persistent storage (e.g., node crash, gRPC failure). The Busy tab shows nothing because it only checks in-memory state, whileisRunnable()checks persistent storage — creating a deadlock where the job never runs again.The prior fix (d207f79) added persistent storage checks to survive node restarts, but introduced this regression: no mechanism existed to detect or clean up orphaned executions.
Changes:
isRunnable()now cross-references storage-based running executions against in-memory active executions. Executions only in storage and older thanDefaultStaleExecutionThreshold(4 hours) are automatically marked as failed via RaftTestConcurrencyForbid_StaleExecutionCleanupandTestConcurrencyForbid_RecentExecutionNotCleanedTypes of changes
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
127.0.0.10/tmp/go-build4003139311/b001/dkron.test /tmp/go-build4003139311/b001/dkron.test -test.testlogfile=/tmp/go-build4003139311/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=TestJob|TestStore|TestConcurrency|TestAPI g_.a pimachinery@v0.2-ifaceassert ux_amd64/vet -p gzip -lang=go1.24 ux_amd64/vet -o fMM2-uc6t lient-go@v0.22.2-ifaceassert ux_amd64/vet -p e/govmomi/proper-atomic -lang=go1.23 ux_amd64/vet(packet block)127.0.0.12/tmp/go-build4003139311/b001/dkron.test /tmp/go-build4003139311/b001/dkron.test -test.testlogfile=/tmp/go-build4003139311/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=TestJob|TestStore|TestConcurrency|TestAPI g_.a pimachinery@v0.2-ifaceassert ux_amd64/vet -p gzip -lang=go1.24 ux_amd64/vet -o fMM2-uc6t lient-go@v0.22.2-ifaceassert ux_amd64/vet -p e/govmomi/proper-atomic -lang=go1.23 ux_amd64/vet(packet block)127.0.0.13/tmp/go-build4003139311/b001/dkron.test /tmp/go-build4003139311/b001/dkron.test -test.testlogfile=/tmp/go-build4003139311/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=TestJob|TestStore|TestConcurrency|TestAPI g_.a pimachinery@v0.2-ifaceassert ux_amd64/vet -p gzip -lang=go1.24 ux_amd64/vet -o fMM2-uc6t lient-go@v0.22.2-ifaceassert ux_amd64/vet -p e/govmomi/proper-atomic -lang=go1.23 ux_amd64/vet(packet block)127.0.0.15/tmp/go-build4003139311/b001/dkron.test /tmp/go-build4003139311/b001/dkron.test -test.testlogfile=/tmp/go-build4003139311/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=TestJob|TestStore|TestConcurrency|TestAPI g_.a pimachinery@v0.2-ifaceassert ux_amd64/vet -p gzip -lang=go1.24 ux_amd64/vet -o fMM2-uc6t lient-go@v0.22.2-ifaceassert ux_amd64/vet -p e/govmomi/proper-atomic -lang=go1.23 ux_amd64/vet(packet block)127.0.0.16/tmp/go-build4003139311/b001/dkron.test /tmp/go-build4003139311/b001/dkron.test -test.testlogfile=/tmp/go-build4003139311/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=TestJob|TestStore|TestConcurrency|TestAPI g_.a pimachinery@v0.2-ifaceassert ux_amd64/vet -p gzip -lang=go1.24 ux_amd64/vet -o fMM2-uc6t lient-go@v0.22.2-ifaceassert ux_amd64/vet -p e/govmomi/proper-atomic -lang=go1.23 ux_amd64/vet(packet block)127.0.0.22/tmp/go-build4003139311/b001/dkron.test /tmp/go-build4003139311/b001/dkron.test -test.testlogfile=/tmp/go-build4003139311/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=TestJob|TestStore|TestConcurrency|TestAPI g_.a pimachinery@v0.2-ifaceassert ux_amd64/vet -p gzip -lang=go1.24 ux_amd64/vet -o fMM2-uc6t lient-go@v0.22.2-ifaceassert ux_amd64/vet -p e/govmomi/proper-atomic -lang=go1.23 ux_amd64/vet(packet block)127.0.0.23/tmp/go-build4003139311/b001/dkron.test /tmp/go-build4003139311/b001/dkron.test -test.testlogfile=/tmp/go-build4003139311/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=TestJob|TestStore|TestConcurrency|TestAPI g_.a pimachinery@v0.2-ifaceassert ux_amd64/vet -p gzip -lang=go1.24 ux_amd64/vet -o fMM2-uc6t lient-go@v0.22.2-ifaceassert ux_amd64/vet -p e/govmomi/proper-atomic -lang=go1.23 ux_amd64/vet(packet block)127.0.0.24/tmp/go-build4003139311/b001/dkron.test /tmp/go-build4003139311/b001/dkron.test -test.testlogfile=/tmp/go-build4003139311/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=TestJob|TestStore|TestConcurrency|TestAPI g_.a pimachinery@v0.2-ifaceassert ux_amd64/vet -p gzip -lang=go1.24 ux_amd64/vet -o fMM2-uc6t lient-go@v0.22.2-ifaceassert ux_amd64/vet -p e/govmomi/proper-atomic -lang=go1.23 ux_amd64/vet(packet block)127.0.0.26/tmp/go-build4003139311/b001/dkron.test /tmp/go-build4003139311/b001/dkron.test -test.testlogfile=/tmp/go-build4003139311/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=TestJob|TestStore|TestConcurrency|TestAPI g_.a pimachinery@v0.2-ifaceassert ux_amd64/vet -p gzip -lang=go1.24 ux_amd64/vet -o fMM2-uc6t lient-go@v0.22.2-ifaceassert ux_amd64/vet -p e/govmomi/proper-atomic -lang=go1.23 ux_amd64/vet(packet block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.