-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipes should fail after an exception #8
Comments
@kstrauser: I have a different view to present here. I don't think it should fail. The reason I think so is one of the jobs might be a cleanup job which is quite needed in a lot of places. If the failure of a stage compels the next stage to fail, we may end up in a situation where the cleanup jobs are not executed. Having said that I believe we should have control over dependency and choice. So, I have been thinking of j1 = Job(job1)
# Lets assume job1 pushes its state into a queue or some variable x.
def gate_method():
flag = True
# flag value is set to variable x or popped value from queue
return flag
j2 = Job(job2, gate=gate_method) When job 2 is being run it will check for value returned by gate_method and only if it is true will execute job2. That will introduce the notion of dynamic decision in pipeline. What do you think? |
That’s a really good point about cleanup jobs! I think the |
@kstrauser : Have added a bunch of new stuff including exception handling modes and dependency. Look at |
v0.0.9 should resolve this issue. |
I'll take a look. Thanks for following up! |
In my opinion, pipelines should fail when a Job's function raises an exception. For example, I imagine a Pipe with [Job(build_a_thing), Job(test_a_thing), Job(deploy_a_thing)]. If the test fails, we should never get to the deploy step. That's not now it works now, though:
In this case,
func2
will be executed even thoughfunc1
explodes. If the two run in parallel, then func2 should be allowed to finish (that is, don't say "oh, func1 died! time to kill all the other Jobs!"). But given this scenario:I don't think func3 should ever be called because one of the Jobs in the first step of the pipeline failed.
The text was updated successfully, but these errors were encountered: