Closed albinsuresh closed 3 weeks ago
Indeed, something to do. However, this is unfortunately far beyond just "fix logging".
Thanks to https://github.com/thin-edge/thin-edge.io/pull/2844, the log and config operations are now plainly supported by the workflow feature:
This bug was reproducable before the PR's that are fixing it were merged. I confirm that this bug is NOT reproducable anymore.
Review done for following tests:
tests/RobotFramework/tests/cumulocity/software_management/software.robot
tests/RobotFramework/tests/cumulocity/configuration/configuration_operation.robot
tests/RobotFramework/tests/cumulocity/log/log_operation.robot
In this Test Suite following Test Steps are added:
Operation log uploaded automatically with default auto_log_upload setting as onFailure
Operation log uploaded automatically with default auto_log_upload setting as always
Operation log uploaded automatically with default auto_log_upload setting as never
In this Test Suite following new Keywords are added:
Validate operation log uploaded
Validate operation log not uploaded
Overall, the new test cases and keywords are well-designed with clear documentation and robust validation steps. Well-documented steps and expected outcomes.
In this Test Suite following Test Steps are added:
Trigger config_snapshot operation from another operation
Trigger custom config_snapshot operation
Trigger config_update operation from another workflow
Trigger custom config_update operation
and following keywords:
Customize config operations
Restore config operations
Customize Operation Workflows
In this Test Suite following Test Steps are added:
Trigger log_upload operation from another operation
Trigger custom log_upload operation
and following keywords:
Customize Operation Workflows
Customize log_upload operation
Restore log_upload operation
Describe the bug
The workflow log files created on execution of configuration and log management operations are empty as seen here:
To Reproduce
Execute any config management or log management operation and check the corresponding workflow log files at
/var/log/tedge/agent/
Expected behavior
The workflow log files should properly capture the state transitions of these operations, just like it does for software management or device restart operations
Additional context
This is a side effect of the config management and log management actors being integrated with
tedge-agent
as independent actors and not via thetedge_operation_converter
as it is done for software manager and restart manager actors.