concourse / concourse/pool-resource
Support Freeing Locks held beyond some threshhold
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 59
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
We have forked this resource to support a "max_minutes" attribute used to (unceremoniously) move claimed locks back to unclaimed if it is held for longer than this threshold. Perhaps this would be a desirable feature in the standard resource. We perform this clean-up as follows
1- Perform cleanup from "check" since the ATC runs only a single instance of this at a time
2- Check the timestamp of the last commit that touched this lock
3- If the max_minutes threshold is exceeded, unclaim the lock
3b- If the "unclaim" operation fails due to a (very possible) conflict, do not retry until the next check (to keep check running relatively quickly)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the resource's check operation and how it reads lock timestamps and performs unclaiming. Implement the max_minutes behavior described in the issue, including skipping retries after a conflict until the next check. Done means locks older than the threshold are returned to the unclaimed state without making check slow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100