Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstandard compression for parameters and results #5995

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
e6680e4
initial zstandard compression for parameters and results; also remove…
guzzijones Jun 22, 2023
4ffe612
fix test_executions_fixtures.py tests
guzzijones Jun 23, 2023
10d0be6
index liveaction
guzzijones Jun 23, 2023
d9acc79
fix action_chain unit testing
guzzijones Jun 23, 2023
155a2b2
fix execution1.yaml fixture for rule enforcement testing
guzzijones Jun 23, 2023
d68660b
black reformat, fix log format string
guzzijones Jun 23, 2023
b1083f6
fix test_garbage_collector.py integration test
guzzijones Jun 23, 2023
354108b
black formatting
guzzijones Jun 23, 2023
5e3779b
black fixes for contrib
guzzijones Jun 23, 2023
5be68a1
fix lint errors
guzzijones Jun 23, 2023
8cad290
fix migration test for 3.5
guzzijones Jul 3, 2023
c65b90b
black format v35 unit test
guzzijones Jul 3, 2023
3a9d22d
set actual byte size in result_size field instead of compressed size
guzzijones Jul 3, 2023
9aeb080
setting maxDiff to see errors
guzzijones Jul 3, 2023
3903313
remove traceback
guzzijones Jul 3, 2023
1efd870
change log entry
guzzijones Jul 3, 2023
b9e8c1c
use errors list instead of original execution.errors
guzzijones Jul 3, 2023
61e976d
test each error individually
guzzijones Jul 3, 2023
18d5343
benchmarks and integration test
guzzijones Jul 5, 2023
33ae861
black fixes
guzzijones Jul 5, 2023
c6a07a2
fix lint error
guzzijones Jul 5, 2023
7d8a4a8
fix output in integration test
guzzijones Jul 5, 2023
84bd96d
add migration for liveaction
guzzijones Jul 5, 2023
bcc5b0e
remove sym link migration
guzzijones Jul 5, 2023
3123fac
add migration script for execution db liveaction
guzzijones Jul 5, 2023
12ac1cc
add config option to turn off zstandard compression
guzzijones Jul 6, 2023
fb1872d
black formatting
guzzijones Jul 6, 2023
20283bd
fix version on migration script
guzzijones Jul 6, 2023
f4c5b42
update sample config
guzzijones Jul 6, 2023
05970fa
initial header compression
guzzijones Jul 13, 2023
dd1c768
add new conf setting for zstandard
guzzijones Jul 13, 2023
b09b01e
add ability to change compression via config setting
guzzijones Jul 13, 2023
9a0e74f
black changes
guzzijones Jul 13, 2023
08f018c
change liveaction to liveaction_id; also move inquiry mask code into …
guzzijones Jul 14, 2023
97a53dd
remove liveaction from action execution api
guzzijones Jul 14, 2023
f12b829
Update st2common/bin/migrations/v3.9/st2-migrate-liveaction-executiondb
guzzijones Jul 14, 2023
6bca0bd
Update st2common/bin/migrations/v3.9/st2-migrate-liveaction-executiondb
guzzijones Jul 14, 2023
de4bad1
black fixes
guzzijones Jul 14, 2023
f08e2bf
untested migration script
guzzijones Jul 14, 2023
461e58e
flake fixes
guzzijones Jul 14, 2023
4b6f7b8
fix test actionchain liveaction
guzzijones Jul 14, 2023
babe63f
import fixes
guzzijones Jul 14, 2023
cd5fc5d
fix inquiry ttl liveaction_id
guzzijones Jul 14, 2023
3e3a9b7
zipp <=3.16 for python 3.6 compatibility
guzzijones Jul 14, 2023
98952aa
pin zipp < 3.16
guzzijones Jul 14, 2023
f948b96
liveaction return inside actionexecution api
guzzijones Jul 17, 2023
92b855f
fix unit tests to allow embedded liveaction
guzzijones Jul 17, 2023
ab33556
fix stream test
guzzijones Jul 17, 2023
2d0ca55
add back array params test for alias execution
guzzijones Jul 17, 2023
e34e3a5
migration script change
guzzijones Jul 17, 2023
eb2bbb5
compress and uncompress methods
guzzijones Jul 19, 2023
4e14d55
Update st2common/st2common/models/api/execution.py
guzzijones Jul 18, 2023
b7b3150
fix import error compress and uncompress
guzzijones Jul 19, 2023
af8bc86
add test for st2.inquiry.respond secret masking
guzzijones Jul 19, 2023
f189711
black formatting fix
guzzijones Jul 19, 2023
c81a131
lint fixes
guzzijones Jul 19, 2023
53b9e59
fix migration
guzzijones Jul 19, 2023
88590bc
add inheritance
guzzijones Jul 19, 2023
64bfefa
pymongo query for setting liveaction id
guzzijones Jul 19, 2023
e3a2df9
working migration script
guzzijones Jul 19, 2023
0d3b882
black fix
guzzijones Jul 19, 2023
ff00138
add required fields for liveaction in case where liveaction cannot be…
guzzijones Jul 19, 2023
84df1ab
remove breakpoint
guzzijones Jul 19, 2023
645acb5
migrate paused inquiries
guzzijones Jul 31, 2023
e640f1b
Update st2common/st2common/fields.py
guzzijones Jul 23, 2023
68a844b
black fix migration script
guzzijones Aug 2, 2023
92ae379
add pending actions to cover inquiries to migration
guzzijones Oct 10, 2023
798bd78
black and lint fixes
guzzijones Oct 10, 2023
19bcf81
make requirements
guzzijones Nov 19, 2024
2720022
fix test hanging due to monkey patch needed
guzzijones Nov 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Changelog

in development
--------------
* implemented zstandard compression for parameters and results. #5995
contributed by @guzzijones12

* removed embedded liveaction in action execution database table #5995
contributed by @guzzijones12

Python 3.6 is no longer supported; Stackstorm requires at least Python 3.8.

Expand Down
3 changes: 3 additions & 0 deletions conf/st2.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ connection_timeout = 3000
db_name = st2
# host of db server
host = 127.0.0.1
# compression for parameter and result storage in liveaction and execution models
# Valid values: zstandard, none
parameter_result_compression = zstandard
# password for db login
password = None
# port of db server
Expand Down
1 change: 1 addition & 0 deletions conf/st2.dev.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Config used by local development environment (tools/launch.dev.sh)
[database]
host = 127.0.0.1
parameter_result_compression = zstandard

[api]
# Host and port to bind the API server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def cancel(self):
and child_exec.status in action_constants.LIVEACTION_CANCELABLE_STATES
):
action_service.request_cancellation(
LiveAction.get(id=child_exec.liveaction["id"]),
LiveAction.get(id=child_exec.liveaction_id),
self.context.get("user", None),
)

Expand All @@ -353,7 +353,7 @@ def pause(self):
and child_exec.status == action_constants.LIVEACTION_STATUS_RUNNING
):
action_service.request_pause(
LiveAction.get(id=child_exec.liveaction["id"]),
LiveAction.get(id=child_exec.liveaction_id),
self.context.get("user", None),
)

Expand Down Expand Up @@ -966,7 +966,7 @@ def _format_action_exec_result(

execution_db = None
if liveaction_db:
execution_db = ActionExecution.get(liveaction__id=str(liveaction_db.id))
execution_db = ActionExecution.get(liveaction_id=str(liveaction_db.id))

result["id"] = action_node.name
result["name"] = action_node.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def test_chain_cancel_cascade_to_subworkflow(self):

# Wait until the subworkflow is running.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_on_status(
task1_live, action_constants.LIVEACTION_STATUS_RUNNING
)
Expand All @@ -189,7 +189,7 @@ def test_chain_cancel_cascade_to_subworkflow(self):

# Wait until the subworkflow is canceling.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_on_status(
task1_live, action_constants.LIVEACTION_STATUS_CANCELING
)
Expand All @@ -206,7 +206,7 @@ def test_chain_cancel_cascade_to_subworkflow(self):

# Wait until the subworkflow is canceled.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_on_status(
task1_live, action_constants.LIVEACTION_STATUS_CANCELED
)
Expand Down Expand Up @@ -248,7 +248,7 @@ def test_chain_cancel_cascade_to_parent_workflow(self):

# Wait until the subworkflow is running.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_on_status(
task1_live, action_constants.LIVEACTION_STATUS_RUNNING
)
Expand All @@ -260,7 +260,7 @@ def test_chain_cancel_cascade_to_parent_workflow(self):

# Wait until the subworkflow is canceling.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_on_status(
task1_live, action_constants.LIVEACTION_STATUS_CANCELING
)
Expand All @@ -271,7 +271,7 @@ def test_chain_cancel_cascade_to_parent_workflow(self):

# Wait until the subworkflow is canceled.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_on_status(
task1_live, action_constants.LIVEACTION_STATUS_CANCELED
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def test_skip_notify_for_task_with_notify(self):

# Assert task1 notify is skipped
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_on_status(
task1_live, action_constants.LIVEACTION_STATUS_SUCCEEDED
)
Expand All @@ -162,7 +162,7 @@ def test_skip_notify_for_task_with_notify(self):

# Assert task2 notify is not skipped
task2_exec = ActionExecution.get_by_id(execution.children[1])
task2_live = LiveAction.get_by_id(task2_exec.liveaction["id"])
task2_live = LiveAction.get_by_id(task2_exec.liveaction_id)
notify = notify_api_models.NotificationsHelper.from_model(
notify_model=task2_live.notify
)
Expand All @@ -186,7 +186,7 @@ def test_skip_notify_default_for_task_with_notify(self):

# Assert task1 notify is set.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_on_status(
task1_live, action_constants.LIVEACTION_STATUS_SUCCEEDED
)
Expand All @@ -200,7 +200,7 @@ def test_skip_notify_default_for_task_with_notify(self):

# Assert task2 notify is not skipped by default.
task2_exec = ActionExecution.get_by_id(execution.children[1])
task2_live = LiveAction.get_by_id(task2_exec.liveaction["id"])
task2_live = LiveAction.get_by_id(task2_exec.liveaction_id)
self.assertIsNone(task2_live.notify)
MockLiveActionPublisherNonBlocking.wait_all()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def test_chain_pause_resume_cascade_to_subworkflow(self):

# Wait until the subworkflow is running.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_for_status(
task1_live, action_constants.LIVEACTION_STATUS_RUNNING
)
Expand All @@ -452,7 +452,7 @@ def test_chain_pause_resume_cascade_to_subworkflow(self):

# Wait until the subworkflow is pausing.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_for_status(
task1_live, action_constants.LIVEACTION_STATUS_PAUSING
)
Expand All @@ -477,7 +477,7 @@ def test_chain_pause_resume_cascade_to_subworkflow(self):

# Wait until the subworkflow is paused.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_for_status(
task1_live, action_constants.LIVEACTION_STATUS_PAUSED
)
Expand Down Expand Up @@ -548,7 +548,7 @@ def test_chain_pause_resume_cascade_to_parent_workflow(self):

# Wait until the subworkflow is running.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_for_status(
task1_live, action_constants.LIVEACTION_STATUS_RUNNING
)
Expand All @@ -559,7 +559,7 @@ def test_chain_pause_resume_cascade_to_parent_workflow(self):

# Wait until the subworkflow is pausing.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_for_status(
task1_live, action_constants.LIVEACTION_STATUS_PAUSING
)
Expand All @@ -574,7 +574,7 @@ def test_chain_pause_resume_cascade_to_parent_workflow(self):

# Wait until the subworkflow is paused.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_for_status(
task1_live, action_constants.LIVEACTION_STATUS_PAUSED
)
Expand Down Expand Up @@ -611,7 +611,7 @@ def test_chain_pause_resume_cascade_to_parent_workflow(self):

# Wait until the subworkflow is paused.
task1_exec = ActionExecution.get_by_id(execution.children[0])
task1_live = LiveAction.get_by_id(task1_exec.liveaction["id"])
task1_live = LiveAction.get_by_id(task1_exec.liveaction_id)
task1_live = self._wait_for_status(
task1_live, action_constants.LIVEACTION_STATUS_SUCCEEDED
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def pre_run(self):

def run(self, action_parameters):
liveaction_db = action_utils.get_liveaction_by_id(self.liveaction_id)
exc = ex_db_access.ActionExecution.get(liveaction__id=str(liveaction_db.id))
exc = ex_db_access.ActionExecution.get(liveaction_id=str(liveaction_db.id))

# Assemble and dispatch trigger
trigger_ref = sys_db_models.ResourceReference.to_string_reference(
Expand Down
20 changes: 15 additions & 5 deletions contrib/runners/orquesta_runner/orquesta_runner/orquesta_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,22 @@ def start_workflow(self, action_parameters):
wf_def, self.execution, st2_ctx, notify_cfg=notify_cfg
)
except wf_exc.WorkflowInspectionError as e:
_, ex, tb = sys.exc_info()
status = ac_const.LIVEACTION_STATUS_FAILED
result = {"errors": e.args[1], "output": None}
result = {
"errors": e.args[1],
"output": None,
"traceback": "".join(traceback.format_tb(tb, 20)),
guzzijones marked this conversation as resolved.
Show resolved Hide resolved
}
return (status, result, self.context)
except Exception as e:
_, ex, tb = sys.exc_info()
status = ac_const.LIVEACTION_STATUS_FAILED
result = {"errors": [{"message": six.text_type(e)}], "output": None}
result = {
"errors": [{"message": six.text_type(e)}],
"output": None,
"traceback": "".join(traceback.format_tb(tb, 20)),
}
return (status, result, self.context)

return self._handle_workflow_return_value(wf_ex_db)
Expand Down Expand Up @@ -178,7 +188,7 @@ def pause(self):
child_ex = ex_db_access.ActionExecution.get(id=child_ex_id)
if self.task_pauseable(child_ex):
ac_svc.request_pause(
lv_db_access.LiveAction.get(id=child_ex.liveaction["id"]),
lv_db_access.LiveAction.get(id=child_ex.liveaction_id),
self.context.get("user", None),
)

Expand Down Expand Up @@ -209,7 +219,7 @@ def resume(self):
child_ex = ex_db_access.ActionExecution.get(id=child_ex_id)
if self.task_resumeable(child_ex):
ac_svc.request_resume(
lv_db_access.LiveAction.get(id=child_ex.liveaction["id"]),
lv_db_access.LiveAction.get(id=child_ex.liveaction_id),
self.context.get("user", None),
)

Expand Down Expand Up @@ -270,7 +280,7 @@ def cancel(self):
child_ex = ex_db_access.ActionExecution.get(id=child_ex_id)
if self.task_cancelable(child_ex):
ac_svc.request_cancellation(
lv_db_access.LiveAction.get(id=child_ex.liveaction["id"]),
lv_db_access.LiveAction.get(id=child_ex.liveaction_id),
self.context.get("user", None),
)

Expand Down
20 changes: 10 additions & 10 deletions contrib/runners/orquesta_runner/tests/unit/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def test_run_workflow(self):
tk1_ac_ex_db = ex_db_access.ActionExecution.query(
task_execution=str(tk1_ex_db.id)
)[0]
tk1_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk1_ac_ex_db.liveaction["id"])
tk1_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk1_ac_ex_db.liveaction_id)
self.assertEqual(tk1_lv_ac_db.context.get("user"), username)
self.assertEqual(tk1_lv_ac_db.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)
self.assertTrue(wf_svc.is_action_execution_under_workflow_context(tk1_ac_ex_db))
Expand All @@ -205,7 +205,7 @@ def test_run_workflow(self):
tk2_ac_ex_db = ex_db_access.ActionExecution.query(
task_execution=str(tk2_ex_db.id)
)[0]
tk2_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk2_ac_ex_db.liveaction["id"])
tk2_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk2_ac_ex_db.liveaction_id)
self.assertEqual(tk2_lv_ac_db.context.get("user"), username)
self.assertEqual(tk2_lv_ac_db.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)
self.assertTrue(wf_svc.is_action_execution_under_workflow_context(tk2_ac_ex_db))
Expand All @@ -225,7 +225,7 @@ def test_run_workflow(self):
tk3_ac_ex_db = ex_db_access.ActionExecution.query(
task_execution=str(tk3_ex_db.id)
)[0]
tk3_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk3_ac_ex_db.liveaction["id"])
tk3_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk3_ac_ex_db.liveaction_id)
self.assertEqual(tk3_lv_ac_db.context.get("user"), username)
self.assertEqual(tk3_lv_ac_db.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)
self.assertTrue(wf_svc.is_action_execution_under_workflow_context(tk3_ac_ex_db))
Expand Down Expand Up @@ -275,7 +275,7 @@ def test_run_workflow_with_unicode_input(self):
tk1_ac_ex_db = ex_db_access.ActionExecution.query(
task_execution=str(tk1_ex_db.id)
)[0]
tk1_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk1_ac_ex_db.liveaction["id"])
tk1_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk1_ac_ex_db.liveaction_id)
self.assertEqual(tk1_lv_ac_db.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)
wf_svc.handle_action_execution_completion(tk1_ac_ex_db)
tk1_ex_db = wf_db_access.TaskExecution.get_by_id(tk1_ex_db.id)
Expand All @@ -287,7 +287,7 @@ def test_run_workflow_with_unicode_input(self):
tk2_ac_ex_db = ex_db_access.ActionExecution.query(
task_execution=str(tk2_ex_db.id)
)[0]
tk2_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk2_ac_ex_db.liveaction["id"])
tk2_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk2_ac_ex_db.liveaction_id)
self.assertEqual(tk2_lv_ac_db.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)
wf_svc.handle_action_execution_completion(tk2_ac_ex_db)
tk2_ex_db = wf_db_access.TaskExecution.get_by_id(tk2_ex_db.id)
Expand All @@ -299,7 +299,7 @@ def test_run_workflow_with_unicode_input(self):
tk3_ac_ex_db = ex_db_access.ActionExecution.query(
task_execution=str(tk3_ex_db.id)
)[0]
tk3_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk3_ac_ex_db.liveaction["id"])
tk3_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk3_ac_ex_db.liveaction_id)
self.assertEqual(tk3_lv_ac_db.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)
wf_svc.handle_action_execution_completion(tk3_ac_ex_db)
tk3_ex_db = wf_db_access.TaskExecution.get_by_id(tk3_ex_db.id)
Expand Down Expand Up @@ -348,7 +348,7 @@ def test_run_workflow_action_config_context(self):
tk1_ac_ex_db = ex_db_access.ActionExecution.query(
task_execution=str(tk1_ex_db.id)
)[0]
tk1_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk1_ac_ex_db.liveaction["id"])
tk1_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk1_ac_ex_db.liveaction_id)
self.assertEqual(tk1_lv_ac_db.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)
self.assertTrue(wf_svc.is_action_execution_under_workflow_context(tk1_ac_ex_db))

Expand Down Expand Up @@ -401,7 +401,7 @@ def test_run_workflow_with_action_less_tasks(self):
tk2_ac_ex_db = ex_db_access.ActionExecution.query(
task_execution=str(tk2_ex_db.id)
)[0]
tk2_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk2_ac_ex_db.liveaction["id"])
tk2_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk2_ac_ex_db.liveaction_id)
self.assertEqual(tk2_lv_ac_db.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)

# Manually handle action execution completion.
Expand All @@ -413,7 +413,7 @@ def test_run_workflow_with_action_less_tasks(self):
tk3_ac_ex_db = ex_db_access.ActionExecution.query(
task_execution=str(tk3_ex_db.id)
)[0]
tk3_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk3_ac_ex_db.liveaction["id"])
tk3_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk3_ac_ex_db.liveaction_id)
self.assertEqual(tk3_lv_ac_db.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)

# Manually handle action execution completion.
Expand All @@ -434,7 +434,7 @@ def test_run_workflow_with_action_less_tasks(self):
tk5_ac_ex_db = ex_db_access.ActionExecution.query(
task_execution=str(tk5_ex_db.id)
)[0]
tk5_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk5_ac_ex_db.liveaction["id"])
tk5_lv_ac_db = lv_db_access.LiveAction.get_by_id(tk5_ac_ex_db.liveaction_id)
self.assertEqual(tk5_lv_ac_db.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)

# Manually handle action execution completion.
Expand Down
Loading
Loading