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

A sub-operation cannot trigger a sub-sub operation #2858

Closed
didier-wenzek opened this issue May 3, 2024 · 1 comment
Closed

A sub-operation cannot trigger a sub-sub operation #2858

didier-wenzek opened this issue May 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@didier-wenzek
Copy link
Contributor

didier-wenzek commented May 3, 2024

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 a parent operation that triggers a child 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 the grand_parent operation
  • Starting the child operation, pausing the parent operation
  • Ending the child operation, resuming the parent operation
  • Ending the parent operation, resuming the grand_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

@didier-wenzek didier-wenzek added the bug Something isn't working label May 3, 2024
@didier-wenzek didier-wenzek self-assigned this May 3, 2024
@didier-wenzek didier-wenzek removed their assignment May 6, 2024
@gligorisaev gligorisaev self-assigned this May 7, 2024
@gligorisaev
Copy link
Contributor

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 feat: add support for sub-sub operations #2853
  • QA has tested the bug and it's not reproducable anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants