jenkinsci / jenkinsci/lockable-resources-plugin

[JENKINS-42028] Enable human to assume ownership of a held lock

Open
#869 0 comments 0 reactions 0 assignees View on GitHub
component:lockable-resources-plugin imported-jira-issue priority:minor resolution:unresolved Triage
Dominant language
Java
Stars
99
Forks
205
Avg merge
2d 13h
Merged PRs (30d)
8

Description

Add an option on the Lockable Resource page that enables a human to take control of a currently locked resource without releasing it first.

We are using lockable resources in our CD pipeline to protect each of our environments: head, staging, and production while performing a push + running automated integration testing. As part of our staging -> production push, we perform a manual test pass. I'd like to be able to take ownership of the "staging" lock while performing the manual test pass so I can prevent other commits from pushing to the environment while I'm testing.

Today, if the staging lock isn't already held, I can go to the Lockable Resource page and take ownership of the lock and everything is great. However, if the lock is held by a commit currently pushing or running automated testing in staging, then I have to wait. Worse is if there are multiple other commits backed up waiting on the lock as well. There's no opportunity for me to take the lock for potentially hours. I could forcibly release the lock, but that allows the next queued job to take it before I can. I really want an option where I can take control of the lock without releasing it to any waiters.

---
Originally reported by chrisleck, imported from: Enable human to assume ownership of a held lock


  • status: Open
  • priority: Minor
  • component(s): lockable-resources-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 3
  • imported: 20251217-081411

Raw content of original issue

<tl;dr> Add an option on the Lockable Resource page that enables a human to take control of a currently locked resource without releasing it first.

We are using lockable resources in our CD pipeline to protect each of our environments: head, staging, and production while performing a push + running automated integration testing. As part of our staging -> production push, we perform a manual test pass. I'd like to be able to take ownership of the "staging" lock while performing the manual test pass so I can prevent other commits from pushing to the environment while I'm testing.

Today, if the staging lock isn't already held, I can go to the Lockable Resource page and take ownership of the lock and everything is great. However, if the lock is held by a commit currently pushing or running automated testing in staging, then I have to wait. Worse is if there are multiple other commits backed up waiting on the lock as well. There's no opportunity for me to take the lock for potentially hours. I could forcibly release the lock, but that allows the next queued job to take it before I can. I really want an option where I can take control of the lock without releasing it to any waiters.


Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.