• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • build-pipeline-plugin
    • None
    • Jenkins ver. 1.653
      Build Pipeline Plugin ver. 1.5.1

      Steps to reproduce

      1. Create a pipeline with a manually triggered step
      2. Trigger the step and wait until it's completed
      3. Refresh the view

      Expected result

      The manual step should be shown in green.

      Actual result

      The manual step is shown in cyan, as if it was not executed as a part of this pipeline.

      More information

      The issue seems to be caused by changes to CauseAction, as described in the comments of JENKINS-33467.

          [JENKINS-33591] Manual steps broken in Jenkins ver. 1.653

          I restarted the pipe from the beginning but found some problems:
          1) the manual step takes the color of the job only if I run it from the pipeline view page and not from the job page
          2) when I run the job from the pipeline view page something is wrong because the 'BUILD_USER_ID' key is not set (Set jenkins user build variables from the Build User Vars Plugin)
          Since I have to run the job from the job page and not from the view to make it work (green) the view page does not take the green color and still has the red from the latest run from the pipeline view page

          Giuseppe Penone added a comment - I restarted the pipe from the beginning but found some problems: 1) the manual step takes the color of the job only if I run it from the pipeline view page and not from the job page 2) when I run the job from the pipeline view page something is wrong because the 'BUILD_USER_ID' key is not set (Set jenkins user build variables from the Build User Vars Plugin) Since I have to run the job from the job page and not from the view to make it work (green) the view page does not take the green color and still has the red from the latest run from the pipeline view page

          Dan Alvizu added a comment -

          giuspen- can you elaborate on issue #1 in your last comment: you have a job you start with 'Build Other Projects (Manual Trigger), and if you click 'Build now' in the job page, the pipeline does not update? If so, that is not a regression, it never worked that way

          I would also like more details on #2 - what do you mean by 'run the job' - starting the pipeline with the 'Run' button in the build pipeline view? Retrigger a build? Trigger the 'build manual' step? And to be clear: this is a regression caused by the fix to JENKINS-33591?

          Dan Alvizu added a comment - giuspen - can you elaborate on issue #1 in your last comment: you have a job you start with 'Build Other Projects (Manual Trigger), and if you click 'Build now' in the job page, the pipeline does not update? If so, that is not a regression, it never worked that way I would also like more details on #2 - what do you mean by 'run the job' - starting the pipeline with the 'Run' button in the build pipeline view? Retrigger a build? Trigger the 'build manual' step? And to be clear: this is a regression caused by the fix to JENKINS-33591 ?

          Dan Alvizu added a comment -

          I tested and I see the same behavior in Jenkins 1.646 / build pipeline 1.5.1 and in Jenkins 1.654 / build pipeline with noidi's change, with respect to the Build User Vars Plugin: downstream variables show up if the 'Set Jenkins User Variables' box is checked, and do not if it is not. Parameter / cause information appears to be copied correctly. This is okay to merge from my perspective.

          giuspen - If you can document the issue and the expected behavior before this patch, please do so! This looks good from my testing.

          Dan Alvizu added a comment - I tested and I see the same behavior in Jenkins 1.646 / build pipeline 1.5.1 and in Jenkins 1.654 / build pipeline with noidi 's change, with respect to the Build User Vars Plugin: downstream variables show up if the 'Set Jenkins User Variables' box is checked, and do not if it is not. Parameter / cause information appears to be copied correctly. This is okay to merge from my perspective. giuspen - If you can document the issue and the expected behavior before this patch, please do so! This looks good from my testing.

          Code changed in jenkins
          User: Timo Mihaljov
          Path:
          src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java
          http://jenkins-ci.org/commit/build-pipeline-plugin/d56ff03bf4838c541e68f4cfc06f59ba78d12317
          Log:
          JENKINS-33591 Don't modify CauseAction's causes

          The cause list is immutable as described in the comments of
          JENKINS-33467.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Timo Mihaljov Path: src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java http://jenkins-ci.org/commit/build-pipeline-plugin/d56ff03bf4838c541e68f4cfc06f59ba78d12317 Log: JENKINS-33591 Don't modify CauseAction's causes The cause list is immutable as described in the comments of JENKINS-33467 .

          Code changed in jenkins
          User: Dan Alvizu
          Path:
          src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java
          http://jenkins-ci.org/commit/build-pipeline-plugin/281fe1d7c66eb25a2e27009fe064c5f7836fd2bf
          Log:
          Merge pull request #97 from noidi/JENKINS-33591

          Fix JENKINS-33591: Manual steps broken in Jenkins ver. 1.653

          Compare: https://github.com/jenkinsci/build-pipeline-plugin/compare/3b4634ec3425...281fe1d7c66e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Dan Alvizu Path: src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java http://jenkins-ci.org/commit/build-pipeline-plugin/281fe1d7c66eb25a2e27009fe064c5f7836fd2bf Log: Merge pull request #97 from noidi/ JENKINS-33591 Fix JENKINS-33591 : Manual steps broken in Jenkins ver. 1.653 Compare: https://github.com/jenkinsci/build-pipeline-plugin/compare/3b4634ec3425...281fe1d7c66e

          Dan Alvizu added a comment -

          Merged and released in 1.5.2

          Dan Alvizu added a comment - Merged and released in 1.5.2

          dalvizu sorry for the delay I was in holiday.
          About issue #1 yes you understood correctly, I see, so I have to run the job from the build pipeline view or it will not work (acceptable even though this way there's no way to run parameterised jobs).
          About issue #2 this is a show stopper for me because, since I have to run from the view, the job fails with the error of missing BUILD_USER_ID (https://wiki.jenkins-ci.org/display/JENKINS/Build+User+Vars+Plugin doesn't seem to work when running the job from the view)
          I'm running Jenkins LTS 1.642.3 and the just released version 1.5.2 of the Build Pipeline Plugin.
          I see you tested Jenkins 1.646 and 1.654 though saying that Build User Vars Plugin works there, if that is the case I'll just have to wait until they update the LTS.
          Many thanks for your support.

          Giuseppe Penone added a comment - dalvizu sorry for the delay I was in holiday. About issue #1 yes you understood correctly, I see, so I have to run the job from the build pipeline view or it will not work (acceptable even though this way there's no way to run parameterised jobs). About issue #2 this is a show stopper for me because, since I have to run from the view, the job fails with the error of missing BUILD_USER_ID ( https://wiki.jenkins-ci.org/display/JENKINS/Build+User+Vars+Plugin doesn't seem to work when running the job from the view) I'm running Jenkins LTS 1.642.3 and the just released version 1.5.2 of the Build Pipeline Plugin. I see you tested Jenkins 1.646 and 1.654 though saying that Build User Vars Plugin works there, if that is the case I'll just have to wait until they update the LTS. Many thanks for your support.

          Dan Alvizu added a comment -

          The testing I did was:

          Create upstream job
          Create downstream job

          The only time 'BUILD_USER_ID' appears in the downstream job is if i check 'Set Jenkins User Variables' in the downstream job. In my testing it is never passed down from the upstream job. Do you know of a version where this isn't the case?

          Dan Alvizu added a comment - The testing I did was: Create upstream job Create downstream job The only time 'BUILD_USER_ID' appears in the downstream job is if i check 'Set Jenkins User Variables' in the downstream job. In my testing it is never passed down from the upstream job. Do you know of a version where this isn't the case?

          Dan Alvizu added a comment -

          If you can reproduce please include the job config.xml and the versions you used so I can take a look.

          Dan Alvizu added a comment - If you can reproduce please include the job config.xml and the versions you used so I can take a look.

          Thanks dalvizu for your help, I finally managed to have the Build User Vars Plugin working properly also when manually triggering the build from the view.
          I started testing on a virtual machine with Ubuntu 14.04 LTS with Jenkins 1.642.4 and it worked immediately.
          After upgrading the production environment to Jenkins 1.642.4 anyway it didn't work immediately, I made many tests trying to understand what was wrong, it seems to me that it started to work after I deleted every single build from the downstream manually triggered job and then from the view I triggered the build that went green with the BUILD_USER_ID variable properly created.
          Thanks again for the support.

          Giuseppe Penone added a comment - Thanks dalvizu for your help, I finally managed to have the Build User Vars Plugin working properly also when manually triggering the build from the view. I started testing on a virtual machine with Ubuntu 14.04 LTS with Jenkins 1.642.4 and it worked immediately. After upgrading the production environment to Jenkins 1.642.4 anyway it didn't work immediately, I made many tests trying to understand what was wrong, it seems to me that it started to work after I deleted every single build from the downstream manually triggered job and then from the view I triggered the build that went green with the BUILD_USER_ID variable properly created. Thanks again for the support.

            dalvizu Dan Alvizu
            noidi Timo Mihaljov
            Votes:
            8 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: