Issue Details (XML | Word | Printable)

Key: HUDSON-5236
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: mindless
Reporter: mindless
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Hudson

DependecyDeclarer always triggers builds and without Actions

Created: 11/Jan/10 06:01 PM   Updated: 20/Jan/10 08:28 AM   Resolved: 14/Jan/10 08:03 AM
Component/s: core
Affects Version/s: None
Fix Version/s: None

Environment: Hudson 1.340
Issue Links:
Dependency
 


 Description  « Hide

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.



Sort Order: Ascending order - Click to sort in descending order
scm_issue_link added a comment - 12/Jan/10 11:17 PM

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:
HUDSON-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_issue_link added a comment - 14/Jan/10 08:03 AM

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 HUDSON-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_issue_link added a comment - 14/Jan/10 08:16 AM

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 HUDSON-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 HUDSON-5236.


scm_issue_link added a comment - 15/Jan/10 12:26 PM

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:
HUDSON-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.