* [JENKINS-72371] rework node monitor configuration
This PR reworks the way node monitors are configured. It ensures that
also monitors which are set to ignored, can be configured.
Previously, there was a checkbox before each monitor, where the
behaviour was not totally clear. It meant that the monitor is ignored
but still collecting data and not disabled as one might think. But when
the monitor was disabled any configuration was lost and default values
were used.
* improve description
* fix formatting
* add since
[JENKINS-72449] Specify that no fallback to the default locale should be used when looking up a resource bundle
When running the JVM with a default locale that is not english, the
resource bundle lookup for english would return a bundle with that
default locale, instead of using the "default" that is english.
Also changed bundle resolution to use uberClassloader rather than
iterating on all plugin classloaders
* show node monitors on agent page
add an advanced button on the agent page. When clicking it will show the
node monitors for this agent including any warnings/errors
* fix style
* Class loading deadlock between `PermalinkProjectAction` & `PeepholePermalink`
* Checkstyle
* Clearer reproducer
* Do not let `Permalink` refer to its subclass `PeepholePermalink` in its static initializer
* Cleaner test
* Checkstyle
* Maybe we should not run `initialized` from `Job.<clinit>` either
* Add `ExtensionList.lookupFirst` convenience method.
When introducing an extension point that is meant to allow overriding a default behaviour with another implementation,
generally the caller only cares about looking up only one implementation, the one with the highest ordinal.
* Fix javadoc
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
---------
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
make displayname of HistoryWidget configurable
for use with customizable-build-now plugin
make the placeholder for the history filter less specific, the title
already explains what this shows so just `Filter...` should be enough.
* [JENKINS-71715] Allow plugins with alternate build log visualizations to handle console links from core and other plugins
* [JENKINS-71715] Apply suggestions with ordinal extension and @since TODO
* [JENKINS-71715] Public @Extension
* Add or fix @since todo
we usually don't put versions but put todo instead and these versions get resolved _after_ merges.
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
* [JENKINS-71715] Apply suggestions from reviews
* [JENKINS-71715] Switch ConsoleURLProvider to interface and add Functions.getContextRelativeUrl
* [JENKINS-71715] Refactor ConsoleUrlProvider API and add Functions.getConsoleUrl method for use in Jelly files
* [JENKINS-71715] Fix casing of ConsoleURLProvider.java
* [JENKINS-71715] Add global and per-user configuration options for ConsoleUrlProvider
* [JENKINS-71715] Fix Javadoc reference
* [JENKINS-71715] Remove outdated TODO comment
* [JENKINS-71715] Miscellaneous updates based on review feedback
* [JENKINS-71715] Fix Javadoc links
* [JENKINS-71715] Update console links for build list and build time trend widgets
* [JENKINS-71715] Functions.getConsoleUrl must take Queue.Executable instead of Run
* [JENKINS-71715] Simplify test using WebClient.executeOnServer
* [JENKINS-71715] Add constructor
* [JENKINS-71715] Preserve old behavior of p:console-link as a fallback for atypical consumers
* [JENKINS-71715] Ignore invalid URLs and consult global providers if user providers fail to provide a valid URL
* [JENKINS-71715] Move ConsoleUrlProviderGlobalConfiguration into AppearanceCategory
* [JENKINS-71715] Hide AppearanceGlobalConfiguration if ConsoleUrlProviderGlobalConfiguration is disabled and would be the only option on the page
* [JENKINS-71715] Update help text and Javadoc based on review feedback, and filter out default provider in global config
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
* [JENKINS-71715] getProvidersDescriptors can be an instance method
---------
Co-authored-by: Baptiste Mathus <bmathus@gmail.com>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Devin Nusbaum <dnusbaum@cloudbees.com>
Co-authored-by: Devin Nusbaum <dwnusbaum@users.noreply.github.com>
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
[JENKINS-72159] deactivate Markedoffline monitor when agents are online
When an agent comes online again after disk space issues are resolved
the corresponding admin monitor is now deactivated if there are no other
agents left that are temporarily offline due to disk space issues.
* [JENKINS-64816] prepare for support of node monitors by JCasC
In order that configuration as code plugin can properly support node
monitors we need to add databound constructors.
* fix warnings
* add javadoc that DataBoundConstructor is a must
* remove duplicate extension
* delete obsolete install methods
Show Java version admin monitor at 12 months and 3 months
Daniel Beck described his recommendation to alert users at 12 months
and at 3 months prior to the end of support of a Java version.
He wrote:
> The second warning in particular needs to strike a balance between
> being shown late enough so it's actually relevant for whoever hasn't
> acted yet, while being shown early enough that slightly more elaborate
> environments (difficult to schedule maintenance windows) are informed
> in time. 3 months aligns rather nicely with the LTS schedule where
> we kinda expect folks to do that anyway.
>
> 18/9, or even 12/6 errs too far on the side of those for whom this is
> extreme effort (and who dismissed the first message more appropriate for
> their environment!), while showing everyone else completely irrelevant
> notices they won't care about for many months to come.
https://github.com/jenkinsci/jep/pull/400#discussion_r1371510566 provides
more details.
The Java 8 to Java 11 transition saw a significant change in adoption of
Java 11 once the admin monitor was visible to users. That was shown
slightly over 12 months before the release that required Java 11.
This change continues that pattern of 12 months warning before end
of support.
https://github.com/jenkinsci/jep/pull/400#discussion_r1375623888 has a
graph that shows the adoption curves for Java 8, Java 11, and Java 17.
* Introduce `Loadable` interface
CloudBees CI uses `load()` method to reload selectively parts of the Jenkins object model, without reloading everything.
This formalizes the interface that gets used for this purpose, even if most of the Saveable implementations were using a `load()` method by convention.
* Add missing @Override
* Jenkins#load can throw IOException
* Inline loadConfig into load
* Make Plugin#load/save synchronized (same as Descriptor)
* [JENKINS-72020] Reorder clouds
Adding back controls to reorder clouds.
Since clouds order is taken into account for node provisioning, users should be able to reorder them as needed.
* Use tertiary buttons
* Separate screen for reordering
* Include reordering in the cloud list directly (thanks @timja)
* Show the save button after the first reordering
* Separate JS
Only display order column when admin
* Fix reviews
* Remove unused string
* Put drag-and-drop handle in the cloud icon column
* Add missing permission check
* Add a small blurb to clarify what cloud order is used for.
Restrict helper classes for internal use
While they might be useful for anyone needing to call #fire...
methods, that alone is fairly unlikely to be necessary.
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
* missing 'alt' attribute added
* missing 'alt' attribute added
* replaced 'new URL' to 'new URI' per Java 11 target codebase
* Revert "replaced 'new URL' to 'new URI' per Java 11 target codebase"
This reverts commit aeef4c1e4b.
* replaced deprecated URL() with URI#.toURL()
* updated code per review
* updated
* updated code
* added back file
* Update core/src/main/java/hudson/cli/InstallPluginCommand.java
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
* Update core/src/main/java/hudson/TcpSlaveAgentListener.java
remove non required as per suggestion
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
* Update core/src/main/java/hudson/model/UpdateSite.java
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
* Update core/src/main/java/hudson/model/UpdateSite.java
* Spotless
---------
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
* Set location for listener
* Add ScriptListener
* Remove debugging statements
* Add listener for CLI
* Add new listener for other sources
* Simplify listener
* Fix whitespace and comments
* Update core/src/main/java/hudson/cli/GroovyCommand.java
Co-authored-by: Wadeck Follonier <Wadeck@users.noreply.github.com>
* Add precise origins; Correctly log CLI input
* Add LoggingGroovySh as suggested by @daniel-beck
* Add ScriptListener Tests
* Add basic default listener that just logs
* WIP Script Listener
* Cleaner ScriptListener API
* Add license
* Cleaner Binding stringification
* Note TODO
* Add Object feature parameters
* Thanks Checkstyle
* Thanks Spotbugs
* Simplify test, make it pass again
* Add since TODO
* No mocking, use CLICommandInvoker for CLI commands
* Minor cleanup
* Fix imports
* So far, #onScriptDefinition would be unused, so remove it
* Checkstyle
* Add test for DefaultScriptListener
* Nicer message for the (hopefully rare) case of anon script execution
* More thoroughly test logging
* Remove obsolete TODO
---------
Co-authored-by: Meiswinkel, Jan SF/HZA-ZC2S <meiswjn@schaeffler.com>
Co-authored-by: Jan Meiswinkel <meiswinkel.jan@googlemail.com>
Co-authored-by: meiswjn <41284403+meiswjn@users.noreply.github.com>
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
Co-authored-by: Wadeck Follonier <Wadeck@users.noreply.github.com>
Co-authored-by: Basil Crow <me@basilcrow.com>
* [JEP-237] disable UsageStats in FIPS mode
UsageStatistics is so close to being FIPS-140 compliant but fails at the
last hurdle.
We can not encrypt with RSA but we can perform key wrap. The output does
separate the key and data, by creating a new Key for encrypting the data
and that key is encrypted with RSA. If only the RSA cipher was created with
Cipher.WRAP_MODE (or Cipher.UNWRAP_MODE) instead of CIPHER.ENCRYPT_MODE (or
CIPHER.DECRYPT_MODE) we would be fine, alas it is not and changing this
would mean a change on the backend and to be able to continue to support
both whilst older versions are in the wild.
The goal of JEP-237 is not to fix all non compliant issues, so here we
just ensure that in FIPS mode the usage statistics are disabled.
Updates the UI in the global config page to adapt to usagestats being fully disabled by system property or partially disabled by the FIPS property
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>