|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

We've finally resolved the issue. TL;DR: Include a value in the 'name' node when POSTing config.xml to update a job. Not including it when creating the job will work just fine.
Here's what was happening:
We weren't setting a value for the 'name' node in the config.xml on initial job creation or job update. The job name is passed in via a GET parameter on job creation, and presumably Jenkins uses that parameter to set the name of the job (make sense). However, when updating the config.xml for a job, the absence of the 'name' node value in the config.xml caused Jenkins to rename the job to 'jobs'.
We have quite a few jobs and so the job being silently renamed was not noticed. When we rebooted Jenkins, we noticed that the renamed jobs magically appeared. I started following some discussions about job configs not being loaded back into memory without issuing a 'reload' command. Sure enough, issuing the reload command 'restored' (or so we thought at the time) the job's config in memory. (What appears really to have been happening is that Jenkins was silently autocorrecting the job names based the directory name and ignoring the blank 'name' node in the job's config.xml.)
We did a clean install of Jenkins without all the existing jobs and POSTed an update to a job config.xml directly in cURL and were finally able to notice that Jenkins was actually renaming the job to 'jobs.' That put us on to the trail of troubleshooting the 'name' node and on a hunch we included a value even though creating a job worked fine in its absence. And the update worked just fine.
So this is not a bug per se with Jenkins but IMO the error checking could definitely be improved upon. IMO POSTing an updated config.xml should throw an error if the 'name' node doesn't exist OR if the 'name' node doesn't match the actual path to the config.xml being POSTed to. And renaming the job to 'jobs' kind of came out of left field (not sure WTF that is about).