The content of the "custom workspace" changes when job configuration is saved or new job is created:

      For example:

      /ci/test

      changes to

      {"directory":["/ci/test",""]}

          [JENKINS-25221] Content of "Custom Workspace" changes in v1.585

          This makes builds that are dependent on the custom workspace fail, since the directory is invalid. So far have not found a workaround.

          Sagar Khushalani added a comment - This makes builds that are dependent on the custom workspace fail, since the directory is invalid. So far have not found a workaround.

          Daniel Beck added a comment -

          How can this be reproduced? I set a workspace on 1.584, upgraded to 1.585, looked at the project: OK. Saved the config, looked at it again: Still OK.

          Daniel Beck added a comment - How can this be reproduced? I set a workspace on 1.584, upgraded to 1.585, looked at the project: OK. Saved the config, looked at it again: Still OK.

          Two ways to reproduce this (tried both):

          1) Upgrade from 1.584 to 1.585.
          ====
          2) Create a new job, add a custom workspace directory path
          3) Save job, and then edit job configuration again - notice value of custom workspace field has changed
          ==== OR ====
          2) edit existing job, and add custom workspace directory path
          3) Save job, and then edit job configuration again - notice value of custom workspace field has changed

          Sagar Khushalani added a comment - Two ways to reproduce this (tried both): 1) Upgrade from 1.584 to 1.585. ==== 2) Create a new job, add a custom workspace directory path 3) Save job, and then edit job configuration again - notice value of custom workspace field has changed ==== OR ==== 2) edit existing job, and add custom workspace directory path 3) Save job, and then edit job configuration again - notice value of custom workspace field has changed

          Daniel Beck added a comment -

          What web browser? What happens if you use a different browser? What kind of job (e.g. Freestyle, Maven, Multi-config, ...)?

          Daniel Beck added a comment - What web browser? What happens if you use a different browser? What kind of job (e.g. Freestyle, Maven, Multi-config, ...)?

          Sagar Khushalani added a comment - - edited

          It was a multiconfig job.
          => Internet Explorer. Unfortunately, I cannot try with another at work (not allowed).

          Sagar Khushalani added a comment - - edited It was a multiconfig job. => Internet Explorer. Unfortunately, I cannot try with another at work (not allowed).

          Daniel Beck added a comment -

          Which version of IE?

          Daniel Beck added a comment - Which version of IE?

          Daniel Beck added a comment -

          Cannot reproduce on IE 11.

          Daniel Beck added a comment - Cannot reproduce on IE 11.

          Daniel Beck added a comment -

          Or on IE 9 for that matter. Resolving as Cannot Reproduce until more specific steps to reproduce can be determined.

          Please note that older versions of IE are not supported by Jenkins:
          https://wiki.jenkins-ci.org/display/JENKINS/Browser+Compatibility+Matrix

          Daniel Beck added a comment - Or on IE 9 for that matter. Resolving as Cannot Reproduce until more specific steps to reproduce can be determined. Please note that older versions of IE are not supported by Jenkins: https://wiki.jenkins-ci.org/display/JENKINS/Browser+Compatibility+Matrix

          Was using IE 9. I'll recheck with another browser at home and see if I have the same issue.

          Sagar Khushalani added a comment - Was using IE 9. I'll recheck with another browser at home and see if I have the same issue.

          Matthew Moore added a comment -

          How did you upgrade?

          FWIW, I just took a JENKINS_HOME that had been originally initialized by 1.584.

          Relaunched Jenkins with 1.585 (java -jar jenkins.war)

          Created a new job with a custom workspace "/mytest".

          Saved, and re-opened the config and the custom workspace is "/mytest".

          Matthew Moore added a comment - How did you upgrade? FWIW, I just took a JENKINS_HOME that had been originally initialized by 1.584. Relaunched Jenkins with 1.585 (java -jar jenkins.war) Created a new job with a custom workspace "/mytest". Saved, and re-opened the config and the custom workspace is "/mytest".

          Matthew Moore added a comment -

          Also, what type of projects are you testing with? I used Freestyle above.

          Matthew Moore added a comment - Also, what type of projects are you testing with? I used Freestyle above.

          Dave Miller added a comment -

          I'm also seeing this issue. In my "MultiJob" projects where I've got a custom workspace set, the custom workspace has been changed. I edit the custom workspace to what it should be, save it, exit the configuration page and then go back into it, and the custom workspace gets changed again to the garbage that causes it to fail. In projects that are not "MultiJob", the custom workspace hasn't been changed and those jobs don't fail. This issue started occurring after 10/18 because late that evening I was able to successfully run a MultiJob with a custom workspace and it didn't fail.

          I'm new to this forum, so I hope I've posted this in the proper location and that it gets addressed by the right people.

          Dave Miller added a comment - I'm also seeing this issue. In my "MultiJob" projects where I've got a custom workspace set, the custom workspace has been changed. I edit the custom workspace to what it should be, save it, exit the configuration page and then go back into it, and the custom workspace gets changed again to the garbage that causes it to fail. In projects that are not "MultiJob", the custom workspace hasn't been changed and those jobs don't fail. This issue started occurring after 10/18 because late that evening I was able to successfully run a MultiJob with a custom workspace and it didn't fail. I'm new to this forum, so I hope I've posted this in the proper location and that it gets addressed by the right people.

          Matthew Moore added a comment -

          This is definitely a bad interaction with my change (https://github.com/jenkinsci/jenkins/pull/1414) and MultiJob:
          https://github.com/jenkinsci/tikal-multijob-plugin/blob/master/src/main/resources/com/tikal/jenkins/plugins/multijob/MultiJobProject/configure-advanced.jelly#L5

          The problem is that MultiJob is not using the Jelly tag "<p:config-customWorkspace />", rather it has copied the logic directly from the tag (maybe it predates the tag?), this is how FreeStyleProject pulls in this change:
          https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/model/FreeStyleProject/configure-advanced.jelly#L30

          Thanks for clarifying that this is MultiJob, are people seeing this affecting any other job types?

          Matthew Moore added a comment - This is definitely a bad interaction with my change ( https://github.com/jenkinsci/jenkins/pull/1414 ) and MultiJob: https://github.com/jenkinsci/tikal-multijob-plugin/blob/master/src/main/resources/com/tikal/jenkins/plugins/multijob/MultiJobProject/configure-advanced.jelly#L5 The problem is that MultiJob is not using the Jelly tag "<p:config-customWorkspace />", rather it has copied the logic directly from the tag (maybe it predates the tag?), this is how FreeStyleProject pulls in this change: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/model/FreeStyleProject/configure-advanced.jelly#L30 Thanks for clarifying that this is MultiJob, are people seeing this affecting any other job types?

          Corrected my comment. Sorry about that. I just retried with two different jobs - freestyle and multiconfig; the job type with the problem was the multiconfig, not freestyle.

          Sagar Khushalani added a comment - Corrected my comment. Sorry about that. I just retried with two different jobs - freestyle and multiconfig; the job type with the problem was the multiconfig, not freestyle.

          Matthew Moore added a comment -

          Ok I see a similar problem in the MatrixProject code.

          Matrix is slightly different since it isn't just a straight copy of what the tag has, but I am trying to put together PR's for those now.

          Please LMK if anyone sees any other affected projects besides: Multi-Configuration (Matrix) or MultiJob.

          thanks,
          -M

          Matthew Moore added a comment - Ok I see a similar problem in the MatrixProject code. Matrix is slightly different since it isn't just a straight copy of what the tag has, but I am trying to put together PR's for those now. Please LMK if anyone sees any other affected projects besides: Multi-Configuration (Matrix) or MultiJob. thanks, -M

          Matthew Moore added a comment -

          Matthew Moore added a comment - FYI... MultiJob PR: https://github.com/jenkinsci/tikal-multijob-plugin/pull/55 MatrixProject PR: https://github.com/jenkinsci/matrix-project-plugin/pull/8

          Oleg Nenashev added a comment -

          Reopened the issue.
          Do you expect an impect on other Project types?
          If yes, do we need to revert changes?

          Oleg Nenashev added a comment - Reopened the issue. Do you expect an impect on other Project types? If yes, do we need to revert changes?

          Sion O'Connor added a comment - - edited

          sorry i created JENKINS-25263 yesterday that is a duplicate of this.

          This is a major blocker for me.

          Many thanks

          Siôn

          Multi Job only.

          Chrome Version 38.0.2125.104 m

          Went from Jenkins 1.569 to 1.585

          Reproduce ability 100%

          Steps.

          1. Create a new multi Config project
          2. Tick "This build is parameterized"
          3. Add "String Parameter" called "BUILD_LOCATION" - default set to "TEST"
          4. Restricted to one of my Linux Slaves (all Fedora 17 64Bit)
          5. Custom Workspace set to "workspace/$BUILD_LOCATION"
          6. Build step - Execute Shell - echo $BUILD_LOCATION $WORKSPACE
          7. Save
          8. Run

          Output Parent :-

          Started by user Sion OConnor
          [EnvInject] - Loading node environment variables.
          Building remotely on Saltaire_Pebsy_001_Prebuilds_001 (compile_Linux compile_prebuilt GCOV prebuild_SALTAIRE) in workspace /home/autobuildSA1/data_local/jenkins_SQA/{"directory":["

          {/"directory/":[/"workspace/SION_TEST_1/",/"./"]}

          ","."]}
          Triggering TEST_JBUGS1_CustomWorkspaceMatrix » default
          TEST_JBUGS1_CustomWorkspaceMatrix » default completed with result SUCCESS
          Collecting metadata...
          Metadata collection done.
          Finished: SUCCESS

          Output Child:-

          Started by upstream project "TEST_JBUGS1_CustomWorkspaceMatrix" build number 1
          originally caused by:
          Started by user Sion OConnor
          [EnvInject] - Loading node environment variables.
          Building remotely on Saltaire_Pebsy_001_Prebuilds_001 (compile_Linux compile_prebuilt GCOV prebuild_SALTAIRE) in workspace /home/autobuildSA1/data_local/jenkins_SQA/{"directory":["

          {/"directory/":[/"workspace/SION_TEST_1/",/"./"]}

          ","."]}
          ["]}","."]}] $ /bin/sh -xe /tmp/hudson7805373812462113348.sh
          + echo SION_TEST_1
          SION_TEST_1
          + echo '/home/autobuildSA1/data_local/jenkins_SQA/{"directory":["

          {/"directory/":[/"workspace/SION_TEST_1/",/"./"]}

          ","."]}'
          /home/autobuildSA1/data_local/jenkins_SQA/{"directory":["

          {/"directory/":[/"workspace/SION_TEST_1/",/"./"]}

          ","."]}
          Collecting metadata...
          Metadata collection done.
          Finished: SUCCESS

          Thanks

          Siôn O'Connor

          Sion O'Connor added a comment - - edited sorry i created JENKINS-25263 yesterday that is a duplicate of this. This is a major blocker for me. Many thanks Siôn Multi Job only. Chrome Version 38.0.2125.104 m Went from Jenkins 1.569 to 1.585 Reproduce ability 100% Steps. 1. Create a new multi Config project 2. Tick "This build is parameterized" 3. Add "String Parameter" called "BUILD_LOCATION" - default set to "TEST" 4. Restricted to one of my Linux Slaves (all Fedora 17 64Bit) 5. Custom Workspace set to "workspace/$BUILD_LOCATION" 6. Build step - Execute Shell - echo $BUILD_LOCATION $WORKSPACE 7. Save 8. Run Output Parent :- Started by user Sion OConnor [EnvInject] - Loading node environment variables. Building remotely on Saltaire_Pebsy_001_Prebuilds_001 (compile_Linux compile_prebuilt GCOV prebuild_SALTAIRE) in workspace /home/autobuildSA1/data_local/jenkins_SQA/{"directory":[" {/"directory/":[/"workspace/SION_TEST_1/",/"./"]} ","."]} Triggering TEST_JBUGS1_CustomWorkspaceMatrix » default TEST_JBUGS1_CustomWorkspaceMatrix » default completed with result SUCCESS Collecting metadata... Metadata collection done. Finished: SUCCESS Output Child:- Started by upstream project "TEST_JBUGS1_CustomWorkspaceMatrix" build number 1 originally caused by: Started by user Sion OConnor [EnvInject] - Loading node environment variables. Building remotely on Saltaire_Pebsy_001_Prebuilds_001 (compile_Linux compile_prebuilt GCOV prebuild_SALTAIRE) in workspace /home/autobuildSA1/data_local/jenkins_SQA/{"directory":[" {/"directory/":[/"workspace/SION_TEST_1/",/"./"]} ","."]} ["] }","."]}] $ /bin/sh -xe /tmp/hudson7805373812462113348.sh + echo SION_TEST_1 SION_TEST_1 + echo '/home/autobuildSA1/data_local/jenkins_SQA/{"directory":[" {/"directory/":[/"workspace/SION_TEST_1/",/"./"]} ","."]}' /home/autobuildSA1/data_local/jenkins_SQA/{"directory":[" {/"directory/":[/"workspace/SION_TEST_1/",/"./"]} ","."]} Collecting metadata... Metadata collection done. Finished: SUCCESS Thanks Siôn O'Connor

          Clement Vidal added a comment -

          The same problem also happen on Chrome 36.
          Rolling back to 1.584 solve the problem.

          Clement Vidal added a comment - The same problem also happen on Chrome 36. Rolling back to 1.584 solve the problem.

          Matthew Moore added a comment -

          Oleg, I did a search for "customWorkspace.directory": https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=site%3Ahttps%3A%2F%2Fgithub.com%2Fjenkinsci%20%22customWorkspace.directory%22

          It looks like this plugin is also affected, so I will put together another PR:
          https://github.com/jenkinsci/jobgenerator-plugin

          However, I CAN be sure this is NOT exhaustive, since for whatever reason this didn't find the MatrixProject problem.

          If you know a better way of scanning all the plugins for "customWorkspace.directory", please LMK?

          Matthew Moore added a comment - Oleg, I did a search for "customWorkspace.directory": https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=site%3Ahttps%3A%2F%2Fgithub.com%2Fjenkinsci%20%22customWorkspace.directory%22 It looks like this plugin is also affected, so I will put together another PR: https://github.com/jenkinsci/jobgenerator-plugin However, I CAN be sure this is NOT exhaustive, since for whatever reason this didn't find the MatrixProject problem. If you know a better way of scanning all the plugins for "customWorkspace.directory", please LMK?

          Matthew Moore added a comment -

          Matthew Moore added a comment - https://github.com/jenkinsci/jobgenerator-plugin/pull/1

          Matthew Moore added a comment -

          FYI, for those people rolling back their Jenkins version, you might consider 1.580, which was chosen to be the basis for the next LTS release line.

          Matthew Moore added a comment - FYI, for those people rolling back their Jenkins version, you might consider 1.580, which was chosen to be the basis for the next LTS release line.

          Daniel Beck added a comment -

          FYI, for those people rolling back their Jenkins version, you might consider 1.580, which was chosen to be the basis for the next LTS release line.

          Uh, yeah, the basis. With several fixes applied, plus all the security fixes from 1.583.


          The Jenkins changelog contains a community rating feature. Click 'Community ratings' link, and you'll see how others like a release, and what issues they experience, and can leave your own rating. This may help selecting a version to up/downgrade to. (I'd probably go with 1.584 instead, based on that feedback and skimming over the code changes)

          Daniel Beck added a comment - FYI, for those people rolling back their Jenkins version, you might consider 1.580, which was chosen to be the basis for the next LTS release line. Uh, yeah, the basis. With several fixes applied , plus all the security fixes from 1.583. The Jenkins changelog contains a community rating feature. Click 'Community ratings' link, and you'll see how others like a release, and what issues they experience, and can leave your own rating. This may help selecting a version to up/downgrade to. (I'd probably go with 1.584 instead, based on that feedback and skimming over the code changes)

          Goffredo Marocchi added a comment - - edited

          This is a major blocker for me too... incredibly annoying bug .

          Goffredo Marocchi added a comment - - edited This is a major blocker for me too... incredibly annoying bug .

          Sion O'Connor added a comment - - edited

          Aye,

          Ive gone back to 1.584 and all looking ok now - you just need to go through all jobs and reset the custom workspace - really annoying if you got loads of jobs, but you can grep/sed through config xmls and then reload from disk.

          Siôn

          Sion O'Connor added a comment - - edited Aye, Ive gone back to 1.584 and all looking ok now - you just need to go through all jobs and reset the custom workspace - really annoying if you got loads of jobs, but you can grep/sed through config xmls and then reload from disk. Siôn

          Matthew Moore added a comment -

          FYI, this should only affect jobs that you have explicitly saved since the core upgrade, as it only affects round-tripping through the Web Interface.

          Please LMK if that isn't consistent with what you are seeing.

          Matthew Moore added a comment - FYI, this should only affect jobs that you have explicitly saved since the core upgrade, as it only affects round-tripping through the Web Interface. Please LMK if that isn't consistent with what you are seeing.

          I've also observed this problem on Debian 7.7 with versions v.1585 and v.1586.
          No problem with v.1584.

          For me the problem is easily reproducible:

          • Create a multi-configuration project
          • Set "Use custom workspace" in Advanced Project Options (I've used "xxx" for testing)
          • Save the project
          • If you reopen the project configuration and look at the custom workspace setting it contains ' {"directory":["xxx",""]}

            '

          Bernhard Miklautz added a comment - I've also observed this problem on Debian 7.7 with versions v.1585 and v.1586. No problem with v.1584. For me the problem is easily reproducible: Create a multi-configuration project Set "Use custom workspace" in Advanced Project Options (I've used "xxx" for testing) Save the project If you reopen the project configuration and look at the custom workspace setting it contains ' {"directory":["xxx",""]} '

          Matthew Moore added a comment -

          FYI, I have relaxed my prior change that caused this: https://github.com/jenkinsci/jenkins/pull/1446

          I tested this locally with MatrixProject, and confirmed I get the proper value for custom workspace.

          Matthew Moore added a comment - FYI, I have relaxed my prior change that caused this: https://github.com/jenkinsci/jenkins/pull/1446 I tested this locally with MatrixProject, and confirmed I get the proper value for custom workspace.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/3880e00190a7432ad6aa53186fdb62154d3218a0
          Log:
          [FIXED JENKINS-25221] Noting merge of #1446.

          Compare: https://github.com/jenkinsci/jenkins/compare/86ea65ab6fe7...3880e00190a7

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html http://jenkins-ci.org/commit/jenkins/3880e00190a7432ad6aa53186fdb62154d3218a0 Log: [FIXED JENKINS-25221] Noting merge of #1446. Compare: https://github.com/jenkinsci/jenkins/compare/86ea65ab6fe7...3880e00190a7

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3785
          [FIXED JENKINS-25221] Noting merge of #1446. (Revision 3880e00190a7432ad6aa53186fdb62154d3218a0)

          Result = SUCCESS
          jesse glick : 3880e00190a7432ad6aa53186fdb62154d3218a0
          Files :

          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #3785 [FIXED JENKINS-25221] Noting merge of #1446. (Revision 3880e00190a7432ad6aa53186fdb62154d3218a0) Result = SUCCESS jesse glick : 3880e00190a7432ad6aa53186fdb62154d3218a0 Files : changelog.html

          Moshe Zvi added a comment -

          I'm on 1.588, and in a Maven project I don't see the custom workspace option at all...

          Moshe Zvi added a comment - I'm on 1.588, and in a Maven project I don't see the custom workspace option at all...

            mattmoor Matthew Moore
            skhushalani Sagar Khushalani
            Votes:
            5 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: