Closed hasinaxp closed 2 months ago
The recent updates significantly enhance the callback management system by introducing new configuration attributes and improving error handling. Key improvements include identifier-based processing, enriched logging, and enhanced security through encryption methods. The test suite has been expanded to cover a wider range of scenarios, ensuring that the system remains robust while adapting to new functionalities.
Files | Change Summary |
---|---|
kairon/actions/definitions/.../callback_action.py , schedule.py |
Updated execute methods with new logic for handling callback URLs and scheduling data, enhancing flexibility and robustness in response management. |
kairon/api/models.py |
Added new fields to CallbackConfigRequest , improving configuration capabilities for handling callbacks. |
kairon/async_callback/.../processor.py |
Enhanced error handling in run_pyscript and async_callback , introduced a new parsing method, and updated parameter signatures for clarity. |
kairon/async_callback/router/.../pyscript_callback.py |
Modified process_router_message to implement a token-based identification system, streamlining routing and simplifying function internals. |
kairon/chat/handlers/channels/whatsapp.py |
Added import to support enhanced response conversion mechanisms for WhatsApp. |
kairon/shared/actions/utils.py , kairon/shared/callback/.../data_objects.py |
Introduced new utility methods for HTTP requests and added encryption/decryption functionalities, bolstering security for sensitive data management. |
kairon/shared/data/processor.py |
Expanded add_callback to include new parameters for improved validation and handling of callback configurations. |
system.yaml , tests/testing_data/system.yaml |
Introduced xor_secret , aes_key , and aes_iv parameters for enhanced security in asynchronous callback actions. |
tests/integration_test/.../action_service_test.py , callback_service_test.py , services_test.py |
Enhanced test suites with new cases and refined logic to ensure comprehensive coverage of updated callback functionalities and configurations. |
sequenceDiagram
participant User
participant CallbackService
participant Processor
participant Database
User->>CallbackService: Send Callback Request
CallbackService->>Processor: Process callback with identifier
Processor->>Database: Verify Callback Config
Database-->>Processor: Return Config Data
Processor->>CallbackService: Generate Response
CallbackService-->>User: Return Final Response
π "Hippity hop, the code does dance,
With callbacks now, thereβs a chance!
A sprinkle of secrets, a dash of delight,
Our system now sparkles, oh what a sight!
So letβs raise our ears and cheer with glee,
For changes that make our code feel free!" π
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?
callback action upgrades -> standalone, shorten url, state share between pyscript testcase fixes and new test cases prepare_request_with_bot
Summary by CodeRabbit
New Features
Bug Fixes
Tests