Commit Graph
14268 Commits
Author SHA1 Message Date
Jesse Glick e996d0cd53 Optimization for AbstractLazyLoadRunMap.loadNumberOnDisk (#8494) 2023-09-20 20:46:09 +02:00
Jesse Glick 3e1747eca6 [JENKINS-72016] Define a thread pool for ProxyConfiguration’s HttpClient (#8490)
* Define a thread pool for `ProxyConfiguration`’s `HttpClient`

* Skip test on Windows https://github.com/jenkinsci/jenkins/pull/8490#issuecomment-1720108881
2023-09-20 20:45:14 +02:00
Vincent Latombe 7d285718c2 LogRecorder programmatic deletion support (#8489)
* Add programmatic deletion support for LogRecorder.
* Also added event handling through SaveableListener whenever it gets deleted.
2023-09-20 20:44:29 +02:00
Basil Crow b7920ec5ea Remove finalization from RegistryKey (#8488) 2023-09-20 20:44:04 +02:00
Basil Crow 807243e6bf Remove usages of deprecated ThreadDeath (#8487) 2023-09-20 20:43:47 +02:00
Basil Crow febca34a3d Migrate from deprecated finalization API to Java 9+ API (#8486)
* Migrate from deprecated finalization API to Java 9+ API

* Use non-deprecated JTH method
2023-09-20 20:43:16 +02:00
Jesse Glick 2a07b98e9c StringIndexOutOfBoundsException in AbstractItem.getUrl (#8481) 2023-09-20 20:42:26 +02:00
Yaroslav Afenkin f21cf875dc Merge branch 'security-master' 2023-09-12 17:59:34 +03:00
Markus Winter d41b0f5807 [JENKINS-71983] allow symbols in MenuItem#withIconClass (#8471)
[JENKINS-71983] fix symbols in MenuItem#withIconClass

when a symbol is passed to MenuItem#withIconClass the symbol is now
properly displayed
2023-09-10 13:02:44 +02:00
Vincent Latombe 2971155ccb Make branding overridable in signin/login page (#8462)
* Move resources from DefaultSimplePageDecorator to SimplePageDecorator to ease implementation.
2023-09-08 21:48:51 -06:00
Markus Winter 54c79f1e7d update badge documentation (#8469)
* badge documentation

Include in the badge documentation that it can be used in <l:task links

Set type for the badge attribute of lib/form/task

* fix javadoc
2023-09-08 21:48:18 -06:00
Basil CrowandVincent Latombe 830cb8addc Avoid usage of Guava from ProcessTree (#8467)
* Avoid usage of Guava from `ProcessTree`

* Update core/src/main/java/hudson/util/ProcessTree.java

Co-authored-by: Vincent Latombe <vincent@latombe.net>

---------

Co-authored-by: Vincent Latombe <vincent@latombe.net>
2023-09-08 21:47:38 -06:00
Kevin-CB f06bb88201 [SECURITY-3073] 2023-09-06 11:17:31 +00:00
Kevin-CB df7c4ccda8 [SECURITY-3072] 2023-09-06 11:17:25 +00:00
Yaroslav Afenkin 4bf648811f [SECURITY-3245] 2023-09-06 11:17:19 +00:00
Daniel Beck b8ac8cd4c5 [SECURITY-3261] 2023-09-06 11:17:14 +00:00
Vincent Latombe e79ac42baa Merge pull request #8448 from Vlatombe/labelAtomSet-robustness
Label parsing robustness fix
2023-09-02 11:49:37 +02:00
Basil Crow 33dc1fb2b4 [JENKINS-71950] List plugins in deterministic order (#8453)
List plugins in deterministic order
2023-09-01 18:00:06 -06:00
Daniel BeckandDaniel Beck 95373a96f7 Add telemetry for security-related settings (#8440)
* Add telemetry for security-related settings

* Actually include component information

* FindBugs, also TcpSlaveAgentListener can be null

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2023-08-31 20:14:11 +02:00
Vincent LatombeandDaniel Beck 9a9cac88d3 Apply suggestions from code review
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2023-08-31 13:56:57 +02:00
Vincent Latombe 7cbb82cdc2 Fix spotbugs/checkstyle 2023-08-31 13:24:13 +02:00
Vincent Latombe 4a708e2b0a In case an extension of Slave overrides readResolve but does not call its super implementation
recover from it, and issue a warning to raise a bug against the impacted plugin.
2023-08-31 09:44:22 +02:00
Vincent LatombeandJesse Glick 7b1dfd8d83 Initialize default view earlier in the init process. (#8413)
* Initialize default view earlier in the init process.

Perform the default view initialization next to loading the
configuration from disk.

This is more consistent as the primary view and views are cleared just
before loading from disk, which leads to a temporary inconsistent state while
Jenkins initializes.

* Update core/src/main/java/jenkins/model/Jenkins.java

Co-authored-by: Jesse Glick <jglick@cloudbees.com>

* View initialization should happen even when the config file doesn't exist.

* Add a test

---------

Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2023-08-29 18:59:14 +02:00
Tim Jacomb d7da362feb Add Appearance system configuration page (#8403)
* Add `Appearance` system configuration page

* Use one-column layout

* Add developer guidance
2023-08-29 09:32:38 +01:00
Daniel BeckandDaniel Beck 262e65cdff Fix PCT problem of #8250 (#8426)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2023-08-25 14:19:48 +01:00
16bf84c330 [JENKINS-71087] Nicer 404 error pages (#8250)
* Nicer 404 error pages

* Fix test, expose custom error message on 404 pages

* Record the current user to show an appropriate 404 page

* 404 simple page for the resource domain

the resource domain has no access to the static resources like
javascript and css. Open the images in the filter so we can at least
show an image.
Do not show the hint about not found or permission when accessing the
static-files url from the regular domain.

* Minor fixes and improvements

- Be more restrictive, only allow the specific image on simple 404
- Make extra resources work with non-empty resources path
- Do not redirect to 404 page after login from regular 404 page
- Remove 'Error:' prefix for friendlier page appearance
- Include favicon etc. resources in simple 404 page

* Fall back to 'Not Found' when accessing error pages directly

Also reformat

* Add 404 page tests

* Revert change to ResourceDomainTest

* Move test out of JenkinsTest, make parameterized for different contexts

* Return to the 404'd page after login by using 'from' session attribute

* Prevent 'REST API' link from showing on the error page

* Assert specific message on resource domain

* Remove obsolete commented out line

* Add Javadoc

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
Co-authored-by: Markus Winter <m.winter@sap.com>
2023-08-23 07:27:21 +01:00
Vincent Latombe 76bfee23a0 Optimize Label parsing calls (#8395)
* Optimize Label#parse for simple label

For a simple label, this speeds up lookup of an existing simple label (no expression used):  16ns vs 106ns (6x faster)

* Fix reviews

* Fix include

* Avoid parsing label every time getAssignedLabels is called

* Store Set<LabelAtom> at Node descendants level
* Compute it whenever labelString is updated

* Fix spotbugs / test issue

* Make it restricted
2023-08-23 07:26:24 +01:00
Daniel BeckandDaniel Beck ee02eec256 [JENKINS-71848] Remove admin monitors popup from /manage/ again (#8388)
[JENKINS-71848] Remove admin monitors popup from /manage/ again

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2023-08-21 23:25:19 +02:00
Jesse Glick 7f3fa048ca [JENKINS-61452] Tolerate corrupt Base64 in PlainTextConsoleOutputStream (#8378) 2023-08-19 18:08:49 +01:00
SujathaH 4a262f5e71 Replace MD5 digest with SHA256 while logging payload in Mock class called from tests (#8319) 2023-08-11 17:59:26 +02:00
Markus Winter a53112d63f [JENKINS-71744] Fix context menu (#8322)
[JENKINS-71744] fix context menu
2023-08-05 04:43:28 -06:00
Jesse Glick 3d74c37b76 DescribableList.replace called Saveable.save twice (#8303) 2023-08-01 10:43:32 +02:00
Jesse Glick d841f1d1f7 Simpler Jenkins.getComputers (#8299) 2023-07-29 16:39:22 +02:00
YaroslavandYaroslav Afenkin 521da3275e [JENKINS-71054] Remove the treeview option for artifactList (#8265)
Co-authored-by: Yaroslav Afenkin <yaroslavafenkin@users.noreply.github.com>
2023-07-29 16:38:26 +02:00
Zhun-Wei Liu c8a395abea [JENKINS-71186] - Improve socket creation on TcpSlaveAgentListener (#8288) 2023-07-27 22:44:52 +02:00
Jan Meiswinkel d6fb182e2e Add logging for agent usage by job (#8283) 2023-07-26 17:25:54 +02:00
Matt Pulver 1e7e2417de [JENKINS-71366] Set sandbox allow-same-origin in DEFAULT_CSP_VALUE. (#8273) 2023-07-26 17:23:14 +02:00
Yaroslav Afenkin a310e0d900 Merge branch 'security-master' 2023-07-18 18:06:11 +03:00
bbb977cee5 Remove deprecated DIR_SEPARATOR and LINE_SEPARATOR (#7641)
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2023-07-14 11:39:13 +02:00
Yaroslav Afenkin 1b9f1ccdbb [SECURITY-3188] 2023-07-13 07:24:44 +00:00
1ec59c737a [JENKINS-71438] Replace browser confirm with modal dialogs (#7938)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
2023-07-12 08:13:18 +01:00
Jesse Glick 8de949bb31 LazyBuildMixIn.getEstimatedDurationCandidates duplication (#8233) 2023-07-11 17:34:49 +02:00
df4972fb70 [JENKINS-70059] Improve Safe Restart interface and user information (#7355)
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
2023-07-07 08:34:40 +01:00
Mark Waite 211f67a464 Read end of life data file less often (#8220)
Remember the lines that were read from the file and the last file that was
read so that the next iteration can reuse the data that was already read.
No need to read `/etc/os-release` once for each entry in the JSON file.
The contents of the file won't change from the first entry to the last
entry in the JSON file.

This won't change much, since the read operation is probably already
cached by the operating system with a file as small as `/etc/os-release`.

Cached file content is deleted at the end of the loop over the JSON file.
2023-07-06 19:00:47 -06:00
Vincent Latombe d99bafdebd [JENKINS-71553] Add history widget factory for job not implementing Queue.Task (#8221)
[JENKINS-71553] Add history widget factory for job not implementing Queue.Task

like hudson.model.ExternalJob
2023-07-03 11:02:32 -06:00
Basil CrowandMark Waite 7cbe60fa5e Non-varargs call of varargs method with inexact argument type for last parameter (#8205)
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2023-06-30 17:53:21 +02:00
Alexander Brandes 9e65c05201 Fill in todo annotations (#8209) 2023-06-29 20:39:53 +02:00
cui fliter aa983a734c Fix a typo in DomainValidator's docs (#8163)
fix some typos

Signed-off-by: cui fliter <imcusg@gmail.com>
2023-06-19 13:20:49 +02:00
Basil Crow 8240e0736c Remove usages of org.apache.commons.io.output.NullOutputStream (#8144) 2023-06-16 08:44:01 +01:00
Basil Crow a9cbc1df87 Remove usages of org.apache.commons.io.input.NullInputStream (#8145) 2023-06-16 08:43:55 +01:00