Repository navigation
Conversation
…izer storage_uri DataCacheInitializer.__post_init__ validated that storage_uri contained two components after the 'cache://' scheme, but allowed either component to be empty (e.g. 'cache://schema/', 'cache:///table', 'cache:///'). This ensures both schema and table components are non-empty strings, and adds regression test cases for empty schema, empty table, and both. Closes kubeflow#881 Signed-off-by: pratik <kattipratik78@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
🎉 Welcome to the Kubeflow SDK! 🎉 Thanks for opening your first PR! We're happy to have you as part of our community 🚀 Here's what happens next:
Join the community:
Feel free to ask questions in the comments if you need any help or clarification! |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Right now, DataCacheInitializer only checks if the URI splits into 2 parts after cache://, but it doesn't verify if the schema or table names are actually filled in.
Because of this, invalid inputs like cache://schema/, cache:///table, or cache:/// slip through without an error on the client side, only to fail later once the job runs on the cluster.
This PR adds a quick check (not all(parts)) to make sure neither the schema nor table name is empty, catching this early with a clean ValueError. Also added regression test cases in types_test.py covering these cases.
How was this patch tested?
Added new unit test cases covering empty schema, empty table, and both empty to types_test.py.
Ran pytest locally (all tests passing).
Ran ruff check and ruff format to keep styling clean.
Thanks for taking a look! Happy to address any feedback or suggestions.
Closes #881
Summary by CodeRabbit