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

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

    XMLWordPrintable

Details

    Description

      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

      Attachments

        Issue Links

          Activity

            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_issue_link 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

            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_issue_link 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.

            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.

            bheiskell 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.

            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.

            afowleswinkler 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.

            People

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

              Dates

                Created:
                Updated:
                Resolved: