-
Notifications
You must be signed in to change notification settings - Fork 53
Fix exit status when errors occur in tasks in serial mode #283
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
Conversation
Previously, the code was not exiting with status 1 when a task failed.
|
@milenaveneziani, can you let me know if this fixes the problem you mentioned here? |
|
If so, we can merge it as normal into develop, merge develop into master and create a new tag. Or we can merge just this commit into master and develop both, and create a tag off of master. For the former, we would probably make that v0.6.5 and the latter v0.6.1 (since more has been added in the former case than just a quick bug fix, but maybe not enough for a minor version change). |
|
@xylar (and pinging @sterlingbaldwin here as well): if I test this on the command line (making one task fail on purpose by adding a random line to one code) and then I type Here is my simple bash script: do you have any idea? |
|
@milenaveneziani, so I think the problem with the above script is that $? is the exit status of the previous command, which includes the #!/bin/bash
./run_mpas_analysis.py config.beta3rc10.edison
status=$?
echo '***************'
echo $status
echo '***************'
if [ $status -ne 0 ]; then
echo
echo "Failed some ocean/ice diagnostics tasks"
exit 1
fi |
|
ok, that's embarassing. you are right @xylar. I also tried to change the climo start and end years inappropriately, but in that case I don't get exit status=1. I suppose that's because that is part of the setup_and_check phase? |
|
I believe that's right. If you break things during the |
|
If you'd like to change that behavior, we should probably create a new issue for that and a separate PR to address it. |
|
let's think about that a bit more. In the meantime, this is a great fix for the |
|
@milenaveneziani, do you want to merge just this commit into master or make a new tag that includes the recent python 3 work and such? |
|
Since it's only the python 3 commit (and not for example the changes in #282), I would just make a v0.65 tag like you suggested above. |
Previously, the code was not exiting with status 1 when a task failed.