-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-12092] Block job by category #25
base: master
Are you sure you want to change the base?
Conversation
Sorry accidentally made this pull request too early. Comments on the Jira ticket or pull request are welcome though :) |
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
fef46c5
to
1e0c878
Compare
This is ready for review and merging |
@@ -319,20 +322,34 @@ public ListBoxModel doFillCategoryItems() { | |||
private Integer maxConcurrentPerNode; | |||
private Integer maxConcurrentTotal; | |||
private String categoryName; | |||
private String blockingCategories; | |||
private List<String> blockingCategoriesList = new ArrayList<String>(); | |||
private List<NodeLabeledPair> nodeLabeledPairs; | |||
|
|||
@DataBoundConstructor | |||
public ThrottleCategory(String categoryName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please save the previous constructor as well. Otherwise the change affects the binary compatibility with previous versions
1e0c878
to
ad5de7f
Compare
521f484
to
97fd80b
Compare
Woohoo, fixed build failures :) |
97fd80b
to
632ecbd
Compare
632ecbd
to
7dfb26a
Compare
@oleg-nenashev any chance of a review for this PR? |
} | ||
|
||
private boolean isProjectBuilding(AbstractProject<?, ?> project) { | ||
if (project.isBuilding() || project.isInQueue()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project.isBuilding()
is unreliable for parallel runs; project.isInQueue()
causes a full queue lookup with a serious performance impact on cores till 1.610
@fluffy88 We tried to somehow overcome the issue in #27 and #28 , but unfortunately now I have no time to finalize and especially test these changes. |
👍 that's okay with me |
Any chance of this coming out? |
1.580.x compatibility is no longer a blocker, hence probably it could be done |
This would be a nice addition. In my use case I have build jobs and node provisioning jobs, both with their respective categories. The When a This PR is the best fit for this scenario. |
Allow categories to be configured so they are blocking by another category.
In category configuration, add new textbox which takes a comma separated list of category names. Jobs in the category will then be blocked from executing while jobs from any of the listed categories are queued or executing.