• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • pipeline
    • None

      Steps to reproduce it:

      1. Create a WF job with some dummy script
      2. Run a build (or two)
      3. Rename the job
      4. Restart Jenkins
      5. You have unreadable data warnings in "Manage Jenkins"

      The root cause is in build.xml files, where the job name is not properly changed in the rename process:

      ...
      <owner class="flow-owner">
          <job>test2</job>
          <id>2015-07-22_13-25-38</id>
      </owner>
      ...
      

      Behavior checked using Jenkins 1.580.2 + Workflow 1.4 and 1.609.1 + Workflow 1.8

          [JENKINS-29571] Unreadable data after renaming a Workflow job

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowRunTest.java
          http://jenkins-ci.org/commit/workflow-plugin/9d087ca7fcb3e6f186d3f44f289bae8861dedad7
          Log:
          JENKINS-29571 reproduced in test and confirmed to depend on part of JENKINS-27704.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowRunTest.java http://jenkins-ci.org/commit/workflow-plugin/9d087ca7fcb3e6f186d3f44f289bae8861dedad7 Log: JENKINS-29571 reproduced in test and confirmed to depend on part of JENKINS-27704 .

          Code changed in jenkins
          User: Jesse Glick
          Path:
          CHANGES.md
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowRunTest.java
          api/src/main/java/org/jenkinsci/plugins/workflow/flow/FlowExecution.java
          cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java
          cps/src/test/java/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition2Test.java
          job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
          http://jenkins-ci.org/commit/workflow-plugin/b7014e66b8b064794efea6c78f35160c5250cc2e
          Log:
          [FIXED JENKINS-29571] Make CpsFlowExecution.owner transient (JENKINS-27704) to avoid problems after renames/moves.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: CHANGES.md aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowRunTest.java api/src/main/java/org/jenkinsci/plugins/workflow/flow/FlowExecution.java cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java cps/src/test/java/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition2Test.java job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java http://jenkins-ci.org/commit/workflow-plugin/b7014e66b8b064794efea6c78f35160c5250cc2e Log: [FIXED JENKINS-29571] Make CpsFlowExecution.owner transient ( JENKINS-27704 ) to avoid problems after renames/moves.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          CHANGES.md
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowRunTest.java
          api/src/main/java/org/jenkinsci/plugins/workflow/flow/FlowExecution.java
          cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java
          cps/src/test/java/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition2Test.java
          job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
          http://jenkins-ci.org/commit/workflow-plugin/a007b88c1fe653ac9fb900bf41bfbeffd9808d8c
          Log:
          Merge pull request #157 from jglick/rename-JENKINS-29571

          JENKINS-29571 Handle build records after rename

          Compare: https://github.com/jenkinsci/workflow-plugin/compare/06d82c91d88f...a007b88c1fe6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: CHANGES.md aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowRunTest.java api/src/main/java/org/jenkinsci/plugins/workflow/flow/FlowExecution.java cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java cps/src/test/java/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition2Test.java job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java http://jenkins-ci.org/commit/workflow-plugin/a007b88c1fe653ac9fb900bf41bfbeffd9808d8c Log: Merge pull request #157 from jglick/rename- JENKINS-29571 JENKINS-29571 Handle build records after rename Compare: https://github.com/jenkinsci/workflow-plugin/compare/06d82c91d88f...a007b88c1fe6

          Code changed in jenkins
          User: Jesse Glick
          Path:
          job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
          http://jenkins-ci.org/commit/workflow-plugin/fc3851f4df8881e24c079cf51f42b48ec9596ab9
          Log:
          The fix of JENKINS-27531 in #97 seems to be made simpler by the fix of JENKINS-29571 via JENKINS-27704 in #157.
          We only needed getId(WorkflowRun) because CpsFlowExecution.unmarshal was trying to use an Owner.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java http://jenkins-ci.org/commit/workflow-plugin/fc3851f4df8881e24c079cf51f42b48ec9596ab9 Log: The fix of JENKINS-27531 in #97 seems to be made simpler by the fix of JENKINS-29571 via JENKINS-27704 in #157. We only needed getId(WorkflowRun) because CpsFlowExecution.unmarshal was trying to use an Owner.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          api/src/main/java/org/jenkinsci/plugins/workflow/flow/FlowExecution.java
          http://jenkins-ci.org/commit/workflow-api-plugin/e26d0b7daa2cccae76ca7494e8fe35a8b31604dd
          Log:
          [FIXED JENKINS-29571] Make CpsFlowExecution.owner transient (JENKINS-27704) to avoid problems after renames/moves.
          Originally-Committed-As: b7014e66b8b064794efea6c78f35160c5250cc2e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: api/src/main/java/org/jenkinsci/plugins/workflow/flow/FlowExecution.java http://jenkins-ci.org/commit/workflow-api-plugin/e26d0b7daa2cccae76ca7494e8fe35a8b31604dd Log: [FIXED JENKINS-29571] Make CpsFlowExecution.owner transient ( JENKINS-27704 ) to avoid problems after renames/moves. Originally-Committed-As: b7014e66b8b064794efea6c78f35160c5250cc2e

          Code changed in jenkins
          User: Jesse Glick
          Path:
          cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java
          cps/src/test/java/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition2Test.java
          http://jenkins-ci.org/commit/workflow-cps-plugin/e4d1b6291b92f6c82f6cbd652b5c62067aeb7119
          Log:
          [FIXED JENKINS-29571] Make CpsFlowExecution.owner transient (JENKINS-27704) to avoid problems after renames/moves.
          Originally-Committed-As: b7014e66b8b064794efea6c78f35160c5250cc2e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java cps/src/test/java/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition2Test.java http://jenkins-ci.org/commit/workflow-cps-plugin/e4d1b6291b92f6c82f6cbd652b5c62067aeb7119 Log: [FIXED JENKINS-29571] Make CpsFlowExecution.owner transient ( JENKINS-27704 ) to avoid problems after renames/moves. Originally-Committed-As: b7014e66b8b064794efea6c78f35160c5250cc2e

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowRunTest.java
          http://jenkins-ci.org/commit/workflow-job-plugin/305082c4530f6253878a8a3700d4881e8da6627d
          Log:
          JENKINS-29571 reproduced in test and confirmed to depend on part of JENKINS-27704.
          Originally-Committed-As: 9d087ca7fcb3e6f186d3f44f289bae8861dedad7

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowRunTest.java http://jenkins-ci.org/commit/workflow-job-plugin/305082c4530f6253878a8a3700d4881e8da6627d Log: JENKINS-29571 reproduced in test and confirmed to depend on part of JENKINS-27704 . Originally-Committed-As: 9d087ca7fcb3e6f186d3f44f289bae8861dedad7

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowRunTest.java
          job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
          http://jenkins-ci.org/commit/workflow-job-plugin/5170bb152334a56987f03711ef3896d64fb98bc0
          Log:
          [FIXED JENKINS-29571] Make CpsFlowExecution.owner transient (JENKINS-27704) to avoid problems after renames/moves.
          Originally-Committed-As: b7014e66b8b064794efea6c78f35160c5250cc2e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowRunTest.java job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java http://jenkins-ci.org/commit/workflow-job-plugin/5170bb152334a56987f03711ef3896d64fb98bc0 Log: [FIXED JENKINS-29571] Make CpsFlowExecution.owner transient ( JENKINS-27704 ) to avoid problems after renames/moves. Originally-Committed-As: b7014e66b8b064794efea6c78f35160c5250cc2e

          Code changed in jenkins
          User: Jesse Glick
          Path:
          job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
          http://jenkins-ci.org/commit/workflow-job-plugin/c034f77059966d1097e16a2bcc1dad2ddbe41994
          Log:
          The fix of JENKINS-27531 in #97 seems to be made simpler by the fix of JENKINS-29571 via JENKINS-27704 in #157.
          We only needed getId(WorkflowRun) because CpsFlowExecution.unmarshal was trying to use an Owner.
          Originally-Committed-As: fc3851f4df8881e24c079cf51f42b48ec9596ab9

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java http://jenkins-ci.org/commit/workflow-job-plugin/c034f77059966d1097e16a2bcc1dad2ddbe41994 Log: The fix of JENKINS-27531 in #97 seems to be made simpler by the fix of JENKINS-29571 via JENKINS-27704 in #157. We only needed getId(WorkflowRun) because CpsFlowExecution.unmarshal was trying to use an Owner. Originally-Committed-As: fc3851f4df8881e24c079cf51f42b48ec9596ab9

            jglick Jesse Glick
            amuniz Antonio Muñiz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: