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

@Initializer(after= InitMilestone.JOB_LOADED) race condition with "Cleaning up obsolete items deleted from the disk"

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      When using an @Initializer(after=InitMilestone.JOB_LOADED creating items, we end up with a race condition with the Cleaning up obsolete items deleted from the disk task if the latter is run after.

      It means in some cases, the items get created, and in others they are not in memory but are on filesystem.

          [JENKINS-47406] @Initializer(after= InitMilestone.JOB_LOADED) race condition with "Cleaning up obsolete items deleted from the disk"

          Code changed in jenkins
          User: Vincent Latombe
          Path:
          core/src/main/java/jenkins/model/Jenkins.java
          test/src/test/java/jenkins/model/JenkinsTest.java
          test/src/test/resources/plugins/jenkins-47406.hpi
          http://jenkins-ci.org/commit/jenkins/0311b2dffa76ba01748b1be6a18fc7c1955e65fe
          Log:
          [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items (#3078)

          • [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items

          This allows @Initializer(after=InitMilestone.JOB_LOADED) implementations
          to create items safely without risking them to be removed.

          • Revert "[FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items"

          This reverts commit 79ce796b00fde11fda586c9c9e2b8e93a53e2b31.

          • Reverted this commit by mistake

          Revert "Revert "[FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items""

          This reverts commit 36c499c58c83427c7b8a6d3cc5902ec26732b2c7.

          • Add link to hpi sources
          • Fix Mix-up after the previous merge

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: core/src/main/java/jenkins/model/Jenkins.java test/src/test/java/jenkins/model/JenkinsTest.java test/src/test/resources/plugins/jenkins-47406.hpi http://jenkins-ci.org/commit/jenkins/0311b2dffa76ba01748b1be6a18fc7c1955e65fe Log: [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items (#3078) [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items This allows @Initializer(after=InitMilestone.JOB_LOADED) implementations to create items safely without risking them to be removed. JENKINS-47406 Add test with an initializer creating a job Revert " [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items" This reverts commit 79ce796b00fde11fda586c9c9e2b8e93a53e2b31. JENKINS-47406 Reinstate the test with Jesse's solution Reverted this commit by mistake Revert "Revert " [FIXES JENKINS-47406] Milestone JOB_LOADED is now attained after cleaning up obsolete items"" This reverts commit 36c499c58c83427c7b8a6d3cc5902ec26732b2c7. Add link to hpi sources Fix Mix-up after the previous merge

          Oleg Nenashev added a comment -

          It has been fixed and released in 2.103

          Oleg Nenashev added a comment - It has been fixed and released in 2.103

            vlatombe Vincent Latombe
            vlatombe Vincent Latombe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: