From 7e9f7d58e718b3efbdcad11d31c49da7a911e721 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 20 Apr 2023 14:14:34 +0200 Subject: [PATCH 1/6] first attempt to create progress file --- eb_hooks.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index df7742f999..dc888627f0 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -50,6 +50,12 @@ def parse_hook(ec, *args, **kwargs): # determine path to Prefix installation in compat layer via $EPREFIX eprefix = get_eessi_envvar('EPREFIX') + # write name of currently processed ec to _bot_jobJOBID.progress + job_progress_file = os.getenv('JOB_PROGRESS_FILE') + if job_progress_file: + with open(job_progress_file, "w") as jpf: + jpf.write(f"[PROGRESS]\nsummary = {ec.filename()}\n") + if ec.name in PARSE_HOOKS: PARSE_HOOKS[ec.name](ec, eprefix) From db0d03e8b03079e351820cdbae7277448ab2af63 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 20 Apr 2023 14:22:19 +0200 Subject: [PATCH 2/6] set env var for job progress file --- EESSI-pilot-install-software.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EESSI-pilot-install-software.sh b/EESSI-pilot-install-software.sh index 6c9fa3711d..bfa34831ed 100755 --- a/EESSI-pilot-install-software.sh +++ b/EESSI-pilot-install-software.sh @@ -151,6 +151,8 @@ esac echo "REQ_EB_VERSION=${REQ_EB_VERSION}" module avail 2>&1 | grep -i easybuild +export JOB_PROGRESS_FILE="_bot_job${SLURM_JOB_ID}.progress" + echo ">> Checking for EasyBuild module..." ml_av_easybuild_out=$TMPDIR/ml_av_easybuild.out module avail 2>&1 | grep -i easybuild/${REQ_EB_VERSION} &> ${ml_av_easybuild_out} From a5e2973c7de83334fe58685d10ca4f2aeec3f970 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 20 Apr 2023 14:23:04 +0200 Subject: [PATCH 3/6] stop processing after Qt5 --- EESSI-pilot-install-software.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EESSI-pilot-install-software.sh b/EESSI-pilot-install-software.sh index bfa34831ed..e439086613 100755 --- a/EESSI-pilot-install-software.sh +++ b/EESSI-pilot-install-software.sh @@ -289,6 +289,8 @@ fail_msg="Installation of Qt5 failed, that's frustrating..." $EB Qt5-5.14.1-GCCcore-9.3.0.eb --robot --disable-cleanup-tmpdir check_exit_code $? "${ok_msg}" "${fail_msg}" +exit 0 + # skip test step when installing SciPy-bundle on aarch64, # to dance around problem with broken numpy tests; # cfr. https://github.com/easybuilders/easybuild-easyconfigs/issues/11959 From 003c2b265e999ff40dd2c2f9a08375269f954e7f Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 20 Apr 2023 15:19:05 +0200 Subject: [PATCH 4/6] remove extra whitespaces --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index dc888627f0..d98e1b8bfd 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -55,7 +55,7 @@ def parse_hook(ec, *args, **kwargs): if job_progress_file: with open(job_progress_file, "w") as jpf: jpf.write(f"[PROGRESS]\nsummary = {ec.filename()}\n") - + if ec.name in PARSE_HOOKS: PARSE_HOOKS[ec.name](ec, eprefix) From ebb486be4cf7213d8b85f6950e954ff294425e65 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 20 Apr 2023 15:22:40 +0200 Subject: [PATCH 5/6] fix small bug when checking for tarball msg --- bot/check-result.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/check-result.sh b/bot/check-result.sh index 55276c405a..3f0c89ea21 100755 --- a/bot/check-result.sh +++ b/bot/check-result.sh @@ -112,9 +112,9 @@ grep_out=$(grep "${GP_no_missing}" ${job_dir}/${job_out}) [[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}" GP_tgz_created="tar.gz created!" +TARBALL= [[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_tgz_created}"'" grep_out=$(grep "${GP_tgz_created}" ${job_dir}/${job_out}) -TARBALL= if [[ $? -eq 0 ]]; then TGZ=1 TARBALL=$(echo ${grep_out} | sed -e 's@^.*\(eessi[^/ ]*\) .*$@\1@') From 34dabf6141326f12aa5832c613163117aadf559c Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 20 Apr 2023 15:31:36 +0200 Subject: [PATCH 6/6] avoid creating false positives --- bot/check-result.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/bot/check-result.sh b/bot/check-result.sh index 3f0c89ea21..e28ae4e38e 100755 --- a/bot/check-result.sh +++ b/bot/check-result.sh @@ -82,38 +82,42 @@ job_dir=${PWD} [[ ${VERBOSE} -ne 0 ]] && echo ">> analysing job in directory ${job_dir}" GP_slurm_out="slurm-${SLURM_JOB_ID}.out" -[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for job output file(s) matching '"${GP_slurm_out}"'" job_out=$(ls ${job_dir} | grep "${GP_slurm_out}") [[ $? -eq 0 ]] && SLURM=1 || SLURM=0 +# have to be careful to not add searched for pattern into slurm out file +[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for job output file(s) matching '"${GP_slurm_out}"'" [[ ${VERBOSE} -ne 0 ]] && echo " found slurm output file '"${job_out}"'" GP_error='ERROR: ' -[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_error}"'" grep_out=$(grep "${GP_error}" ${job_dir}/${job_out}) [[ $? -eq 0 ]] && ERROR=1 || ERROR=0 +# have to be careful to not add searched for pattern into slurm out file +[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_error}"'" [[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}" GP_failed='FAILED: ' -[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_failed}"'" grep_out=$(grep "${GP_failed}" ${job_dir}/${job_out}) [[ $? -eq 0 ]] && FAILED=1 || FAILED=0 +# have to be careful to not add searched for pattern into slurm out file +[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_failed}"'" [[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}" GP_req_missing=' required modules missing:' -[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_req_missing}"'" grep_out=$(grep "${GP_req_missing}" ${job_dir}/${job_out}) [[ $? -eq 0 ]] && MISSING=1 || MISSING=0 +# have to be careful to not add searched for pattern into slurm out file +[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_req_missing}"'" [[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}" GP_no_missing='No missing modules!' -[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_no_missing}"'" grep_out=$(grep "${GP_no_missing}" ${job_dir}/${job_out}) [[ $? -eq 0 ]] && NO_MISSING=1 || NO_MISSING=0 +# have to be careful to not add searched for pattern into slurm out file +[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_no_missing}"'" [[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}" GP_tgz_created="tar.gz created!" TARBALL= -[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_tgz_created}"'" grep_out=$(grep "${GP_tgz_created}" ${job_dir}/${job_out}) if [[ $? -eq 0 ]]; then TGZ=1 @@ -121,6 +125,8 @@ if [[ $? -eq 0 ]]; then else TGZ=0 fi +# have to be careful to not add searched for pattern into slurm out file +[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_tgz_created}"'" [[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}" [[ ${VERBOSE} -ne 0 ]] && echo "SUMMARY: ${job_dir}/${job_out}"