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

Re-Execute promotion button is gone

    Details

    • Similar Issues:

      Description

      For some reason after updating to the latest jenkins and promoted-builds plugin, the re-execute button is not shown after a build has been promoted.

      This used to be available for all builds and is no longer there.

        Attachments

        1. bug.tgz
          3 kB
        2. bug.tgz
          3 kB
        3. JenkinsBugTest.zip
          148 kB
        4. promoted-builds-2.18-20140807.061532-2.hpi
          226 kB

          Activity

          Hide
          eylvisaker Erik Ylvisaker added a comment -

          I've attached a job with this issue.

          Yes, I only have this issue when force promotion is used. If a promotion is forced and then fails, there is no way to redo the promotion.

          A problem which was leading me to use force promotion: if a promotion has some improperly set criteria then it is impossible to do a regular promotion. For example, if "When the following upstream promotions are promoted" is checked but the box for it is not filled out, clicking Approve will give the "Re-execute Promotion" button, but the promotion will never execute. It does not give any reason why, but it will say upstream promotions under unmet qualifications, but the upstream promotions is blank so that doesn't really indicate anything. If you click the "Re-execute Promotion" button again, you get a 404 error. The only option at that point is to force the promotion, and if it fails you are then completely unable to execute the promotion. I did not check if this also occurs for other invalid settings than the "upstream promotions are promoted" setting.

          Show
          eylvisaker Erik Ylvisaker added a comment - I've attached a job with this issue. Yes, I only have this issue when force promotion is used. If a promotion is forced and then fails, there is no way to redo the promotion. A problem which was leading me to use force promotion: if a promotion has some improperly set criteria then it is impossible to do a regular promotion. For example, if "When the following upstream promotions are promoted" is checked but the box for it is not filled out, clicking Approve will give the "Re-execute Promotion" button, but the promotion will never execute. It does not give any reason why, but it will say upstream promotions under unmet qualifications, but the upstream promotions is blank so that doesn't really indicate anything. If you click the "Re-execute Promotion" button again, you get a 404 error. The only option at that point is to force the promotion, and if it fails you are then completely unable to execute the promotion. I did not check if this also occurs for other invalid settings than the "upstream promotions are promoted" setting.
          Hide
          cvarjao Clecio Varjao added a comment -

          Thanks Marvi and Erik, the project files were very helpful.
          Anybody want to try my latest build with the fix? See Attachments

          Show
          cvarjao Clecio Varjao added a comment - Thanks Marvi and Erik, the project files were very helpful. Anybody want to try my latest build with the fix? See Attachments
          Hide
          rkok Rene Kok added a comment -

          Fix promoted-builds-2.18-20140807.061532-2.hpi worked for me.
          thanks.

          Show
          rkok Rene Kok added a comment - Fix promoted-builds-2.18-20140807.061532-2.hpi worked for me. thanks.
          Show
          dnozay Damien Nozay added a comment - https://github.com/jenkinsci/promoted-builds-plugin/pull/45
          Hide
          dnozay Damien Nozay added a comment -

          Fixed/Workaround in version 2.20.

          https://github.com/jenkinsci/promoted-builds-plugin/commit/8e0e17b1e21624cb3db68f23b868fb15d280aae3

          The fix was to remove the button display condition which was `isManuallyApproved()`.
          Promotions that are "Forced" are not the same as "manually approved".
          It is now displayed unconditionally.

          There are many use cases for re-executing the promotion, two of them are:
          1. it didn't work the first time, duh!
          2. side-effects that you want to re-execute.

          The "Force promotion" workflow may very well be broken.
          You may be able to get more data using/adapting the following groovy script:

          import hudson.plugins.promoted_builds.*;
          
          jobs = hudson.model.Hudson.instance.getAllItems(FreeStyleProject)
          job = jobs[0]
          
          build = job.lastSuccessfulBuild
          
          println build.actions
          
          build.getAction(PromotedBuildAction.class).promotions.each { 
            p -> 
            println "promotion:" + p.name + ", manual:" + p.manuallyApproved + ", success:" + p.promotionSuccessful
            println p.badges
          }
          
          Show
          dnozay Damien Nozay added a comment - Fixed/Workaround in version 2.20. https://github.com/jenkinsci/promoted-builds-plugin/commit/8e0e17b1e21624cb3db68f23b868fb15d280aae3 The fix was to remove the button display condition which was `isManuallyApproved()`. Promotions that are "Forced" are not the same as "manually approved". It is now displayed unconditionally. There are many use cases for re-executing the promotion, two of them are: 1. it didn't work the first time, duh! 2. side-effects that you want to re-execute. The "Force promotion" workflow may very well be broken. You may be able to get more data using/adapting the following groovy script: import hudson.plugins.promoted_builds.*; jobs = hudson.model.Hudson.instance.getAllItems(FreeStyleProject) job = jobs[0] build = job.lastSuccessfulBuild println build.actions build.getAction(PromotedBuildAction.class).promotions.each { p -> println "promotion:" + p.name + ", manual:" + p.manuallyApproved + ", success:" + p.promotionSuccessful println p.badges }

            People

            • Assignee:
              cvarjao Clecio Varjao
              Reporter:
              oggie gary ogden
            • Votes:
              7 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated: