[JIRA] (JENKINS-42679) Allow lock retrieval based on requested priority

9 views
Skip to first unread message

rpocase@gmail.com (JIRA)

unread,
Mar 10, 2017, 2:12:02 PM3/10/17
to jenkinsc...@googlegroups.com
Robby Pocase created an issue
 
Jenkins / New Feature JENKINS-42679
Allow lock retrieval based on requested priority
Issue Type: New Feature New Feature
Assignee: Unassigned
Components: lockable-resources-plugin
Created: 2017/Mar/10 7:11 PM
Priority: Minor Minor
Reporter: Robby Pocase

I'd be interested in seeing a feature where a lock could have an optional priority. If a priority is set, actions requesting resources with a higher priority would get the lock sooner than those with lower priority.

 

lock('my-resource', priority: 9) { }
}

lock('my-resource', priority: 5) { }

 

In this example, I would expect the priority 9 lock to yield before the priority 5 lock, even if priority 5 requested the lock first. This could be used in conjunction with inversePrecedence to order lock yielding within priority buckets.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

ethorsa@inbox.lv (JIRA)

unread,
Jun 7, 2019, 7:01:02 AM6/7/19
to jenkinsc...@googlegroups.com
ethorsa commented on New Feature JENKINS-42679
 
Re: Allow lock retrieval based on requested priority

There's a pending PR already: https://github.com/jenkinsci/lockable-resources-plugin/pull/78

Unfortunately it's stuck since months.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ethorsa@inbox.lv (JIRA)

unread,
Jun 7, 2019, 7:03:02 AM6/7/19
to jenkinsc...@googlegroups.com
ethorsa edited a comment on New Feature JENKINS-42679
There's a pending PR already:   [ PR#78| https://github.com/jenkinsci/lockable-resources-plugin/pull/78]


Unfortunately it's stuck since months.

ethorsa@inbox.lv (JIRA)

unread,
Jun 7, 2019, 7:06:02 AM6/7/19
to jenkinsc...@googlegroups.com
ethorsa edited a comment on New Feature JENKINS-42679
There's a pending PR already: [ * PR#78 * |https://github.com/jenkinsci/lockable-resources-plugin/pull/78]


Unfortunately it's stuck since months.

tobias-jenkins@23.gs (JIRA)

unread,
Jun 12, 2019, 3:47:02 PM6/12/19
to jenkinsc...@googlegroups.com

tobias-jenkins@23.gs (JIRA)

unread,
Jun 12, 2019, 3:47:02 PM6/12/19
to jenkinsc...@googlegroups.com
Tobias Gruetzmacher commented on New Feature JENKINS-42679
 
Re: Allow lock retrieval based on requested priority

It seem some kind of priority support was already part of this plugin before version 1.7, but it was removed. I'll take a look at the merge request, but my focus is currently more on bug-fixing...

williambrode@gmail.com (JIRA)

unread,
Nov 27, 2019, 5:50:03 PM11/27/19
to jenkinsc...@googlegroups.com

Tobias Gruetzmacher thanks for all your great work!  Would definitely be interested in this feature.  Not sure if people are handling this another way but we use the lock(inversePrecedence: true) { milestone() } paradigm to "roll up" builds when multiple builds are ready to enter that stage of the pipeline.

There is an issue with this: If change 1 starts, then change 2, but change 2 goes faster and gets to the lock first, it would abort change 2 and build change 1 (since change 1 called the lock step last).  So at least for SCMs with increasing numeric change numbers, it would be preferable to use the change number as the priority - to ensure we always let the newest change get the lock.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages