Closed hasinaxp closed 3 months ago
The recent changes enhance the callback handling within the application by introducing new API endpoints for retrieving callback actions and logs, improving logging mechanisms across various components, and modifying data structures to better accommodate channel information. These updates collectively improve the robustness and traceability of callback operations, ensuring consistent and reliable data handling throughout the system.
Files | Change Summary |
---|---|
kairon/actions/definitions/callback_action.py |
Improved handling of the bot_response variable in the execute method to ensure consistent URL formatting. |
kairon/api/app/routers/bot/action.py |
Added endpoints for retrieving all callback actions and logs, with enhanced security and query capabilities. |
kairon/async_callback/channel_message_dispacher.py |
Implemented logging in the dispatch_message function to track message dispatch actions. |
kairon/async_callback/processor.py |
Enhanced logging during callback executions and refined control flow for clarity. |
kairon/async_callback/router/pyscript_callback.py |
Modified request data handling in process_router_message , improving structure and logging. |
kairon/shared/callback/data_objects.py |
Updated CallbackLog class to include a new channel field and improved logging retrieval methods. |
kairon/shared/concurrency/actors/pyscript_runner.py |
Enhanced __perform_cleanup method for better date handling in outputs. |
kairon/shared/data/processor.py |
Introduced methods for retrieving callback service logs and all callback actions, improving logging capabilities. |
system.yaml |
Updated server_url for events section to a new endpoint. |
tests/integration_test/services_test.py |
Added integration tests for retrieving callback actions and logs, enhancing test coverage. |
tests/unit_test/callback_test.py |
Modified callback log tests to include channel information, ensuring comprehensive testing of callback functionality. |
kairon/api/models.py |
Adjusted metadata_list attribute in CallbackActionConfigRequest class to have a default value of an empty list for better usability. |
sequenceDiagram
participant User
participant API
participant CallbackService
participant Logger
User->>API: GET /api/bot/{bot}/action/callback_actions
API->>CallbackService: Retrieve all callback actions
CallbackService->>API: Return list of callback actions
API-->>User: Return actions list
User->>API: GET /api/bot/{bot}/action/callback_logs
API->>CallbackService: Retrieve callback logs
CallbackService->>Logger: Log retrieval request
Logger-->>CallbackService: Log details
CallbackService->>API: Return logs
API-->>User: Return logs
π In a land where callbacks play,
The messages hop and sway.
With logs and actions in the light,
Our code now dances, pure delight!
Channel info, neat and bright,
Hereβs to changes, all just right! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
metadata_list
in theCallbackActionConfigRequest
model.Bug Fixes
Tests