Skip to content

Commit

Permalink
added output of error log of create_experiment.py in driver.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
TerryMcGuinness-NOAA committed Oct 24, 2023
1 parent e2c624d commit 6dfc2ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ci/scripts/driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ for pr in ${pr_list}; do
export pslot="${case}_${pr_sha}"
rm -Rf "${STMP}/RUNDIRS/${pslot}"
set +e
export LOGFILE_PATH="${HOMEgfs}/ci/scripts/create_experiment.log"
"${HOMEgfs}/workflow/create_experiment.py" --yaml "${HOMEgfs}/ci/cases/pr/${case}.yaml"
ci_status=$?
set -e
Expand All @@ -169,7 +170,7 @@ for pr in ${pr_list}; do
echo "Failed to create experiment: *FAIL* ${pslot}"
echo "Experiment setup: failed at $(date) for experiment ${pslot}" || true
echo ""
cat "${HOMEgfs}/ci/scripts/"setup_*.std*
cat "${LOGFILE_PATH}"
} >> "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
"${GH}" pr edit "${pr}" --repo "${REPO_URL}" --remove-label "CI-${MACHINE_ID^}-Building" --add-label "CI-${MACHINE_ID^}-Failed"
"${ROOT_DIR}/ci/scripts/pr_list_database.py" --remove_pr "${pr}" --dbfile "${pr_list_dbfile}"
Expand Down
2 changes: 1 addition & 1 deletion workflow/create_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
_top = os.path.abspath(os.path.join(os.path.abspath(_here), '..'))

# Setup the logger
logger = Logger(level=os.environ.get("LOGGING_LEVEL", "INFO"), colored_log=True)
logger = Logger(logfile_path=os.environ.get("LOGFILE_PATH"), level=os.environ.get("LOGGING_LEVEL", "DEBUG"), colored_log=True)


@logit(logger)
Expand Down

0 comments on commit 6dfc2ef

Please sign in to comment.