When an empty Freestyle job config gets submitted in the default configuration of Jenkins 2.35, the data is being saved to the disk *8 times*. All of them happen in this code: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Job.java#L1227-L1246
* setDisplayName
* Project#getBuildWrappersList().rebuild (onModified handler)
* Project#getBuilderList().rebuild (onModified handler)
* Project#getPublisherList().rebuild (onModified handler)
* AbstractProject#makeDisabled
* AbstractProject#setScm
* AbstractProject#triggers.replaceBy
* final save()
There is not so much sense to save partial configurations to the disk due to the risk of data inconsistency there. This change just wraps the config submission section of the job into the BulkChange clause.
* [JENKINS-32797] Break the catch clause contents of Jenkins.getTarget() out into a separate, publicly accessible function.
This will allow plugins (particularly authentication plugins that override the normal authentication process) to determine if authentication is not required for a particular path by calling isPathUnprotected(restOfPath).
* Add @since TODO to comment
* Change name of function to something that is accurate and clear
isPathUnprotected is misleading, and the Javadoc was worse. isSubjectToMandatoryReadPermissionCheck is a much better name, and the return value is reversed to match the name,
* [JENKINS-38903] Split Exception handling for node provision and adding to Jenkins
* Defined new static helper methods that ensure exceptions are not propagated
* Added onCommit and onRollback signals to CloudProvisioningListener
Added the new signals to be able to notify the state after Jenkins.addNode(Node)
All Listener's calls moved to an exception-tolerant static helpers
* Added @Nonnull annotation
Changed the method signature CloudProvisioningListener.onRollback()
* Re-throw Error in the fireOnXXX()
Removed re-thrown Throwable in the main try/catch block
(an instance of the Error is handled separately)
* Handling of Error changed
* Fixed Error instance handling in NodeProvisioner.fireOnFailure()
* [FIX JENKINS-40053]: Use english as default-locale, so the ResourceBundleUtilTest runs also on systems with other default os locales.
* [FIX JENKINS-40053]: Cleanup Locale after test to avoid impact on other tests.
* [FIX JENKINS-40053]: Use english as default-locale only in the required test method.
* [FIX JENKINS-40053]: Cleanup unused imports.
* [FIX JENKINS-36044]: Added default locale to XMLUtilsTest so that it runs independent from the host OS locale.
* [FIX JENKINS-36044]: Cleanup default-locale after test, to avoid impact to other tests.
* [FIX JENKINS-36044]: Make test language indepedent.
* [FIX JENKINS-36044]: Cleanup unused imports.
* Converted to JenkinsRule.
* Improved messages from Node.canTake.
* [FIXED JENKINS-38514] BuildableItem needs to retain information from JobOffer about why it is neither blocked nor building.
* Converted to JenkinsRule.
* Found an existing usage of BecauseNodeIsNotAcceptingTasks.
* Original JENKINS-6598 test was checking behavior we want amended by JENKINS-38514.
* Ensure that a BuildableItem which is simply waiting for a free executor reports that as its CauseOfBlockage.
* Review comments from @oleg-nenashev.
UserProperty may contain nested objects that depend on User.
On User reconfiguration setUser(User) is called so it should be non-final to have ability override it and update references in nested objects.
Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
* [JENKINS-23271] - Process statuses of Remote process join() operations directly inside methods
* [JENKINS-23271] - Also prevent the issue when the kill() command is the last call in the usage sequence
* Allows customization in seconds, not minutes
* Allows customization of the ping timeout (before, you could set a
custom interval, but the timeout would always be PingThread's 4
minute default)
This also drops the serialVersionUID from ChannelPinger.SetUpRemotePing;
without one provided, the JVM will generate one on demand which is
sufficient for the purposes here since these are never persisted and
master & slave run the same compiled code. (And it demonstrably works
since countless other MasterToSlaveCallables fail to specify their own
custom IDs)
* Optimize Actionable.getAllActions.
* Also need to invalidate the cache when new plugins are installed.
* Various improvements to TransientActionFactory caching.
· Move the cache code to TransientActionFactory itself, for better encapsulation.
· Optimize getAction(Class) to not need to call getAllActions; avoids copying lists, and can avoid calling TransientActionFactory at all.
· Ensure that we maintain a separate cache per ExtensionList instance, so that static state is not leaked across Jenkins restarts.
* Updated TransientActionFactory to specify what kinds of actions it could produce.
* It turns out that changing type parameters for an extension, while generally binary-compatible, breaks reflective code in Jenkins and so this is not an option.
… hudson.ExtensionFinder$GuiceFinder$SezpozModule configure
WARNING: Failed to load com.cloudbees.hudson.plugins.folder.relocate.RelocationAction$TransientActionFactoryImpl
java.lang.LinkageError: Failed to resolve class com.cloudbees.hudson.plugins.folder.relocate.RelocationAction$TransientActionFactoryImpl
at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:489)
at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:506)
at …
at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:280)
at …
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:472)
at hudson.ExtensionList.load(ExtensionList.java:349)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:287)
at hudson.ExtensionList.getComponents(ExtensionList.java:167)
at jenkins.model.Jenkins$8.onInitMilestoneAttained(Jenkins.java:1082)
at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:82)
at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:104)
at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:176)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.MalformedParameterizedTypeException
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:58)
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:51)
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:92)
at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:90)
at java.lang.Class.getGenericSuperclass(Class.java:777)
at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:470)
... 29 more
* Remove actionType override to make for a simpler diff.
* Strengthened test to cover accesses to unrelated context types.
* Strengthening tests in a couple of ways.
* Javadoc improvements suggested by @oleg-nenashev.