Closed hasinaxp closed 3 months ago
The recent changes enhance the Kairon framework by introducing new asynchronous endpoints for managing callback actions and logs. These improvements facilitate better tracking and retrieval of callback-related information, enrich logging capabilities by associating logs with specific channels, and streamline data handling through method signature updates and new utility functions.
Files | Change Summary |
---|---|
kairon/api/app/routers/bot/action.py |
Added two async GET endpoints: /callback_actions for retrieving callback actions and /callback_logs for fetching logs, with updated method signatures for user authentication. |
kairon/async_callback/processor.py |
Modified async_callback and callback_function to include a channel parameter, enhancing logging. |
kairon/shared/callback/data_objects.py |
Added a channel field to CallbackLog , updated entry methods to require channel , and revamped the get_logs method for improved querying. |
kairon/shared/data/processor.py |
Introduced new methods for fetching callback actions and logs, adjusted logic for editing actions, and added validation. |
kairon/async_callback/channel_message_dispacher.py |
Enhanced logging in the dispatch_message function for better traceability. |
kairon/async_callback/router/pyscript_callback.py |
Improved request data handling in the process_router_message function with clearer structures. |
kairon/shared/concurrency/actors/pyscript_runner.py |
Enhanced __perform_cleanup method to format datetime objects for better readability. |
system.yaml |
Updated server_url configuration for event handling endpoint. |
tests/integration_test/services_test.py |
Added integration tests for new callback actions and logging functionalities. |
tests/unit_test/callback_test.py |
Enhanced asynchronous test cases by including a channel parameter in mock functions and assertions. |
π In the meadow, the changes bloom,
New logs and actions, dispelling the gloom.
With channels to track, our data's in line,
A hop and a skip, everything's fine!
Hooray for the updates, let's celebrate,
For in this code garden, we all elevate! πΌβ¨
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?
added get routes for logs and all callback actions list and their correspondent test cases
Summary by CodeRabbit
New Features
/callback_actions
to retrieve all callback actions for the user's bot./callback_logs
to access detailed logs for the bot's callback services with flexible query parameters.channel
parameter for better tracking of callback logs.Bug Fixes
Chores
server_url
for event handling.Tests
channel
parameter in callback log creation.