A sub-operation cannot trigger a sub-sub operation
Closed this issue · 1 comments
Describe the bug
While an operation workflow can trigger a sub-operation, this behavior is not recursive: currently a sub-operation cannot trigger a sub-operation. And this is even more confusing as the sub-sub operation is accepted by tedge_agent but is not working leading to a main operation instance that never terminate.
See this comment: #2792 (comment)
To Reproduce
See the system "Invoke sub-operation from a sub-operation" added by this PR: #2853. This test
- defines 3 operation workflows:
grand_parent
operation triggers aparent
operation that triggers achild
operation. - and triggers a
grand_parent
command
Expected behavior
- The 3 commands should be launched in turn
- Starting the
grand_parent
operation - Starting the
parent
operation, pausing thegrand_parent
operation - Starting the
child
operation, pausing theparent
operation - Ending the
child
operation, resuming theparent
operation - Ending the
parent
operation, resuming thegrand_parent
operation - Ending the
grand_parent
operation
Current behavior
The 3 commands are launched in turn as expected;
but the parent operation doesn't resume when the child operation ends.
Screenshots
[te/device/main///cmd/gp_command/test-sub-sub] {"status":"init", "output_file":"/tmp/test-sub-sub.json"}
[te/device/main///cmd/gp_command/test-sub-sub] {"output_file":"/tmp/test-sub-sub.json","status":"awaiting_completion"}
[te/device/main///cmd/super_command/sub:gp_command:test-sub-sub] {"status":"init"}
[te/device/main///cmd/super_command/sub:gp_command:test-sub-sub] {"status":"executing","y":"some y value"}
[te/device/main///cmd/super_command/sub:gp_command:test-sub-sub] {"status":"awaiting_completion","y":"some y value"}
[te/device/main///cmd/sub_command/sub:super_command:sub:gp_command:test-sub-sub] {"status":"init","x":"some x value","y":"some y value"}
[te/device/main///cmd/sub_command/sub:super_command:sub:gp_command:test-sub-sub] {"status":"executing","x":"some x value","y":"some y value"}
[te/device/main///cmd/sub_command/sub:super_command:sub:gp_command:test-sub-sub] {"status":"successful","x":"some x value","x_bis":"some x value","y":"some y value","y_bis":"some y value"}
Environment (please complete the following information):
- OS [incl. version]
- Hardware [incl. revision]
- System-Architecture [e.g. result of "uname -a"]
- thin-edge.io version [e.g. 0.1.0]
Additional context
QA has thoroughly checked the bug and here are the results:
- Test for ticket exists in the test suite.
- tests/RobotFramework/tests/tedge_agent/workflows/custom_operation.robot
- Review of Test added in the PR #2853
- QA has tested the bug and it's not reproducable anymore