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

waitForBuild Step does not abort downstream build when upstream job aborted

      https://www.jenkins.io/doc/pipeline/steps/pipeline-build-step/#build-build-a-job

      when build: wait=true, user abort upstream job CAN abort downstream also

      when build: waitForStart=true, during waitForBuild to wait downstrem build, BUT user abort upstream job NOT abort downstream

          [JENKINS-71961] waitForBuild Step does not abort downstream build when upstream job aborted

          Stuart Rowe added a comment -

          tmc9031 I have started a PR with a potential fix; https://github.com/jenkinsci/pipeline-build-step-plugin/pull/124.

          However after thinking about this bug I don't think we want to always implicitly abort the downstream build when the upstream build is aborted. This behavior should probably be parameterized in the waitForBuild step instead. What do you think?

          Stuart Rowe added a comment - tmc9031 I have started a PR with a potential fix; https://github.com/jenkinsci/pipeline-build-step-plugin/pull/124 . However after thinking about this bug I don't think we want to always implicitly abort the downstream build when the upstream build is aborted. This behavior should probably be parameterized in the waitForBuild step instead. What do you think?

          Marcus Tang added a comment -

          https://www.jenkins.io/doc/pipeline/steps/pipeline-build-step/#waitforbuild-wait-for-build-to-complete

          now propagate disabled (default state)

          behavior should probably be parameterized when propagate true

           

          P.S.: use build: waitForStart=true be able to get down-job info into up-job at start time, not need down-job finish

          in my case, up-job for user trigger, down-job is real work job, so user really hope abort up-job also abort down-job,

           

          thanks fix this issue

          Marcus Tang added a comment - https://www.jenkins.io/doc/pipeline/steps/pipeline-build-step/#waitforbuild-wait-for-build-to-complete now propagate disabled (default state) behavior should probably be parameterized when propagate true   P.S.: use build: waitForStart=true be able to get down-job info into up-job at start time, not need down-job finish in my case, up-job for user trigger, down-job is real work job, so user really hope abort up-job also abort down-job,   thanks fix this issue

          Stuart Rowe added a comment -

          The existing propagate parameter is for the downstream job's result to be propagated to the upstream job.

          This bug is requesting for an abort of the upstream job to be propagated to the downstream job. I think a new parameter called something like propagateAbort would make sense.

          I added the waitForStart parameter to the build step along with the waitForBuild step so I could start a downstream job, get info about it for notifications and then still wait for the downstream job to finish. I also need the abort downstream job behavior, I just didn't realize it wasn't happening until you reported the bug .

          Stuart Rowe added a comment - The existing propagate parameter is for the downstream job's result to be propagated to the upstream job. This bug is requesting for an abort of the upstream job to be propagated to the downstream job. I think a new parameter called something like propagateAbort would make sense. I added the waitForStart parameter to the build step along with the waitForBuild step so I could start a downstream job, get info about it for notifications and then still wait for the downstream job to finish. I also need the abort downstream job behavior, I just didn't realize it wasn't happening until you reported the bug .

          Christoph Kulla added a comment - Fixed in 539.v8c889169451f by this PR https://github.com/jenkinsci/pipeline-build-step-plugin/pull/124

            stuartrowe Stuart Rowe
            tmc9031 Marcus Tang
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: