![]() |
|
|
|
|
Change By:
|
Ben Golding
(30/Nov/12 12:54 PM)
|
|
Description:
|
The user should be able to configure behaviour when a failure occurs. Currently all following jobs are skipped.
In some cases this is the correct behaviour, e.g.:
{code:title=B depends on A, so if A fails we want to skip B} parallel( { build("A"); build("B"); }, { build("C"); } ) {code}
In other cases we always want to run a job, e.g.:
{code:title=Always run CLEANUP, even if A, B or C fails} parallel( { build("A"); build("B"); }, { build("C"); } ) build("CLEANUP"); {code}
The above is possible with guard..rescue.
{code:title=Always run A and B, even if PREPARATION fails} build("PREPARATION"); build("A"); build("B"); {code}
The above is not possible currently AFAIK.
How to implement the fix? Some ideas below:
In general we probably want to pass a parameter to build() indicating whether to run the job.
We may also need a value returned from build() indicating the status of that job.
This may already be possible to
Alternatively
some
extent with guard
construct like {code}ignore {
..
. }{code}
The 'ignore' would behave as if all jobs in the ignore-block were successful: jobs in the parent block would not be skipped.
or even {code}ignore { ... }
rescue
{
.
I need
.. }{code}
The 'ignore..rescue' would have a status equal
to
try some experiments
the status of the jobs in the rescue-block
.
In that case {code}ignore { ... } rescue { }{code} would always be successful, can be used in the case no cleanup is needed.
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
|