From fa22199260e4a7bde970a757b5a5b042f8563cfb Mon Sep 17 00:00:00 2001 From: Hilary James Oliver Date: Wed, 12 Jun 2024 05:31:53 +0000 Subject: [PATCH] tweak wf-s xtrig return --- cylc/flow/xtriggers/workflow_state.py | 4 ++-- tests/flakyfunctional/xtriggers/01-workflow_state.t | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cylc/flow/xtriggers/workflow_state.py b/cylc/flow/xtriggers/workflow_state.py index 0a353b7c9e9..ca0a96a9aed 100644 --- a/cylc/flow/xtriggers/workflow_state.py +++ b/cylc/flow/xtriggers/workflow_state.py @@ -53,7 +53,7 @@ def workflow_state( satisfied: True if ``satisfied`` else ``False``. result: - Dict {workflow_id, task_id, task_selector, flow_number}. + Dict {workflow_id, task_id, task_selector, flow_num}. """ poller = WorkflowPoller( @@ -76,7 +76,7 @@ def workflow_state( "workflow_id": poller.workflow_id, "task_id": f"{poller.cycle}/{poller.task}", "task_selector": poller.selector, - "flow_number": poller.flow_num + "flow_num": poller.flow_num } ) else: diff --git a/tests/flakyfunctional/xtriggers/01-workflow_state.t b/tests/flakyfunctional/xtriggers/01-workflow_state.t index 0beba420b79..ba456a91649 100644 --- a/tests/flakyfunctional/xtriggers/01-workflow_state.t +++ b/tests/flakyfunctional/xtriggers/01-workflow_state.t @@ -59,7 +59,7 @@ contains_ok "${JOB_LOG}" << __END__ upstream_workflow_id="${WORKFLOW_NAME_UPSTREAM}" upstream_task_id="2015/foo" upstream_task_selector="data_ready" - upstream_flow_number="1" + upstream_flow_num="1" __END__ # Check broadcast of xtrigger outputs is recorded: 1) in the workflow log... @@ -71,11 +71,11 @@ contains_ok "${WORKFLOW_LOG}" << __LOG_BROADCASTS__ ${LOG_INDENT}+ [2015/f1] [environment]upstream_workflow_id=${WORKFLOW_NAME_UPSTREAM} ${LOG_INDENT}+ [2015/f1] [environment]upstream_task_id=2015/foo ${LOG_INDENT}+ [2015/f1] [environment]upstream_task_selector=data_ready -${LOG_INDENT}+ [2015/f1] [environment]upstream_flow_number=1 +${LOG_INDENT}+ [2015/f1] [environment]upstream_flow_num=1 ${LOG_INDENT}- [2015/f1] [environment]upstream_workflow_id=${WORKFLOW_NAME_UPSTREAM} ${LOG_INDENT}- [2015/f1] [environment]upstream_task_id=2015/foo ${LOG_INDENT}- [2015/f1] [environment]upstream_task_selector=data_ready -${LOG_INDENT}- [2015/f1] [environment]upstream_flow_number=1 +${LOG_INDENT}- [2015/f1] [environment]upstream_flow_num=1 __LOG_BROADCASTS__ # ... and 2) in the DB. TEST_NAME="${TEST_NAME_BASE}-check-broadcast-in-db" @@ -91,11 +91,11 @@ contains_ok "${NAME}" << __DB_BROADCASTS__ +|2015|f1|[environment]upstream_workflow_id|${WORKFLOW_NAME_UPSTREAM} +|2015|f1|[environment]upstream_task_id|2015/foo +|2015|f1|[environment]upstream_task_selector|data_ready -+|2015|f1|[environment]upstream_flow_number|1 ++|2015|f1|[environment]upstream_flow_num|1 -|2015|f1|[environment]upstream_workflow_id|${WORKFLOW_NAME_UPSTREAM} -|2015|f1|[environment]upstream_task_id|2015/foo -|2015|f1|[environment]upstream_task_selector|data_ready --|2015|f1|[environment]upstream_flow_number|1 +-|2015|f1|[environment]upstream_flow_num|1 __DB_BROADCASTS__ purge