From 26067950d69b69d5a4d08e60742b04d263a121bd Mon Sep 17 00:00:00 2001 From: JP Bourget Date: Wed, 8 Apr 2020 01:33:15 -0400 Subject: [PATCH 01/10] try to support tooz in EL8/py3 --- CHANGELOG.rst | 1 + fixed-requirements.txt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4f3c9cc863..2627a0b4fa 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -60,6 +60,7 @@ Changed * Use ``pip-compile`` from ``pip-tools`` instead of ``pip-conflict-checker`` (improvement) #4896 * Refactor how inbound criteria for join task in orquesta workflow is evaluated to count by task completion instead of task transition. (improvement) +* Update tooz to v2.3.0 to apply fix for consul coordination session timeout (@punkrokk) Fixed ~~~~~ diff --git a/fixed-requirements.txt b/fixed-requirements.txt index 661910fc75..67697148a0 100644 --- a/fixed-requirements.txt +++ b/fixed-requirements.txt @@ -41,7 +41,8 @@ six==1.13.0 # NOTE: sseclient has various issues which sometimes hang the connection for a long time, etc. sseclient-py==1.7 stevedore==1.30.1 -tooz==1.66.1 +tooz==1.66.1; python_version <= '2.7' +tooz==2.3.0; python_version >= '3.6' # Note: We use latest version of virtualenv which uses pip 19 virtualenv==16.6.0 webob==1.8.5 From 71ac08db29a8cf94358601eeae64b94a2370b332 Mon Sep 17 00:00:00 2001 From: JP Bourget Date: Wed, 8 Apr 2020 01:41:05 -0400 Subject: [PATCH 02/10] fix Changelog descr --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2627a0b4fa..c04b982748 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -60,7 +60,7 @@ Changed * Use ``pip-compile`` from ``pip-tools`` instead of ``pip-conflict-checker`` (improvement) #4896 * Refactor how inbound criteria for join task in orquesta workflow is evaluated to count by task completion instead of task transition. (improvement) -* Update tooz to v2.3.0 to apply fix for consul coordination session timeout (@punkrokk) +* Updated and tested tooz to v2.3.0 to apply fix for consul coordination heartbeat (@punkrokk) Fixed ~~~~~ From e4c056ed791ace2c9e8e539503620930be8a80d3 Mon Sep 17 00:00:00 2001 From: Marcel Weinberg Date: Sat, 23 Jan 2021 00:16:10 +0100 Subject: [PATCH 03/10] Remove tooz dependency for Py2 and bump tooz for Py3 to the latest release --- fixed-requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fixed-requirements.txt b/fixed-requirements.txt index 67697148a0..2317626b71 100644 --- a/fixed-requirements.txt +++ b/fixed-requirements.txt @@ -41,8 +41,7 @@ six==1.13.0 # NOTE: sseclient has various issues which sometimes hang the connection for a long time, etc. sseclient-py==1.7 stevedore==1.30.1 -tooz==1.66.1; python_version <= '2.7' -tooz==2.3.0; python_version >= '3.6' +tooz==2.8.0; python_version >= '3.6' # Note: We use latest version of virtualenv which uses pip 19 virtualenv==16.6.0 webob==1.8.5 From 540cd834447079575afe1f9dc78b95dd5ddb9deb Mon Sep 17 00:00:00 2001 From: Marcel Weinberg Date: Sat, 23 Jan 2021 00:19:35 +0100 Subject: [PATCH 04/10] Update changelog for the tooz update --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c04b982748..a996969bcb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -60,7 +60,7 @@ Changed * Use ``pip-compile`` from ``pip-tools`` instead of ``pip-conflict-checker`` (improvement) #4896 * Refactor how inbound criteria for join task in orquesta workflow is evaluated to count by task completion instead of task transition. (improvement) -* Updated and tested tooz to v2.3.0 to apply fix for consul coordination heartbeat (@punkrokk) +* Updated and tested tooz to v2.8.0 to apply fix for consul coordination heartbeat (@punkrokk @winem) Fixed ~~~~~ From 68a15ed3d91a064a763c9f1a7f52c6d8feb87c8d Mon Sep 17 00:00:00 2001 From: Marcel Weinberg Date: Sat, 23 Jan 2021 00:27:16 +0100 Subject: [PATCH 05/10] Remove unnecessary Py3 condition on the tooz requirements --- fixed-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixed-requirements.txt b/fixed-requirements.txt index 2317626b71..5a8b18df59 100644 --- a/fixed-requirements.txt +++ b/fixed-requirements.txt @@ -41,7 +41,7 @@ six==1.13.0 # NOTE: sseclient has various issues which sometimes hang the connection for a long time, etc. sseclient-py==1.7 stevedore==1.30.1 -tooz==2.8.0; python_version >= '3.6' +tooz==2.8.0 # Note: We use latest version of virtualenv which uses pip 19 virtualenv==16.6.0 webob==1.8.5 From 8cf3616735385af73957b72cd3a39e4a5f443bf1 Mon Sep 17 00:00:00 2001 From: Marcel Weinberg Date: Sat, 23 Jan 2021 00:27:55 +0100 Subject: [PATCH 06/10] Add PR# to the tooz changelog entry --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a996969bcb..924519f80f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -60,7 +60,7 @@ Changed * Use ``pip-compile`` from ``pip-tools`` instead of ``pip-conflict-checker`` (improvement) #4896 * Refactor how inbound criteria for join task in orquesta workflow is evaluated to count by task completion instead of task transition. (improvement) -* Updated and tested tooz to v2.8.0 to apply fix for consul coordination heartbeat (@punkrokk @winem) +* Updated and tested tooz to v2.8.0 to apply fix for consul coordination heartbeat (@punkrokk @winem) #5121 Fixed ~~~~~ From 629865e34d3aedb1b1bbc533bd48071ab4aa5068 Mon Sep 17 00:00:00 2001 From: blag Date: Fri, 22 Jan 2021 21:35:58 -0700 Subject: [PATCH 07/10] Remove Mistral from st2-track-result --- st2common/bin/st2-track-result | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/st2common/bin/st2-track-result b/st2common/bin/st2-track-result index 44a33cc1d6..63c0502d3e 100755 --- a/st2common/bin/st2-track-result +++ b/st2common/bin/st2-track-result @@ -52,13 +52,6 @@ def add_result_tracker(exec_id): # Check runner type. runner_type = exec_db.action.get('runner_type') - # Although mistral runner is removed, we want to leave in the result - # tracker so it can be enabled for other runners easily. Adjust this - # if when runners that support result tracker are added. - if runner_type != 'mistral-v2': - LOG.error('Result tracker is only supported for Mistral workflows.') - return - # Skip if action execution is completed. if exec_db.status in action_constants.LIVEACTION_COMPLETED_STATES: LOG.info('Action execution "%s" is already in a completed state.', exec_id) @@ -85,13 +78,6 @@ def add_result_tracker(exec_id): except Exception as e: LOG.error('Unable to create result tracker entry for "%s". %s', exec_id, str(e)) - # Add result tracker for children workflows. - for child_exec_id in exec_db.children: - child_exec = ActionExecution.get(id=child_exec_id, raise_exception=True) - if child_exec.runner['name'] == 'mistral-v2': - LOG.info('Adding result tracker for children "%s"...', child_exec_id) - add_result_tracker(child_exec_id) - def del_result_tracker(exec_id): LOG.info('Retrieving action execution record...') From 4eaf3f4945b9186f2d3b06bc041cee5f09095145 Mon Sep 17 00:00:00 2001 From: blag Date: Fri, 22 Jan 2021 22:21:21 -0700 Subject: [PATCH 08/10] Update oslo.utils to 4.x --- fixed-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixed-requirements.txt b/fixed-requirements.txt index 906ab4135a..39f8c9f709 100644 --- a/fixed-requirements.txt +++ b/fixed-requirements.txt @@ -24,7 +24,7 @@ networkx==1.11 # NOTE: Recent version substantially affect the performance and add big import time overhead # See https://github.com/StackStorm/st2/issues/4160#issuecomment-394386433 for details oslo.config>=1.12.1,<1.13 -oslo.utils>=3.36.2,<=3.37.0 +oslo.utils<5.0,>=4.0.0 paramiko==2.7.1 passlib==1.7.1 prance==0.9.0 From 17e2e0f3e4e4489426651aa79c13f219b4d73525 Mon Sep 17 00:00:00 2001 From: blag Date: Fri, 22 Jan 2021 22:21:41 -0700 Subject: [PATCH 09/10] Update requirements files --- requirements.txt | 4 ++-- st2actions/requirements.txt | 2 +- st2api/requirements.txt | 2 +- st2common/requirements.txt | 2 +- st2stream/requirements.txt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5dc0bb6729..bd092ab853 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,7 +37,7 @@ nose nose-parallel==0.3.1 nose-timer==0.7.5 oslo.config<1.13,>=1.12.1 -oslo.utils<=3.37.0,>=3.36.2 +oslo.utils<5.0,>=4.0.0 paramiko==2.7.1 passlib==1.7.1 prettytable @@ -62,7 +62,7 @@ simplejson six==1.13.0 sseclient-py==1.7 stevedore==1.30.1 -tooz==1.66.1 +tooz==2.8.0 ujson==1.35 unittest2 webob==1.8.5 diff --git a/st2actions/requirements.txt b/st2actions/requirements.txt index 987fbddc9d..2ef4e057a8 100755 --- a/st2actions/requirements.txt +++ b/st2actions/requirements.txt @@ -14,7 +14,7 @@ jinja2==2.10.3 kombu==4.6.6 lockfile==0.12.2 oslo.config<1.13,>=1.12.1 -oslo.utils<=3.37.0,>=3.36.2 +oslo.utils<5.0,>=4.0.0 pyinotify==0.9.6 ; platform_system == "Linux" python-dateutil==2.8.0 python-json-logger diff --git a/st2api/requirements.txt b/st2api/requirements.txt index 051999210c..e9f8dca18f 100644 --- a/st2api/requirements.txt +++ b/st2api/requirements.txt @@ -11,7 +11,7 @@ jsonschema==2.6.0 kombu==4.6.6 mongoengine==0.18.2 oslo.config<1.13,>=1.12.1 -oslo.utils<=3.37.0,>=3.36.2 +oslo.utils<5.0,>=4.0.0 pymongo==3.10.0 simplejson six==1.13.0 diff --git a/st2common/requirements.txt b/st2common/requirements.txt index fe9e8732fa..8c5602adcc 100644 --- a/st2common/requirements.txt +++ b/st2common/requirements.txt @@ -35,7 +35,7 @@ retrying==1.3.3 routes==2.4.1 semver==2.9.0 six==1.13.0 -tooz==1.66.1 +tooz==2.8.0 ujson==1.35 webob==1.8.5 zake==0.2.2 diff --git a/st2stream/requirements.txt b/st2stream/requirements.txt index 7a920a843f..fe3cbd71d7 100644 --- a/st2stream/requirements.txt +++ b/st2stream/requirements.txt @@ -11,6 +11,6 @@ jsonschema==2.6.0 kombu==4.6.6 mongoengine==0.18.2 oslo.config<1.13,>=1.12.1 -oslo.utils<=3.37.0,>=3.36.2 +oslo.utils<5.0,>=4.0.0 pymongo==3.10.0 six==1.13.0 From 1aab6ab90a5cbc9c4467663d8527ab34aff332c6 Mon Sep 17 00:00:00 2001 From: blag Date: Fri, 22 Jan 2021 23:12:05 -0700 Subject: [PATCH 10/10] Don't touch st2-track-result --- st2common/bin/st2-track-result | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/st2common/bin/st2-track-result b/st2common/bin/st2-track-result index 63c0502d3e..44a33cc1d6 100755 --- a/st2common/bin/st2-track-result +++ b/st2common/bin/st2-track-result @@ -52,6 +52,13 @@ def add_result_tracker(exec_id): # Check runner type. runner_type = exec_db.action.get('runner_type') + # Although mistral runner is removed, we want to leave in the result + # tracker so it can be enabled for other runners easily. Adjust this + # if when runners that support result tracker are added. + if runner_type != 'mistral-v2': + LOG.error('Result tracker is only supported for Mistral workflows.') + return + # Skip if action execution is completed. if exec_db.status in action_constants.LIVEACTION_COMPLETED_STATES: LOG.info('Action execution "%s" is already in a completed state.', exec_id) @@ -78,6 +85,13 @@ def add_result_tracker(exec_id): except Exception as e: LOG.error('Unable to create result tracker entry for "%s". %s', exec_id, str(e)) + # Add result tracker for children workflows. + for child_exec_id in exec_db.children: + child_exec = ActionExecution.get(id=child_exec_id, raise_exception=True) + if child_exec.runner['name'] == 'mistral-v2': + LOG.info('Adding result tracker for children "%s"...', child_exec_id) + add_result_tracker(child_exec_id) + def del_result_tracker(exec_id): LOG.info('Retrieving action execution record...')