-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
async.auto: should subsequent tasks still run if the chain as a whole has been marked as failed? #1023
Comments
You're right -- only tasks that depend on the faulty task will not run. Any tasks that were in progress when the error occurs will continue, but their results will be ignored. Is there an issue when an error occurs synchronously as several tasks are being kicked off at the same time? |
What version are you using? It sounds like you're describing #988 which was fixed in v1.5.1 |
Actually, I was using 1.5.0, so I upgraded to 1.5.1 and the behavior is still wrong. Same for 1.5.2. I then ran the original example in #988 and it seems that bug isn't fixed. For what it's worth, I'm running Node.js v5.6.0 in Ubuntu 15.04. |
Are you sure you had 1.5.2 installed? There's a specific test case for that bug. |
I know, and that specific test case does work (there is a difference between v1.5.0 and v1.5.2). However, the example in #988 does not. You might want to try it out for yourself and add it to your test suite. This is an excerpt from my console session where I:
In both cases, task
|
Oh, I noticed that you have to set Anyway, the point I'm trying to make is that this "remaining task dumping" makes sense for parallel tasks too. I can't explain it better than I did above, or than the person who did it in #988. FWIW, I made a gist here that wraps |
This looks like a bug. We need a better test case for stopping after an error. |
I was under the impression that the behavior of
async.auto
was that if one of the tasks returned anerr
, the global callback would be called with this error and all subsequent tasks would not execute. After all, why would they? The global callback has been called so the error has been reported already.It turns out that only tasks that depend on the faulty task will not run, and the rest will.
I'm not sure if it makes sense for
async.auto
to report failure by means of a single global callback on one hand, and still run subsequent tasks on the other hand: as far as the client is concerned, the whole thing failed.The text was updated successfully, but these errors were encountered: