SIENTIAPDE-1110

Implement store_data_package method in Redis activity for debug data storage. Update CoreScouter workflow to conditionally call store_data_package based on debug flag. Enhance tests for store_data_package functionality and error handling.
This commit is contained in:
vitor-aignosi
2025-07-07 10:03:08 -03:00
parent 08240efc8b
commit 0b77a7bc7e
4 changed files with 134 additions and 4 deletions

View File

@@ -34,7 +34,8 @@ async def test_core_scouter_workflow_success(mock_workflow, core_scouter):
'schema': 'test_schema',
'table_name': 'test_table',
'retention_time': 3600,
'model_tags': {}
'model_tags': {},
'debug_data_package': True
}
)
@@ -98,6 +99,21 @@ async def test_core_scouter_workflow_success(mock_workflow, core_scouter):
)
])
mock_workflow.execute_activity_method.assert_has_calls([
call(
Activities.store_data_package,
{
**expected_metadata,
'workflow_name': 'test_workflow',
'schedule_name': 'test_schedule',
'held_data': 'held_data',
'data': 'test_data'
},
retry_policy=ANY,
start_to_close_timeout=ANY
)
])
@pytest.mark.asyncio
@patch('scouter.workflow.sub_workflows.core_scouter.workflow', new_callable=AsyncMock)