Commit Graph
8644 Commits
Author SHA1 Message Date
Stephen Connolly 86ea65ab6f Make it possible for sub-classes to have a sub-class specific trust anchor chain 2014-10-29 16:55:41 +00:00
Jesse Glick 4cb7414e90 fromExternalizableId should just return null, not throw IAE, if the job has since been renamed/move/deleted.
(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.
2014-10-28 11:23:03 -07:00
Stephen Connolly 07fb00e05a If you are synchronizing on something to access a volatile, then you are doing something wrong
- Yet more interrupting bad patterns, especially where we expect the node monitor to take up to 30 seconds to complete if an async variety
2014-10-28 13:48:00 +00:00
Stephen Connolly 68f6222633 Prevent a storm of node monitor updates when there is a storm of nodes coming on line within 1 second
- 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.
2014-10-28 13:27:24 +00:00
Stephen Connolly 1587511c55 fix @since tags 2014-10-28 13:27:03 +00:00
Stephen Connolly bf2206d783 Merge pull request #1433 from stephenc/master
Refactor NodeProvisioner to allow for extension of strategies
2014-10-28 13:21:56 +00:00
CloudBees DEV@Cloud 1671c9e63a Merge commit '9b36e2ae8dbbd2a7ab0d9d4bc9e24e305e33ecbc' 2014-10-26 22:22:28 +00:00
Kohsuke Kawaguchi 9b36e2ae8d [FIXED JENKINS-25314]
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!
2014-10-26 15:20:38 -07:00
Jesse Glick 300b6fa519 Forgotten @since. 2014-10-26 13:58:40 -07:00
Jesse Glick 2f8e2684af Merge pull request #1441 from mattmoor/upstream-javadoc
Change the javadoc of UpstreamCause to be more accurate...
2014-10-25 12:19:59 -04:00
Matt Moore 6ceb24cbd9 Change the javadoc of UpstreamCause to be more accurate (the upstream build need not be complete) 2014-10-25 08:54:11 -07:00
Jesse Glick 90292ed28a Null safety.
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)
2014-10-21 11:42:11 -04:00
Oleg Nenashev 6819a620c0 Noting #1411
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2014-10-19 23:47:35 +04:00
Oleg Nenashev e80fa118aa Merge pull request #1411 from synopsys-arc-oss/JENKINS-19017
[FIXED JENKINS-19017] - FileParameter - Handle non-null file parameters as different values
2014-10-19 23:28:14 +04:00
Stephen Connolly 4d987accef Clarify when to use SlaveComputer#setAcceptingTasks over RetentionStrategy#isAcceptingTasks(T) 2014-10-17 12:36:01 +01:00
Stephen Connolly 34d59a277e Tidy up javadoc some more 2014-10-17 12:27:48 +01:00
Stephen Connolly 197f2ffd27 Fix syntax in Javadoc comment 2014-10-17 12:23:45 +01:00
Stephen Connolly 77d9aa33a5 typos 2014-10-17 12:21:45 +01:00
Stephen Connolly 4e27d4ec17 Narrow the scope of lock required to get the pending nodes.
- 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.
2014-10-17 12:21:45 +01:00
Stephen Connolly 6b583764b6 Clarify the lock semantics 2014-10-17 12:21:45 +01:00
Stephen Connolly 9fff4118d4 Make node provisioning strategy plugable 2014-10-17 12:21:44 +01:00
Stephen Connolly 7acbba330c Typo 2014-10-17 12:21:12 +01:00
Stephen Connolly 10ac2b3ccd add @since tags 2014-10-17 12:20:07 +01:00
Stephen Connolly f07fb85352 Allow Node and RetentionStrategy to contribute to Computer#isAcceptingTasks 2014-10-17 09:38:32 +01:00
Kohsuke Kawaguchi 582128b9ac [FIXED JENKINS-25019]
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.
2014-10-16 19:23:23 -07:00
Jesse Glick d2a0a6c2ae Merge pull request #1424 from synopsys-arc-oss/refactoring_User_class
Annotated hudson.model.User methods
2014-10-16 08:58:57 -04:00
Oleg Nenashev 6e5520a7d5 Merge pull request #1416 from dominiquebrice/javadoc_update
Updating javadoc after struggling to add action to nodes
2014-10-16 15:21:40 +04:00
Stephen Connolly f423174d0b Additional safety as an addendum to 34b4bf52ad 2014-10-16 10:26:27 +01:00
Stephen Connolly 34b4bf52ad Do not fail certificate validation because some files in Jenkins Home are not actually certificates
- 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
2014-10-16 10:21:48 +01:00
Dominique 52941e3381 Updating javadoc after struggling to add action to nodes 2014-10-15 22:05:04 -04:00
Oleg Nenashev 04b8ef8a05 Annotated hudson.model.User methods.
The fix also includes comments in #1424 regarding Nonnull usage

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2014-10-16 02:00:47 +04:00
Daniel Beck d5d47edae4 Merge branch 'master' of https://github.com/jenkinsci/jenkins into JENKINS-3539
Conflicts:
	test/src/test/java/hudson/model/ParametersTest.java
2014-10-15 01:13:45 +02:00
Daniel Beck 190f0b6faf [FIXED JENKINS-3539] Prevent empty file creation if left empty 2014-10-15 00:33:49 +02:00
Jesse Glick 95c73c313f NPE in form validation when configured on a non-AbstractProject, like a workflow job. 2014-10-14 08:32:44 -04:00
Kohsuke Kawaguchi e219d19613 Added a method to read a file from the middle 2014-10-13 17:31:08 -07:00
Kohsuke Kawaguchi fad538f9ce read access to log file useful for plugins like support-core 2014-10-13 17:31:08 -07:00
Oleg Nenashev 55f15519ce Noting #1374
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2014-10-11 14:31:09 +04:00
Oleg Nenashev a7cc2a1b3a Merge pull request #1374 from synopsys-arc-oss/JENKINS-24340
[FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false
2014-10-11 14:20:59 +04:00
Jesse Glick ef6c042447 Merge branch 'JENKINS-24763' of github.com:recampbell/jenkins 2014-10-10 15:28:58 -04:00
Oleg Nenashev d045618e0a Merge pull request #1421 from daniel-beck/JENKINS-24914
[FIXED JENKINS-24914] Don't block indefinitely every other month
2014-10-10 19:24:55 +04:00
Oleg Nenashev d158334f3b Merge pull request #1420 from daniel-beck/JENKINS-16184
[JENKINS-16184] Also escape greater-than character
2014-10-10 09:04:36 +04:00
Jesse Glick aac8c23972 [FIXED JENKINS-25081] Memory leak in BoundObjectTable when ProgressiveRendering is used. 2014-10-09 17:58:39 -04:00
Oleg Nenashev a78f1d3246 [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false
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>
2014-10-09 17:01:58 +04:00
Daniel Beck adf8305f8b [FIXED JENKINS-24914] Don't block indefinitely every other month 2014-10-09 00:46:11 +02:00
Daniel Beck daacb02057 [JENKINS-16184] Also escape greater-than character 2014-10-09 00:38:22 +02:00
Jesse Glick c8b6f12784 Merge pull request #1414 from mattmoor/master
Convert AbstractProject to better utilize structure form submission.
2014-10-08 00:32:57 -04:00
Jesse Glick bbb60e51ed Adding Option.toString; should make ListBoxModel.toString more useful for tests or debugging. 2014-10-07 14:06:49 -04:00
Jesse Glick f8146742ed Better robustness when action loading fails.
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)
2014-10-06 12:54:24 -04:00
Jesse Glick 6825121f06 [JENKINS-21224] Defend against exceptions in listeners, for now just for ItemListener.
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
2014-10-06 10:18:16 -04:00
Daniel Beck fda84f456f Merge pull request #1306 from bkmeneguello/post-cancel-shutdown
[FIXED JENKINS-23020 JENKINS-23942] Convert the queue's cancel shutdown to POST
2014-10-03 22:02:30 +02:00