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

WorkflowRun assigned FlowExecution when execution start fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: pipeline
    • Labels:
      None
    • Similar Issues:

      Description

      WorkflowRun initialises its "execution" property before the execution is started. If the start fails, the Run is left with an execution instance that is considered to be "in progress".

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link 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/7db48c88df0ac3b35d489f6275b9f7e4d88de85c
            Log:
            JENKINS-29221 If a build fails to start, make sure we still perform all relevant steps as if it finished normally.

            Show
            scm_issue_link 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/7db48c88df0ac3b35d489f6275b9f7e4d88de85c Log: JENKINS-29221 If a build fails to start, make sure we still perform all relevant steps as if it finished normally.
            Hide
            scm_issue_link 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/99ca243654430737de5f3be6367c9b24ccfdf5bb
            Log:
            WorkflowRun.execution must be set before the execution starts.
            Otherwise Owner.get can throw an error claiming that the build has not started yet.
            We do need to null out the field if starting fails, but we can do that subsequently.
            Amends the fix of JENKINS-29221 in #149, which introduced this race condition.

            Show
            scm_issue_link 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/99ca243654430737de5f3be6367c9b24ccfdf5bb Log: WorkflowRun.execution must be set before the execution starts. Otherwise Owner.get can throw an error claiming that the build has not started yet. We do need to null out the field if starting fails, but we can do that subsequently. Amends the fix of JENKINS-29221 in #149, which introduced this race condition.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: tfennelly
            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/0827836fe4aad44feae99be53b0d825952a551f9
            Log:
            [FIXED JENKINS-29221] WorkflowRun assigned FlowExecution when execution start fails

            Originally-Committed-As: adeaf564a94ee6f82861e4253bd2d5bbc22276c4

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly 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/0827836fe4aad44feae99be53b0d825952a551f9 Log: [FIXED JENKINS-29221] WorkflowRun assigned FlowExecution when execution start fails Originally-Committed-As: adeaf564a94ee6f82861e4253bd2d5bbc22276c4
            Hide
            scm_issue_link 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/b4563b1d993293d0f7011f21a0b8a7903878edfa
            Log:
            JENKINS-29221 If a build fails to start, make sure we still perform all relevant steps as if it finished normally.

            Originally-Committed-As: 7db48c88df0ac3b35d489f6275b9f7e4d88de85c

            Show
            scm_issue_link 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/b4563b1d993293d0f7011f21a0b8a7903878edfa Log: JENKINS-29221 If a build fails to start, make sure we still perform all relevant steps as if it finished normally. Originally-Committed-As: 7db48c88df0ac3b35d489f6275b9f7e4d88de85c
            Hide
            scm_issue_link 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/682638de3356695d2f5629c89fd7eb36248d569a
            Log:
            WorkflowRun.execution must be set before the execution starts.
            Otherwise Owner.get can throw an error claiming that the build has not started yet.
            We do need to null out the field if starting fails, but we can do that subsequently.
            Amends the fix of JENKINS-29221 in #149, which introduced this race condition.
            Originally-Committed-As: 99ca243654430737de5f3be6367c9b24ccfdf5bb

            Show
            scm_issue_link 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/682638de3356695d2f5629c89fd7eb36248d569a Log: WorkflowRun.execution must be set before the execution starts. Otherwise Owner.get can throw an error claiming that the build has not started yet. We do need to null out the field if starting fails, but we can do that subsequently. Amends the fix of JENKINS-29221 in #149, which introduced this race condition. Originally-Committed-As: 99ca243654430737de5f3be6367c9b24ccfdf5bb

              People

              • Assignee:
                tfennelly Tom FENNELLY
                Reporter:
                tfennelly Tom FENNELLY
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: