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

Manual steps broken in Jenkins ver. 1.653

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: build-pipeline-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.653
      Build Pipeline Plugin ver. 1.5.1
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Show
            noidi Timo Mihaljov added a comment - Pull request: https://github.com/jenkinsci/build-pipeline-plugin/pull/97
            Hide
            giuspen Giuseppe Penone added a comment -

            Hi Timo Mihaljov, is your fixed plugin binary available somewhere so that I can try it in my Jenkins installation?

            Show
            giuspen Giuseppe Penone added a comment - Hi Timo Mihaljov , is your fixed plugin binary available somewhere so that I can try it in my Jenkins installation?
            Hide
            noidi Timo Mihaljov added a comment -
            Show
            noidi Timo Mihaljov added a comment - Giuseppe Penone , here's a binary built from my branch: https://www.dropbox.com/s/9ywjl8trtudatq6/build-pipeline-plugin.hpi?dl=0
            Hide
            giuspen Giuseppe Penone added a comment -

            Thanks Timo Mihaljov for your help, unfortunately your patch did not fix my issue.
            In the attached screenshot you can see the latest 3 steps are blue while only the last one should.
            The 5th and 6th steps are green after manually re-running them but still they appear as blue in the view.
            I can add more screenshots or logs if requested.
            Cheers.

            Show
            giuspen Giuseppe Penone added a comment - Thanks Timo Mihaljov for your help, unfortunately your patch did not fix my issue. In the attached screenshot you can see the latest 3 steps are blue while only the last one should. The 5th and 6th steps are green after manually re-running them but still they appear as blue in the view. I can add more screenshots or logs if requested. Cheers.
            Hide
            noidi Timo Mihaljov added a comment -

            Giuseppe Penone: Did you create a new pipeline after installing the updated plugin? I think that all jobs must be run with the fixed version or the chain of causes to the first job will be broken.

            Show
            noidi Timo Mihaljov added a comment - Giuseppe Penone : Did you create a new pipeline after installing the updated plugin? I think that all jobs must be run with the fixed version or the chain of causes to the first job will be broken.
            Hide
            noidi Timo Mihaljov added a comment -

            To clarify, by creating a new pipeline I mean that you have to start a new build of the first job of the pipeline.

            Show
            noidi Timo Mihaljov added a comment - To clarify, by creating a new pipeline I mean that you have to start a new build of the first job of the pipeline.
            Hide
            giuspen Giuseppe Penone added a comment -

            Timo Mihaljov thanks for the update, I'll re-run the pipe from the beginning shortly and let you know

            Show
            giuspen Giuseppe Penone added a comment - Timo Mihaljov thanks for the update, I'll re-run the pipe from the beginning shortly and let you know
            Hide
            giuspen 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

            Show
            giuspen 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
            Hide
            dalvizu Dan Alvizu added a comment -

            Giuseppe Penone- 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?

            Show
            dalvizu Dan Alvizu added a comment - Giuseppe Penone - 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 ?
            Hide
            dalvizu 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 Timo Mihaljov'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.

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

            Show
            dalvizu 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 Timo Mihaljov '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. Giuseppe Penone - If you can document the issue and the expected behavior before this patch, please do so! This looks good from my testing.
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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 .
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            dalvizu Dan Alvizu added a comment -

            Merged and released in 1.5.2

            Show
            dalvizu Dan Alvizu added a comment - Merged and released in 1.5.2
            Hide
            giuspen Giuseppe Penone added a comment -

            Dan Alvizu 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.

            Show
            giuspen Giuseppe Penone added a comment - Dan Alvizu 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.
            Hide
            dalvizu 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?

            Show
            dalvizu 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?
            Hide
            dalvizu 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.

            Show
            dalvizu 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.
            Hide
            giuspen Giuseppe Penone added a comment -

            Thanks Dan Alvizu 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.

            Show
            giuspen Giuseppe Penone added a comment - Thanks Dan Alvizu 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.

              People

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

                Dates

                Created:
                Updated:
                Resolved: