Is your feature improvement request related to a problem? Please describe.
If for some reason a workflow definition is rejected by tedge-agent, the workflow is rejected on start and an error is properly reported in the agent log:
The commands for that operation (in that case firmware_update) are then ignored. This can be seen in the agent log:
2024-08-21T14:17:11.075445799Z INFO tedge_agent::operation_workflows::actor: Ignoring firmware_update operation which is not registered
So far so good. However, the error is not reported to the clients and the operation will stay on Cumulocity in the pending state for ever with no clue for the end-user.
Describe the solution you'd like
When a workflow definition for an operation has been given to the agent but rejected because ill-formed,
then the agent must not ignored the commands for that operation but fail those reporting the root cause.
Describe alternatives you've considered
Another approach could have been to let tedge-agent fail hard when parsing an ill-formed workflow definition.
However, this would be way too fragile. It's better for the agent to run is a degraded mode. For instance, the Unknown action: restart has been caused not by a user mistake but by an agent upgrade, the new version using a new syntax.
Is your feature improvement request related to a problem? Please describe.
If for some reason a workflow definition is rejected by tedge-agent, the workflow is rejected on start and an error is properly reported in the agent log:
The commands for that operation (in that case
firmware_update
) are then ignored. This can be seen in the agent log:So far so good. However, the error is not reported to the clients and the operation will stay on Cumulocity in the pending state for ever with no clue for the end-user.
Describe the solution you'd like
When a workflow definition for an operation has been given to the agent but rejected because ill-formed, then the agent must not ignored the commands for that operation but fail those reporting the root cause.
Describe alternatives you've considered
Another approach could have been to let tedge-agent fail hard when parsing an ill-formed workflow definition. However, this would be way too fragile. It's better for the agent to run is a degraded mode. For instance, the
Unknown action: restart
has been caused not by a user mistake but by an agent upgrade, the new version using a new syntax.Additional context