Hi!
I have developed a quite straightforward Jenkins plugin (packaged as .hpi) to prioritize (push to the front of the queue) some builds that arrive in the queue based on certain conditions.
You can find the source code below in CustomSorter.java where I basically just override the default comparator and load it at Jenkins initialization.
The comparator then takes the decision between lhs and rhs based on my custom criteria.
After I load the plugin (for 8-12 hours) everything works fine & as expected (builds that meet my criteria get pushed to the front of the queue), but then for no apparent reason the queue gets stuck and thus very long since no jobs are executed even if all(or most of) the executors are free.
I have absolutely no idea what might be causing the issue and how I could track down the root cause(I’ve added logging to each comparison so that I have the result of each comparison in the Jenkins logs).
I’ll leave the .hpi and .java file below.
P.S. I've also opened a bug here https://issues.jenkins-ci.org/browse/JENKINS-51600.
Link to the plugin .hpi
https://drive.google.com/file/d/1lN8Bw0jqCGk-OpSCKMH6QvksGSKr7-Oi/view?usp=sharing
Thanks in advance,
George
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/4409C1B3-05C4-4637-8014-826453C75A91%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.