Skip to content
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

error handling #29

Open
eccles opened this issue Oct 23, 2019 · 1 comment
Open

error handling #29

eccles opened this issue Oct 23, 2019 · 1 comment

Comments

@eccles
Copy link

eccles commented Oct 23, 2019

Not a bug but a request.

I would like to know the error status of all parallel jobs as a list that I can inspect in a shell to determine which has failed.

Also rush should exit with non-zero error code for:

  1. if any of the parallel jobs has failed.
  2. If all parallel jobs have failed - i.e if any of the jobs has succeeded rush reports zero

IS this possible using the current implementation ? My reading of the docs indicates not so.

@bburgin
Copy link

bburgin commented Oct 23, 2019

You could try specifying the -C argument. It will cause rush to write successes out to a file. You should be able to inspect the file to deduce which calls succeeded and thus which ones failed. Please ensure you are not specifying -e, --stop-on-error, so that rush will try each command before exiting.

For your request 1. above, rush should already be doing this. By default, rush has --propagate-exit-status enabled, which will cause it to propagate a failing child exit code up as rush's exit code. By looking at rush's exit code, you should be able to know that a child failed or not.

For your request 2. above, what is your specific use case?
a. Are you wanting to do trials of the same child command? Or run different commands?
b. Are you wanting to keep the first that succeeds and cancel the rest? Or stop after first error? Or run all to completion? (keep the results of any that succeed or fail?)

There are many possible combinations of behaviors. Without knowing your use case, it is hard to know if rush can/should do it or not. Also, I doubt rush will be able to cover all combinations.
Currently, rush only runs commands to completion or stops after first error (-e, --stop-on-error).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants