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

DeadBranchStrategy should avoid deleting projects with active jobs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If you create a DefaultDeadBranchStrategy with 0 days to live, and 0 builds to keep, you can easily create a situation where a branch can be deleted while a job on it is active.

      When branches are re-indexed, the project will be deleted and interrupt active jobs.

      I believe a more appropriate course would be to wait for a branch indexing to run while the project is inactive, a state which once entered it shouldn't leave since the branch was deleted (unless it were recreated).

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/computed/DefaultOrphanedItemStrategy.java
            src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/be15a91e154cf3bed6a09a8a3252078e586155d3
            Log:
            [FIXED JENKINS-25240] Need to consider even nested jobs for purposes of checking running builds.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/computed/DefaultOrphanedItemStrategy.java src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/be15a91e154cf3bed6a09a8a3252078e586155d3 Log: [FIXED JENKINS-25240] Need to consider even nested jobs for purposes of checking running builds.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/computed/DefaultOrphanedItemStrategy.java
            src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/3857169b4daf828aedaeb4b0e37baa0fba94e560
            Log:
            Merge pull request #46 from jglick/JENKINS-25240-redux

            JENKINS-25240 Need to consider even nested jobs for purposes of checking running builds

            Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/585f91aa2ac9...3857169b4daf

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/computed/DefaultOrphanedItemStrategy.java src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/3857169b4daf828aedaeb4b0e37baa0fba94e560 Log: Merge pull request #46 from jglick/ JENKINS-25240 -redux JENKINS-25240 Need to consider even nested jobs for purposes of checking running builds Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/585f91aa2ac9...3857169b4daf
            Hide
            jglick Jesse Glick added a comment -

            There was another unhandled case.

            Show
            jglick Jesse Glick added a comment - There was another unhandled case.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/computed/DefaultOrphanedItemStrategy.java
            src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/f144e9013c677de08711fd53b654f5fec526889e
            Log:
            [FIXED JENKINS-25240] Neglected to break out of a loop when removing an item from a list, resulting in an IllegalStateException.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/computed/DefaultOrphanedItemStrategy.java src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/f144e9013c677de08711fd53b654f5fec526889e Log: [FIXED JENKINS-25240] Neglected to break out of a loop when removing an item from a list, resulting in an IllegalStateException.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/computed/DefaultOrphanedItemStrategy.java
            src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/6f2daf46be91856202328760e3759d539698b756
            Log:
            Merge pull request #53 from jglick/JENKINS-25240-reredux

            JENKINS-25240 IllegalStateException from a list iterator

            Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/eee3b1b0bfc0...6f2daf46be91

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/computed/DefaultOrphanedItemStrategy.java src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/6f2daf46be91856202328760e3759d539698b756 Log: Merge pull request #53 from jglick/ JENKINS-25240 -reredux JENKINS-25240 IllegalStateException from a list iterator Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/eee3b1b0bfc0...6f2daf46be91

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                mattmoor Matthew Moore
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: