(It could already return null if the run has since been deleted; #1264 failed to mark this properly.)
Reserving IAE for inputs that getExternalizableId could not actually have produced,
and making sure to also throw this in case of non-numeric text after the hash.
Adding Javadoc for both methods.
- The old code would result in multiple triggered updates, with corresponding interrupts of in-progress updates
when faced with lots of slaves coming on line within 1 second of each other.
- New code will ensure that one and only one of the scheduled tasks (i.e. the last one) will trigger the updates.
The original fix was made in 0c3d67097a.
In this fix, I'm also moving the code that creates LeftItem.
It makes no sense that there's Item.cancel(Queue) and Queue.cancel(Item)
and they do different things!
Observed in a test against 1.480:
… hudson.model.Executor run
SEVERE: Unexpected executor death
java.lang.NullPointerException
at hudson.model.Computer.getNode(Computer.java:473)
at hudson.slaves.SlaveComputer.getNode(SlaveComputer.java:177)
at hudson.slaves.SlaveComputer.getRetentionStrategy(SlaveComputer.java:609)
at hudson.slaves.SlaveComputer.taskCompleted(SlaveComputer.java:285)
at hudson.model.queue.WorkUnitContext.synchronizeEnd(WorkUnitContext.java:140)
at hudson.model.Executor.run(Executor.java:253)
- Too many things have incorrect locking assumptions on calling NodeProvisioner#getPendingLaunches()
- Simpler to narrow the lock requirements as that should prevent deadlocks
- We now only need the lock for a very short window and the lock is only on the list of pending launches.
A truly conforming servlet 3.0 container does not allow us to set "secure cookie" flag beyond ServletContextListener.onInitialized().
If we see that, don't scare the users.
- If there are any files in `$JENKINS_HOME/update-center-rootCAs` that are not ending in `.txt` and are
not valid certificates, do not blow up the entire certificate checking (and hence the ability to see updates
or tool installers) but rather ignore those files and warn the user that the file should not be there.
The correct thing to do is only use as trusted certificates those certificates that parse.
- Also fix resource leak
This changes prevents the improper usage of method without the preliminary supportsMakeDisabled() check.
As an example, Subversion plugin behaves in such way (JENKINS-24341)
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
For example, the following should not cause Run.onLoad itself to fail:
java.lang.NullPointerException
at org.jenkinsci.plugins.workflow.steps.input.InputAction.onLoad(InputAction.java:29)
at hudson.model.Run.onLoad(Run.java:342)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.onLoad(WorkflowRun.java:332)
java.lang.RuntimeException: Unable to copy /…/jobs/…/config.xml
at hudson.plugins.jobConfigHistory.FileHistoryDao.createNewHistoryEntryAndCopyConfig(FileHistoryDao.java:252)
at hudson.plugins.jobConfigHistory.FileHistoryDao.createNewItem(FileHistoryDao.java:238)
at hudson.plugins.jobConfigHistory.JobConfigHistoryJobListener.onCreated(JobConfigHistoryJobListener.java:31)
at hudson.model.listeners.ItemListener.fireOnCreated(ItemListener.java:161)
at jenkins.model.Jenkins.putItem(Jenkins.java:2483)
at …
Caused by: java.io.FileNotFoundException: /…/jobs/…/config.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at hudson.plugins.jobConfigHistory.FileHistoryDao.copyConfigFile(FileHistoryDao.java:178)
at hudson.plugins.jobConfigHistory.FileHistoryDao.createNewHistoryEntryAndCopyConfig(FileHistoryDao.java:250)
... 108 more