Fix orchestration saga failure due to missing pandas dependency

Root cause analysis:
- The orchestration saga was failing at the 'fetch_shared_data_snapshot' step
- Lines 350-356 had a logic error: tried to import pandas in exception handler after pandas import already failed
- This caused an uncaught exception that propagated up and failed the entire saga

The fix:
- Replaced pandas DataFrame placeholder with a simple dict for traffic_predictions
- Since traffic predictions are marked as "not yet implemented", pandas is not needed yet
- This eliminates the pandas dependency from the orchestrator service
- When traffic predictions are implemented in Phase 5, the dict can be converted to DataFrame

Impact:
- Orchestration saga will no longer fail due to missing pandas
- AI enhancement warning will still appear (requires separate fix to add pandas to requirements if needed)
- Traffic predictions placeholder now uses empty dict instead of empty DataFrame
This commit is contained in:
Claude
2025-11-05 14:00:10 +00:00
parent 3cad2f1420
commit 7626217b7d

View File

@@ -344,16 +344,10 @@ class OrchestrationSaga:
context['event_calendar'] = []
# NEW: Placeholder for traffic predictions (Phase 5)
try:
# Note: Implement traffic forecasting in Phase 5
# For now, initialize as empty DataFrame
import pandas as pd
context['traffic_predictions'] = pd.DataFrame()
logger.info("Traffic predictions: not yet implemented, using empty DataFrame")
except Exception as e:
logger.warning(f"Could not fetch traffic predictions: {e}")
import pandas as pd
context['traffic_predictions'] = pd.DataFrame()
# Note: Implement traffic forecasting in Phase 5
# For now, initialize as empty dict (will be converted to DataFrame when implemented)
context['traffic_predictions'] = {}
logger.info("Traffic predictions: not yet implemented, using empty dict")
logger.info(
f"Shared data snapshot fetched successfully: "