Commit Graph
271 Commits
Author SHA1 Message Date
bhenderson 6fe31014d8 Fix advertised JNLP Port
As far as I can figure, the /TcpSlaveAgentListener/ endpoint headers
tell the slaves what the JNLP port is. When I'm running jenkins behind a
proxy (marathon using the mesos plugin, which bridged networking), even
though I was setting the advertised port per a thread[1], it was not
accurately being returned in the header. This patch fixes that.

[1] https://groups.google.com/d/topic/jenkins-mesos/qUrXpDY07TQ/discussion
2016-03-29 08:30:20 -07:00
Stephen Connolly 96150d3a46 Jenkins.getInstance() will be @Nonnull in Jenkins 2.0+
- Code that is running from a plugin and on the master's JVM is guaranteed to never get null from this method (any cases where you do get null are bugs in core)
- Code that is running from a plugin and on a remote JVM should never be allowed to load the Jenkins class in their classloader, so should never use Jenkins.getInstance()... we are annotating the method with @Nullable so that such code can have some evolution time
- Code that is running in core and on one of two special paths should use the Jenkins.getInstanceOrNull() method so that the UI can be presented to users before the singleton has been instantiated / after the singleton has been destroyed
- The remaining 95% of uses in core (and 100% of uses in plugins) can safely assume that the instance is never null
2016-03-08 21:15:43 +00:00
Stephen Connolly d1dfbd2baf Revert "Jenkins.getInstance() should be non-null"
This reverts commit bb7c8fcedb.

Closes #2090, I'll redo this as a PR... though if that PR is subject to multiple rounds of review before being merged then I will take that of evidence of the exact problem that committing directly was supposed to resolve... namely exponentially multiplying the effort required to make actual improvements to the code base.
2016-03-08 21:09:28 +00:00
Stephen Connolly 1ed395aa06 [FIXED JENKINS-33377] Add a check for termination to Functions.isExtensionsAvailable() 2016-03-08 10:08:32 +00:00
Stephen Connolly bb7c8fcedb Jenkins.getInstance() should be non-null
- It is never too late to do the right thing.
- The vast majority of usages of `Jenkins.getInstance()` in core currently assume that its return value is non-null
- This commit changes those that are written to correctly check for non-null values will call `Jenkins.getInstanceOrNull()`
- We deprecate the `Jenkins.getActiveInstance()` madness
- I checked with @kohsuke who said not to bother with a PR and just commit this strongly opinionated change direct to master as a PR will just degrade into a bikeshedding.
2016-03-07 22:08:36 +00:00
Jesse Glick 1cbbb23923 Replaced Job.logRotator with BuildDiscarderProperty. 2015-10-27 16:51:15 -04:00
Vojtech Juranek 8f29260b17 [FIXED JENKINS-29507] Make JenkinsRule useable on systems without glibc 2015-09-17 19:56:51 +02:00
Veres Lajos d58903558e typofix - https://github.com/vlajos/misspell_fixer 2015-08-11 16:34:13 +01:00
Oleg Nenashev d5d8463e37 Merge pull request #1468 from synopsys-arc-oss/JENKINS-25734
[JENKINS-25734] - Prevent NPE in Executor/causeOfDeath page on "expected thread death"
2015-06-13 13:15:09 +03:00
Oleg Nenashev bf7f14b165 [JENKINS-25734] - Prevent NPE in Executor/causeOfDeath page if the field is null
The change does not fix the issue, but it suppresses NPE at least.
2015-06-07 16:05:35 +03:00
Oleg Nenashev fd42e33d61 Merge pull request #1661 from deadmoose/deprecated_annotations
Add @Deprecated annotations to things documented as @deprecated.
2015-04-22 16:21:45 -07:00
Kohsuke Kawaguchi 86bf6b7603 Allow the advertised TCP slave agent port number to be modified.
This allows TCP slave agent port to be reverse proxied.
2015-04-21 08:26:54 -07:00
David Hoover 1709ed3a2e Add @Deprecated annotations to things documented as @deprecated. 2015-04-19 14:50:12 -07:00
Stephen Connolly 1c253bb352 fix the @since tags 2015-03-26 15:22:33 +00:00
Stephen Connolly 9cd00e40dd added @since tag as requested by @jglick 2015-03-25 10:30:45 +00:00
Stephen Connolly 92147c3597 [FIXED JENKINS-27565] Refactor the Queue and Nodes to use a consistent locking strategy
The test system I set up to verify resolution of customer(s)' issues driving this change, required
additional changes in order to fully resolve the issues at hand. As a result I am bundling these
changes:

- Moves nodes to being store in separate config files outside of the main config file (improves performance) [FIXED JENKINS-27562]
- Makes the Jenkins is loading screen not block on the extensions loading lock [FIXED JENKINS-27563]
- Removes race condition rendering the list of executors [FIXED JENKINS-27564] [FIXED JENKINS-15355]
- Tidy up the locks that were causing deadlocks with the once retention strategy in durable tasks [FIXED JENKINS-27476]
- Remove any requirement from Jenkins Core to lock on the Queue when rendering the Jenkins UI [FIXED-JENKINS-27566]
2015-03-24 14:48:47 +00:00
Jesse Glick 4a98beaf64 Using ExtensionList.lookup consistently. 2014-08-04 15:55:22 -04:00
tfennelly 42190ed977 <l:icon> tag 2014-07-30 15:52:15 +01:00
Daniel Beck 578b513f53 Merge pull request #1303 from daniel-beck/JENKINS-18902
[FIXED JENKINS-18902] Exclude lower bound of range from changes
2014-07-27 17:46:46 +02:00
tfennelly de6ea1ab52 IE compatibility mode tweaks
Set "X-UA-Compatible" meta tag (MSIE browsers only - forces browser compatibility mode)
JS based warning if Document Mode doesn't match IE version (MSIE browsers only)
2014-07-17 19:14:59 +01:00
Daniel Beck 25acdd8850 [FIXED JENKINS-18902] Exclude lower bound of range from changes 2014-06-28 20:26:32 +02:00
Jesse Glick 3f2958795c ${h.breakableString(…)} might be called with a null argument if something is broken.
For robustness, pass on the null to Jelly rather than failing page rendering.
2014-04-30 18:19:17 -04:00
Oliver Gondža a7eb8b7eb3 Merge pull request #1195 from daniel-beck/JENKINS-22670
[FIXED JENKINS-22670] Less aggressive word breaking
2014-04-18 19:20:55 +02:00
Daniel Beck 35b0094137 [FIXED JENKINS-22670] Less aggressive word breaking 2014-04-17 21:49:15 +02:00
Jesse Glick 747d550c3c isMatrixProject ought to handle nulls, just in case. 2014-04-14 23:20:12 -04:00
Jesse Glick d72fda46a6 isMatrixProject appears unused, but keep for compatibility. 2014-04-14 19:08:43 -04:00
Jesse Glick 7f033ec9fa p:config-upstream-pseudo-trigger is actually applicable to AbstractProject, not only Project. 2014-04-09 18:31:38 -04:00
Jesse Glick bcc8614856 [FIXED JENKINS-18364] Functions.getRelativeLinkTo is called many times during rendering, so skip checking View.getItems which is expensive. 2014-04-01 10:53:25 -04:00
Jesse Glick abc77438d2 Merge branch 'security' into security-rc
Conflicts:
	core/src/main/java/hudson/Functions.java
	core/src/main/java/hudson/markup/MyspacePolicy.java
	core/src/main/java/hudson/util/RobustReflectionConverter.java
	core/src/main/resources/lib/layout/layout.jelly
	war/pom.xml
2014-02-11 21:00:54 -05:00
Jesse Glick bf53919856 [FIXED SECURITY-93] PasswordParameterDefinition should serve existing default value in encrypted form.
And strengthen functional tests (using configRoundTrip) to ensure that the same mistake is not made elsewhere.
2014-02-11 14:19:39 -05:00
Jesse Glick a0b00508ee [FIXED SECURITY-77] XSS in iconSize cookie. 2014-02-11 14:17:00 -05:00
Oliver Gondža ca139a7c9f Merge pull request #1058 from olivergondza/breakable-regex
[FIXED JENKINS-20928] l:breakable mishandles HTML metacharacters
2013-12-12 07:49:16 -08:00
Oliver Gondža 3f1f122ff4 [FIXED JENKINS-20928] l:breakable mishandles HTML metacharacters 2013-12-12 15:16:13 +01:00
Jesse Glick c5e23739fa [JENKINS-20892] Partial fix of poor scalability in /builds and related displays. 2013-12-06 18:21:57 -05:00
Jesse Glick a900b488b5 [FIXED JENKINS-20800] HTML metacharacters not escaped in log messages. 2013-11-27 18:32:22 -08:00
Bruno Kühnen Meneguello cdf45c6439 [FIXED JENKINS-5622] Allow build queue list to be collapsed 2013-11-22 14:38:38 -02:00
Jesse Glick 4825967fe3 Deleting code using @IgnoreJRERequirement for Java 5 compatibility. 2013-11-15 08:43:40 -05:00
Kohsuke Kawaguchi dfc2f57d19 this can happen so early in the game that j might be null
"Jenkins is loading" page gets set up before Jenkins instance gets
initialized.
2013-11-05 12:29:51 -08:00
Jesse Glick 5b7543159d It is Thread.getThreadGroup that can return null, not ThreadGroup.getName.
https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/1436/testReport/hudson.model/UpdateCenter2Test/install/
java.lang.NullPointerException: null
	at hudson.Functions$ThreadSorterBase.<init>(Functions.java:1151)
	at hudson.Functions$ThreadSorterBase.<init>(Functions.java:1142)
	at hudson.Functions$ThreadGroupMap.<init>(Functions.java:1163)
	at hudson.Functions.sortThreadsAndGetGroupMap(Functions.java:1136)
	at org.jvnet.hudson.test.JenkinsRule$2.evaluate(JenkinsRule.java:482)
2013-10-31 13:43:55 -04:00
Jesse Glick dceac8f0ac [FIXED JENKINS-19173] Added ContextMenuVisibility marker interface for Action’s. 2013-10-23 10:44:01 -04:00
Jesse Glick bac8b9795a Clarified Javadoc: non-display names use '/' as a separator. 2013-10-21 15:34:17 -04:00
Jesse Glick 0e3afeb6c5 Sources are UTF-8 so might as well use the raw character when specifying something that will be a part of output. 2013-10-21 14:20:24 -04:00
Jesse Glick 587c6fe317 [FIXED JENKINS-20085] Overflow in Jenkins.globalIota. Simpler and safer to use an AtomicLong. 2013-10-16 13:40:34 -04:00
Jesse Glick 99f84bc8e0 7232798611 mistakenly made a new method deprecated. 2013-08-27 17:34:07 -04:00
evernat 3835b3fcc7 Optimize String appends in hudson.Functions 2013-08-26 21:15:35 +02:00
Kohsuke Kawaguchi 7232798611 [FIXED JENKINS-19124]
Added another attribute 'checkDependsOn' on <input> elements (akin to
'fillDependsOn', etc) to list up the other dependency controls, and
insert appropriate onchange events.

'checkUrl' is now just the stem portion of the URL to invoke, and
the client script builds up the query parameters.
2013-08-08 16:24:09 -07:00
Jesse Glick 535247e169 Clearer display of log messages: chronological order, and coloration of repeated vs. fresh metadata. 2013-07-22 13:55:08 -04:00
Mark Waite 7f521e729a Fix javadoc warnings in method parameters 2013-07-19 14:36:02 -06:00
Kohsuke Kawaguchi 7bf67b6d0e Avoid code duplication 2013-07-16 21:40:27 -07:00
Christoph Kutzinski e9e9d3276f removed the noAnime() conversions, so we can rely on the compiler to warn us, if we forget a case here 2013-07-14 11:44:35 +02:00