Uh oh!
There was an error while loading. Please reload this page.
SK-2522: Fix Python SDK v2 issues reported in Bug Bash - #231
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses multiple issues in the Python SDK v2 identified during the Bug Bash, focusing on error handling, validation logic, and connection invocation functionality.
Changes:
- Fixed error handling in connection invocation and response parsing to properly handle non-JSON content
- Corrected validation logic for wait time, credentials, and request parameters
- Added comprehensive test coverage for new error scenarios and edge cases
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/vault/controller/test__connection.py | Expanded test coverage for connection invocation with additional test cases for credentials, error handling, and metadata headers |
| tests/vault/client/test__client.py | Added tests for bearer token expiration, reuse, and regeneration scenarios |
| tests/utils/validations/test__validations.py | Updated expired token test expectation and added boundary tests for wait time validation |
| tests/utils/test__utils.py | Added extensive tests for response parsing, content type handling, error scenarios, and utility functions |
| skyflow/vault/controller/_connections.py | Reordered connection invocation logic to resolve credentials before constructing requests |
| skyflow/vault/client/client.py | Fixed error type for expired token from SyntaxError to SkyflowError |
| skyflow/utils/validations/_validations.py | Fixed validation logic for wait time, credentials, and get request; updated error messages |
| skyflow/utils/enums/content_types.py | Added HTML content type enum |
| skyflow/utils/_utils.py | Enhanced content type handling, fixed response parsing for non-JSON content, improved error handling |
| skyflow/utils/_skyflow_messages.py | Updated error messages for consistency and added new EXPIRED_BEARER_TOKEN message |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Why
Issues related to Python SDK v2 were identified during the Bug Bash.
Fixing them is required to improve reliability and align behavior with expected standards.
Outcome
Fixed all Python SDK v2 issues identified in the Bug Bash document.
Improved error handling and overall stability of the SDK.