Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-7291] Permit flyweight tasks to run on master even whe…
…n it has zero configured executors. Always adding Computer for master as a fallback The original proposed fix for JENKINS-7291 creates a Computer object transitively. This seems unwise as it violates the design of Computer as stated in the javadoc, and for example we can end up creating two Computers for the master. I think a better fix is to create a Computer for the master all the time, even if there's no executors configured. The discrimination in Queue.makeBuildable would ensure that such phantom Computer is only used as a last resort (statistically speaking). I've also tweaked executors.jelly a bit. I simplified it somewhat based on the idea that "if there's only one computer to show, the context is likely making it obvious". (I must be missing the intricacy in the current code.) Originally developed in a branch at 2c5b57f then squashed for clarity.
- Loading branch information
Showing with 88 additions and 29 deletions.
- +4 −0 changelog.html
- +3 −1 core/src/main/java/hudson/model/AbstractCIBase.java
- +7 −3 core/src/main/java/hudson/model/Computer.java
- +4 −3 core/src/main/java/hudson/model/Queue.java
- +1 −0 core/src/main/java/hudson/slaves/SlaveComputer.java
- +10 −0 core/src/main/java/jenkins/model/Jenkins.java
- +15 −22 core/src/main/resources/lib/hudson/executors.jelly
- +44 −0 test/src/test/java/hudson/model/QueueTest.java