* 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
* 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>
* 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>
* 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>
* 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>
* 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
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.