Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-25263

Multi Config Project broken "Custom Workspace"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • matrix-project-plugin
    • None
    • Linux Fedora 17 64 bit

      Ive just created a new master using my original master config (Jenkins 1.569)

      Updated all plugins and core to latest

      Since the update All Matrix children jobs go to a stupid custom workspace (i use custom workspace for everything).

      The directory it created is {"directory":["workspace

      When i select custom workspace it says "Custom workspace is empty".

      I type in workspace/$BUILD_LOCATION in the text field. (BUILD_LOCATION is a string parameter defined at top of project) (the way i do it for ALL jobs, only matrix broken)

      I save project.

      Then go back into config and this appears in the custom workspace field:-

      {"directory":["workspace/$BUILD_LOCATION","."]}

      LOG OUTPUT:-

      Started by upstream project "D714_SCM_Trigger_Build" build number 3
      originally caused by:
      Started by upstream project "D714_SCM_Poll_MultiBranch/BRANCH_BUILDING=Tungsten,SLAVES=master" build number 9
      originally caused by:
      Started by upstream project "D714_SCM_Poll_MultiBranch" build number 9
      originally caused by:
      Started by timer
      [EnvInject] - Loading node environment variables.
      [EnvInject] - Preparing an environment for the build.
      [EnvInject] - Keeping Jenkins system variables.
      [EnvInject] - Keeping Jenkins build variables.
      [EnvInject] - Executing and processing the following script content:
      BUILD_TYPES=${BUILD_TYPES//,/ }

      echo "BUILD_TYPES="$BUILD_TYPES> BuildTypes.txt

      [jenkins_SQA] $ /bin/sh -xe /tmp/hudson7007298475308209409.sh
      + BUILD_TYPES='DEBUG_INITRAMFS DEBUG_NFS DEBUG_INITRAMFS_CAD_B'
      + echo BUILD_TYPES=DEBUG_INITRAMFS DEBUG_NFS DEBUG_INITRAMFS_CAD_B
      [EnvInject] - Script executed successfully.
      [EnvInject] - Injecting as environment variables the properties file path 'BuildTypes.txt'
      [EnvInject] - Variables injected successfully.
      [EnvInject] - Injecting contributions.
      Building remotely on Saltaire_Pebsy_002_OxygenAPI_001 (compile_Linux Oxygen_API GCOV) in workspace /home/autobuildSA2/data_local/jenkins_SQA/

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

      Triggering D714_SCM_Trigger_Build_Matrix » DEBUG_INITRAMFS,Saltaire_Pebsy_002_OxygenAPI_001
      Triggering D714_SCM_Trigger_Build_Matrix » DEBUG_INITRAMFS_CAD_B,Saltaire_Pebsy_002_OxygenAPI_001
      Triggering D714_SCM_Trigger_Build_Matrix » DEBUG_NFS,Saltaire_Pebsy_002_OxygenAPI_001
      D714_SCM_Trigger_Build_Matrix » DEBUG_INITRAMFS,Saltaire_Pebsy_002_OxygenAPI_001 completed with result FAILURE
      D714_SCM_Trigger_Build_Matrix » DEBUG_INITRAMFS_CAD_B,Saltaire_Pebsy_002_OxygenAPI_001 completed with result FAILURE
      D714_SCM_Trigger_Build_Matrix » DEBUG_NFS,Saltaire_Pebsy_002_OxygenAPI_001 completed with result FAILURE
      Collecting metadata...
      Metadata collection done.
      Finished: FAILURE

      Many thanks for the help.

      Siôn J.E O'Connor

          [JENKINS-25263] Multi Config Project broken "Custom Workspace"

          Dana Goyette added a comment -

          After setting custom workspace to "/parent/here" and child workspace to "/child/here", a few cycles of reloading the page and then hitting Apply (with no other changes) results in the following value for "Directory" and "Directory for sub-builds", respectively:

          {"directory":["{\"directory\":[\"

          {\\\"directory\\\":[\\\"/parent/here\\\",\\\"/child/here\\\"]}

          \",\"/child/here\"]}","/child/here"]}

          /child/here

          I've had a job become completely un-editable due to this bug.
          Attempting to save the job gave "Form Too Large", and clicking "Advanced" did not expose the text box.
          The job only became editable after deleting the workspace definition in the job's config.xml, and restarting the server.

          In my broken case, the field had turned into 28 kilobytes of the following:
          {"directory":["{\"directory\":[\"{\\\"directory\\\":[\\\"{\\\\\\\"directory\\\\\\\":[\\\\\\\"{\\\\\\\\\\\\\\\"directory\\\\\\\\\\\\\\\":[\\\\\\\\\\\\\\\"{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"directory\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": ...

          Dana Goyette added a comment - After setting custom workspace to "/parent/here" and child workspace to "/child/here", a few cycles of reloading the page and then hitting Apply (with no other changes) results in the following value for "Directory" and "Directory for sub-builds", respectively: {"directory":["{\"directory\":[\" {\\\"directory\\\":[\\\"/parent/here\\\",\\\"/child/here\\\"]} \",\"/child/here\"]}","/child/here"]} /child/here I've had a job become completely un-editable due to this bug. Attempting to save the job gave "Form Too Large", and clicking "Advanced" did not expose the text box. The job only became editable after deleting the workspace definition in the job's config.xml, and restarting the server. In my broken case, the field had turned into 28 kilobytes of the following: {"directory":["{\"directory\":[\"{\\\"directory\\\":[\\\"{\\\\\\\"directory\\\\\\\":[\\\\\\\"{\\\\\\\\\\\\\\\"directory\\\\\\\\\\\\\\\":[\\\\\\\\\\\\\\\"{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"directory\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": ...

          same here
          job execution can only be achieved if I change the config.xml manually and restart jenkins.

          Please fix this issue!

          Florian Lobmaier added a comment - same here job execution can only be achieved if I change the config.xml manually and restart jenkins. Please fix this issue!

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          src/main/java/org/jenkinsci/plugins/workflow/cps/CpsBodyExecution.java
          src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java
          src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThread.java
          src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
          http://jenkins-ci.org/commit/workflow-cps-plugin/a2849c9b9abc6e547a686fb298e69a4212197dee
          Log:
          JENKINS-25263

          CpsBodyExecution.cancel() and CpsFlowExecution.interrupt() should work
          even when a thread is not suspended due to StepExecution, but when it's
          just paused briefly by safepoints.

          This code also consolidates the handling of the logic into
          CpsThread.stop().

          Note that this change still doesn't address the case when a CPS thread
          is executing for too long inside a non-CPS method. Say
          Thread.sleep(10000), blocking on a monitor, or while(true) {} inside a
          Java method that Pipeline Script invoked.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: src/main/java/org/jenkinsci/plugins/workflow/cps/CpsBodyExecution.java src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThread.java src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java http://jenkins-ci.org/commit/workflow-cps-plugin/a2849c9b9abc6e547a686fb298e69a4212197dee Log: JENKINS-25263 CpsBodyExecution.cancel() and CpsFlowExecution.interrupt() should work even when a thread is not suspended due to StepExecution, but when it's just paused briefly by safepoints. This code also consolidates the handling of the logic into CpsThread.stop(). Note that this change still doesn't address the case when a CPS thread is executing for too long inside a non-CPS method. Say Thread.sleep(10000), blocking on a monitor, or while(true) {} inside a Java method that Pipeline Script invoked.

            kohsuke Kohsuke Kawaguchi
            sion_oc Sion O'Connor
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: