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

Copying A Job With Promotions and Renaming New Promotion Causes Phantom Promotions

      Lately we've been seeing an issue with phantom promotions.

      Setup:
      1. clone a job that has a promotion process set
      2. in the newly cloned job, rename said promotion process
      3. on disk (under JENKINS_HOME) notice that the promotions folder for the new job has multiple promotions
      4. notice that the previously-named promotion process doesn't appear in the UI
      5. if a build occurs and it matches the critera of the hidden promotion process, that will also execute
      6. repeating step #1 on the current job will accumulate phantom promotion configs (there will now be two after a rename)

      These

          [JENKINS-27716] Copying A Job With Promotions and Renaming New Promotion Causes Phantom Promotions

          I'm seeing this problem even when I remove a promotion, the directory is still present on Jenkins. If I remove the promotion directory, it is recreated. I'm seeing this with version 2.21 of the plugin and Jenkins 1.624.

          Anna Fowles-Winkler added a comment - I'm seeing this problem even when I remove a promotion, the directory is still present on Jenkins. If I remove the promotion directory, it is recreated. I'm seeing this with version 2.21 of the plugin and Jenkins 1.624.

          The issue is with a change in Jenkins which requires the Promotion object to explicitly indicate that it can be disabled. I've created pull request !71 (https://github.com/jenkinsci/promoted-builds-plugin/pull/71) to address the issue.

          Benjamin Heiskell added a comment - The issue is with a change in Jenkins which requires the Promotion object to explicitly indicate that it can be disabled. I've created pull request !71 ( https://github.com/jenkinsci/promoted-builds-plugin/pull/71 ) to address the issue.

          Code changed in jenkins
          User: Benjamin Heiskell
          Path:
          src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
          http://jenkins-ci.org/commit/promoted-builds-plugin/2a33fc613bc74a4cdaca88c1c352b9d79ce7678a
          Log:
          [FIXED JENKINS-27716] - Disable archived promotion jobs

          Since 1.585, the promotion must explicitly indicate that it can be disabled.
          Otherwise, promotions which trigger automatically upon build completion will
          execute, even if they're archived.

          See hudson.model.AbstractProject#makeDisabled(boolean) for additional details.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Benjamin Heiskell Path: src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java http://jenkins-ci.org/commit/promoted-builds-plugin/2a33fc613bc74a4cdaca88c1c352b9d79ce7678a Log: [FIXED JENKINS-27716] - Disable archived promotion jobs Since 1.585, the promotion must explicitly indicate that it can be disabled. Otherwise, promotions which trigger automatically upon build completion will execute, even if they're archived. See hudson.model.AbstractProject#makeDisabled(boolean) for additional details.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
          http://jenkins-ci.org/commit/promoted-builds-plugin/2c7603e9b91eb35c8767c5020e73e4a844dc63b3
          Log:
          Merge pull request #71 from bheiskell/fix/promotion/phantom

          [FIXED JENKINS-27716] - Disable archived promotion jobs

          Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/89aa15d1f4e3...2c7603e9b91e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java http://jenkins-ci.org/commit/promoted-builds-plugin/2c7603e9b91eb35c8767c5020e73e4a844dc63b3 Log: Merge pull request #71 from bheiskell/fix/promotion/phantom [FIXED JENKINS-27716] - Disable archived promotion jobs Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/89aa15d1f4e3...2c7603e9b91e

            bheiskell Benjamin Heiskell
            blaskovicz Zach Auclair
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: