If a job is renamed to a string with trailing whitespace, exceptions are
thrown as the application attempts to rename the job directory in the
file system, and the job can be neither deleted nor renamed again
through the UI. This problem occurs only when renaming a job, and not
when initially creating a job, because job names are trimmed when first
created. This change trims the job name for rename operations as well,
so that the name-setting behavior is consistent across create/update
operations and inadvertent leading/trailing whitespace is removed before
it can cause problems.
* master:
Update the changelog by new merges:
[FIXED JENKINS-30569] HistoryWidget: fix JS syntax error
[FIXED JENKINS-29014] render API link conditional on getApi() presence
[JENKINS-21720] JS alert preventig to leave a configuration page even without formulary changes
add ctags file 'tags' to .gitignore
[maven-release-plugin] prepare release jenkins-1.632
[FIXED JENKINS-29888] Handling all exceptions returned by logRotator
[JENKINS-30742] Fixed possible NPE in AbstractProject.resolveForCLI()
* master: (58 commits)
Changelog: Replace the PR reference by the JIRA issue reference
Noting https://github.com/jenkinsci/jenkins/pull/1818
Noting https://github.com/jenkinsci/jenkins/pull/1804
[JENKINS-30002] Improve Util.isOverridden
Noting #1842
[FIXED JENKINS-30777] this concludes the fix
[JENKINS-30777] also allow slaves to decorate logger
[JENKINS-30777] Generalized the signature to work with Run, not just AbstractBuild.
Diamond operator
[FIXED JENKINS-29876] CheckForNull job in ReverseBuildTrigger
Noting JENKINS-30084 in changelog
[JENKINS-30084] remove extra space
[JENKINS-30084] address feedbacks
[JENKINS-30084] indent back
[JENKINS-30084] fixing test
[JENKINS-30084] fixing test
[JENKINS-30084] enhancing test case
[JENKINS-30084] test added to make sure a flyweight task can be blocked at last minute
[JENKINS-30084] fix regression when flyweight task is blocked by upstream/downstream project
[JENKINS-30084] some more polish
...
For example https://ci.jenkins-ci.org/job/jenkins_main_trunk/4281/testReport/hudson.slaves/CommandLauncherTest/commandSuceedsWithoutChannel/
java.lang.AssertionError:
Expected: a string containing "ERROR: Process terminated with exit code 0"
but: was "… Launching slave agent
$ true
ERROR: Unable to launch the slave agent for dummy
…java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:333)
at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:282)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:365)
at hudson.slaves.CommandLauncher.launch(CommandLauncher.java:130)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:238)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
at hudson.slaves.CommandLauncherTest.commandSuceedsWithoutChannel(CommandLauncherTest.java:67)