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

Order Buildque / Block Projects for Upstream Projects

    Details

    • Type: Patch
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: other
    • Labels:
      None
    • Environment:
      Platform: All, OS: All

      Description

      This patch blocks AbstractProject from beeing build while any tranisitive
      Upstream Project is in the Queue or beeing build.
      Effectivly the buildque is processed in reverse dependency order.

      I would have liked to put this in a plugin rather than a patch but found no easy
      way. If theres a change I can commit the patch I could make the behaviour
      configurable through the hudson configuration page.

        Issue Links

          Activity

          Hide
          abayer abayer added a comment -

          This is actually already in place as an advanced option on Maven projects. Let
          me see if I can generalize it easily.

          Show
          abayer abayer added a comment - This is actually already in place as an advanced option on Maven projects. Let me see if I can generalize it easily.
          Hide
          abayer abayer added a comment -

          Ah, and yes, hudson.model.Queue.QueueDecisionHandler, the extension point for
          this sort of functionality, has been added. I don't know if anything actually
          uses it yet, though.

          Show
          abayer abayer added a comment - Ah, and yes, hudson.model.Queue.QueueDecisionHandler, the extension point for this sort of functionality, has been added. I don't know if anything actually uses it yet, though.
          Hide
          abayer abayer added a comment -

          On looking at this further, I don't think QueueDecisionHandler is the way to go

          • that blocks a job from being scheduled at all, when what we want here is to
            keep a job in the queue but unlaunched until its upstream projects/dependencies
            have finished. I'm pretty sure this won't be hard to do by pushing up the logic
            from AbstractMavenProject's isBuildBlocked and related methods to
            AbstractProject - I'll test this out and hopefully get it into 1.323.
          Show
          abayer abayer added a comment - On looking at this further, I don't think QueueDecisionHandler is the way to go that blocks a job from being scheduled at all, when what we want here is to keep a job in the queue but unlaunched until its upstream projects/dependencies have finished. I'm pretty sure this won't be hard to do by pushing up the logic from AbstractMavenProject's isBuildBlocked and related methods to AbstractProject - I'll test this out and hopefully get it into 1.323.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/AbstractProject.java
          trunk/hudson/main/core/src/main/resources/hudson/model/AbstractItem/configure-common.jelly
          trunk/hudson/main/core/src/main/resources/hudson/model/Messages.properties
          trunk/hudson/main/core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly
          trunk/hudson/main/core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding_ja.properties
          trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/AbstractMavenProject.java
          trunk/hudson/main/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly
          trunk/hudson/main/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/configure-entries_ja.properties
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=21323
          Log:
          [FIXED JENKINS-1938] Moved Maven project's block when upstream is building functionality up to AbstractProject. Now available as advanced option for all project types

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/main/core/src/main/java/hudson/model/AbstractProject.java trunk/hudson/main/core/src/main/resources/hudson/model/AbstractItem/configure-common.jelly trunk/hudson/main/core/src/main/resources/hudson/model/Messages.properties trunk/hudson/main/core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly trunk/hudson/main/core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding_ja.properties trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/AbstractMavenProject.java trunk/hudson/main/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly trunk/hudson/main/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/configure-entries_ja.properties trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=21323 Log: [FIXED JENKINS-1938] Moved Maven project's block when upstream is building functionality up to AbstractProject. Now available as advanced option for all project types
          Hide
          abayer abayer added a comment -

          The Maven project's block-when-upstream-building option is now available for
          all project types, as of 1.323. It's an advanced option, and is off by default.

          Show
          abayer abayer added a comment - The Maven project's block-when-upstream-building option is now available for all project types, as of 1.323. It's an advanced option, and is off by default.

            People

            • Assignee:
              Unassigned
              Reporter:
              martinficker martinficker
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: