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

DependecyDeclarer always triggers builds and without Actions

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Hudson 1.340

      Currently Build.RunnerImpl.cleanUp() calls BuildTrigger.execute().. this triggers ALL jobs that have been added as downstream jobs by any DependecyDeclarer (yes, the class name has a typo).. only BuildTrigger itself gets any special handling: triggering only if status threshold is met.. if the downstream connection is made by any other impl, it will trigger the job always, even if this build failed or was aborted! Furthermore, downstream jobs are triggered with just UpstreamCause, with no opportunity for those Declarers to provide any additional Actions (like build parameters).

      Need to expand this API so Declarers can control whether a build is triggered and provide Actions to submit with the build.

          [JENKINS-5236] DependecyDeclarer always triggers builds and without Actions

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Build.java
          trunk/hudson/main/core/src/main/java/hudson/model/DependencyGraph.java
          trunk/hudson/main/core/src/main/java/hudson/tasks/BuildTrigger.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=25751
          Log:
          JENKINS-5236 Introduce DependencyGraph.Dependency so DependecyDeclarers can control
          whether builds are triggered and provide Actions for the triggered build.
          (previously only tasks.BuildTrigger had hardcoded support for logic on whether or
          not to trigger.. now it uses this mechanism)

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/Build.java trunk/hudson/main/core/src/main/java/hudson/model/DependencyGraph.java trunk/hudson/main/core/src/main/java/hudson/tasks/BuildTrigger.java http://fisheye4.cenqua.com/changelog/hudson/?cs=25751 Log: JENKINS-5236 Introduce DependencyGraph.Dependency so DependecyDeclarers can control whether builds are triggered and provide Actions for the triggered build. (previously only tasks.BuildTrigger had hardcoded support for logic on whether or not to trigger.. now it uses this mechanism)

          Code changed in hudson
          User: : mindless
          Path:
          branches/rc/core/src/main/java/hudson/tasks/BuildTrigger.java
          trunk/hudson/main/core/src/main/java/hudson/tasks/BuildTrigger.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=25820
          Log:
          [FIXED JENKINS-5236] one fix for r25751.. DependencyGraph as Comparator returns
          zero for jobs not dependending on eachother.. in a TreeMap this means keys
          overwrite eachother and not all builds are triggered.
          Switch to sorting in a List.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: branches/rc/core/src/main/java/hudson/tasks/BuildTrigger.java trunk/hudson/main/core/src/main/java/hudson/tasks/BuildTrigger.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=25820 Log: [FIXED JENKINS-5236] one fix for r25751.. DependencyGraph as Comparator returns zero for jobs not dependending on eachother.. in a TreeMap this means keys overwrite eachother and not all builds are triggered. Switch to sorting in a List.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/DependencyGraph.java
          trunk/hudson/main/test/src/test/java/hudson/model/DependencyGraphTest.java
          trunk/hudson/main/test/src/test/resources/hudson/model/DependencyGraphTest/testItemReadPermission.zip
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=25821
          Log:
          [FIXED JENKINS-5265] set system privileges while building DependencyGraph so no jobs
          are missed if the current user can't see them all (per-project read permissions).
          Added unit tests for this and JENKINS-5236.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/DependencyGraph.java trunk/hudson/main/test/src/test/java/hudson/model/DependencyGraphTest.java trunk/hudson/main/test/src/test/resources/hudson/model/DependencyGraphTest/testItemReadPermission.zip trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=25821 Log: [FIXED JENKINS-5265] set system privileges while building DependencyGraph so no jobs are missed if the current user can't see them all (per-project read permissions). Added unit tests for this and JENKINS-5236 .

          Code changed in hudson
          User: : mindless
          Path:
          branches/rc/core/src/main/java/hudson/model/DependencyGraph.java
          branches/rc/core/src/main/java/hudson/tasks/BuildTrigger.java
          trunk/hudson/main/core/src/main/java/hudson/model/DependencyGraph.java
          trunk/hudson/main/core/src/main/java/hudson/tasks/BuildTrigger.java
          trunk/hudson/main/test/src/test/java/hudson/model/DependencyGraphTest.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=25878
          Log:
          JENKINS-5236 remove Dependency.getBuildActions API, as its computation may
          overlap with shouldTriggerBuild. Instead, add List<Action> parameter in
          shouldTriggerBuild which impl can add Actions to before returning boolean.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: branches/rc/core/src/main/java/hudson/model/DependencyGraph.java branches/rc/core/src/main/java/hudson/tasks/BuildTrigger.java trunk/hudson/main/core/src/main/java/hudson/model/DependencyGraph.java trunk/hudson/main/core/src/main/java/hudson/tasks/BuildTrigger.java trunk/hudson/main/test/src/test/java/hudson/model/DependencyGraphTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=25878 Log: JENKINS-5236 remove Dependency.getBuildActions API, as its computation may overlap with shouldTriggerBuild. Instead, add List<Action> parameter in shouldTriggerBuild which impl can add Actions to before returning boolean.

            mindless Alan Harder
            mindless Alan Harder
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: