From 350c121ea6a606adcb81d0e4fe512f212e57e487 Mon Sep 17 00:00:00 2001 From: David Rohr Date: Fri, 28 Mar 2025 15:48:10 +0100 Subject: [PATCH] Detector workflows might query consul/apricot for QC without requesting WORKFLOW_PARAMETERS=QC --- DATA/common/gen_topo_helper_functions.sh | 6 +++--- DATA/production/qc-workflow.sh | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/DATA/common/gen_topo_helper_functions.sh b/DATA/common/gen_topo_helper_functions.sh index 6791d797c..e24b8553c 100755 --- a/DATA/common/gen_topo_helper_functions.sh +++ b/DATA/common/gen_topo_helper_functions.sh @@ -262,7 +262,7 @@ add_W() # Add binarry to workflow command USAGE: add_W [BINARY] [COMMAND_LINE_OP WORKFLOW+=$WFADD } -if [[ ${EPNSYNCMODE:-0} == 1 && "${WORKFLOW_PARAMETERS:-}" =~ (^|,)"QC"(,|$) ]]; then +if [[ ${EPNSYNCMODE:-0} == 1 ]]; then if [[ "${GEN_TOPO_DEPLOYMENT_TYPE:-}" == "ALICE_STAGING" ]]; then GEN_TOPO_QC_CONSUL_SERVER=ali-staging.cern.ch else @@ -277,7 +277,7 @@ add_QC_from_consul() if [[ ! -z ${GEN_TOPO_QC_JSON_FILE:-} ]]; then curl -s -o $GEN_TOPO_QC_JSON_FILE "http://${GEN_TOPO_QC_CONSUL_SERVER}:8500/v1/kv${1}?raw" if [[ $? != 0 ]]; then - echo "Error fetching QC JSON $1" + echo "Error fetching QC JSON $1 (1)" 1>&2 exit 1 fi QC_CONFIG_ARG="json://${GEN_TOPO_QC_JSON_FILE}" @@ -297,7 +297,7 @@ add_QC_from_apricot() curl -s -o $GEN_TOPO_QC_JSON_FILE "${GEN_TOPO_QC_APRICOT_SERVER}/${1}?process=true" fi if [[ $? != 0 ]]; then - echo "Error fetching QC JSON $1" + echo "Error fetching QC JSON $1 (2)" 1>&2 exit 1 fi QC_CONFIG_ARG="json://${GEN_TOPO_QC_JSON_FILE}" diff --git a/DATA/production/qc-workflow.sh b/DATA/production/qc-workflow.sh index 1bd6b5811..73681c709 100755 --- a/DATA/production/qc-workflow.sh +++ b/DATA/production/qc-workflow.sh @@ -24,7 +24,7 @@ add_QC_JSON() { TMP_FILENAME=$FETCHTMPDIR/$1.$RANDOM.$RANDOM.json curl -s -o $TMP_FILENAME "http://${GEN_TOPO_QC_CONSUL_SERVER}:8500/v1/kv/${2/consul:\/\//}?raw" if [[ $? != 0 ]]; then - echo "Error fetching QC JSON $2" 1>&2 + echo "Error fetching QC JSON $2 (3)" 1>&2 exit 1 fi elif [[ ${2} =~ ^apricot://.* ]]; then @@ -35,9 +35,9 @@ add_QC_JSON() { else curl -s -o $TMP_FILENAME "${GEN_TOPO_QC_APRICOT_SERVER}/${2/apricot:\/\/o2\//}?run_type=${RUNTYPE:-}\&beam_type=${BEAMTYPE:-}\&process=true" fi - + if [[ $? != 0 ]]; then - echo "Error fetching QC JSON $2" 1>&2 + echo "Error fetching QC JSON $2 (4)" 1>&2 exit 1 fi else @@ -198,7 +198,7 @@ elif [[ -z ${QC_JSON_FROM_OUTSIDE:-} ]]; then else QC_JSON_ZDC=$O2DPG_ROOT/DATA/production/qc-async/zdc.json fi - fi + fi if [[ -z "${QC_JSON_EMC:-}" ]]; then if [[ "$BEAMTYPE" == "PbPb" ]]; then QC_JSON_EMC=$O2DPG_ROOT/DATA/production/qc-async/emc_PbPb.json @@ -272,7 +272,7 @@ elif [[ -z ${QC_JSON_FROM_OUTSIDE:-} ]]; then if [[ $i == "PRIMVTX" ]] && ! has_detector_reco ITS; then continue; fi if [[ $i == "ITSTPC" ]] && ! has_detectors_reco ITS TPC; then continue; fi add_QC_JSON GLO_$i ${!DET_JSON_FILE} - + if [[ $i == "ITSTPC" ]]; then LOCAL_FILENAME=${JSON_FILES//*\ /} # replace the input sources depending on the detector compostition and matching detectors