-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
semver: small improvementSmall improvement (will increment patch version)Small improvement (will increment patch version)
Description
Request criteria
- I searched the zppy GitHub Discussions to find a similar question and didn't find it.
- I searched the zppy documentation.
- This issue does not match the other templates (i.e., it is not a bug report, documentation request, feature request, or a question.)
Issue description
Currently, only tc_analysis.bash has set -e and even then, it is set a few lines down. set -e should be used so the scripts will immediately fail on any error.
Issue 1: I can't find the relevant messages/GitHub comments, but I seem to recall discussing this before and deciding against it because it would prevent us from being able to manually control error handling with blocks like this:
if [ $? != 0 ]; then
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test_e3sm_unified_1.12.0rc1_20251015/v3.LR.historical_0051/post/scripts
echo 'ERROR (3)' > climo_atm_monthly_180x360_aave_1985-1986.status
exit 3
fiI.e., the script would just error out and we wouldn't be able to update the status scripts. Perhaps a workaround would be to do:
set +e # Turn off exit-on-failure
<command we want to manually handle errors for>
<error handling block>
set -e # Turn exit-on-failure back onIssue 2: I also seem to remember that some tasks encounter errors that aren't ultimately job-ending. Therefore, the integration tests should be run set -e on, to confirm a successful run can still be made.
xylar
Metadata
Metadata
Assignees
Labels
semver: small improvementSmall improvement (will increment patch version)Small improvement (will increment patch version)