I renamed a (maven) project in Jenkins and the new name ended in a whitespace: "name ".
A directory "name" (*without *the trailing whitespace) was created under jenkins jobs directory.
Now the project cannot be deleted because Jenkins fails with the following message:
Trailing char < > at index 51: C:\Program Files (x86)\Jenkins\jobs\aaaaaaaaaaaaaaa _
Exception trace attached.
- is related to
-
JENKINS-19203 New job with whitespace in name fails
-
- Resolved
-
[JENKINS-30502] Unable to delete project with trailing whitespace in name
Description |
Original:
I renamed a (maven) project in Jenkins and the new name ended in a whitespace ("{{name }}"). A directory "{{name}}" (*without *the trailing whitespace) was created under jenkins jobs directory. Now the project cannot be deleted because Jenkins fails with the following message: Trailing char < > at index 51: C:\Program Files (x86)\Jenkins\jobs\aaaaaaaaaaaaaaa _ Exception trace attached. |
New:
I renamed a (maven) project in Jenkins and the new name ended in a whitespace "{{name }}". A directory "{{name}}" (*without *the trailing whitespace) was created under jenkins jobs directory. Now the project cannot be deleted because Jenkins fails with the following message: Trailing char < > at index 51: C:\Program Files (x86)\Jenkins\jobs\aaaaaaaaaaaaaaa _ Exception trace attached. |
Description |
Original:
I renamed a (maven) project in Jenkins and the new name ended in a whitespace "{{name }}". A directory "{{name}}" (*without *the trailing whitespace) was created under jenkins jobs directory. Now the project cannot be deleted because Jenkins fails with the following message: Trailing char < > at index 51: C:\Program Files (x86)\Jenkins\jobs\aaaaaaaaaaaaaaa _ Exception trace attached. |
New:
I renamed a (maven) project in Jenkins and the new name ended in a whitespace: "name ". A directory "{{name}}" (*without *the trailing whitespace) was created under jenkins jobs directory. Now the project cannot be deleted because Jenkins fails with the following message: Trailing char < > at index 51: C:\Program Files (x86)\Jenkins\jobs\aaaaaaaaaaaaaaa _ Exception trace attached. |
Assignee | New: Christopher Simons [ csimons ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: Open [ 1 ] |
Link |
New:
This issue is related to |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
I've verified that once a job is renamed to a string with a trailing space, it can be neither deleted nor renamed again (through the UI). Part of the problem is that the initial rename (to a string with a trailing space) fails to rename the job directory.
This problem occurs only when renaming a job, and not when initially creating a job, because job names are trimmed when first created. It seems a sensible solution would be simply to trim the given job 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.
Fixed in PR #1855.