-
Notifications
You must be signed in to change notification settings - Fork 103
Add support for Object TTL #1899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Secrets | View in Orca |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for Weaviate's Object Time-To-Live (TTL) feature, which allows automatic expiration and deletion of objects based on time criteria. The implementation provides three TTL strategies: deletion by creation time, deletion by update time, and deletion by a custom date property.
Key changes:
- Added
_ObjectTTLand_ObjectTTLCreateclasses for configuring TTL behavior - Integrated TTL configuration into collection creation and management APIs
- Added support for parsing TTL configuration from Weaviate schema responses
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| weaviate/collections/classes/config_object_ttl.py | New file defining TTL configuration classes with three factory methods for different deletion strategies |
| weaviate/collections/classes/config.py | Added ObjectTTLConfig dataclass and integrated it into CollectionConfig classes |
| weaviate/collections/classes/config_methods.py | Added deserialization logic to parse TTL configuration from Weaviate API responses |
| weaviate/collections/collections/executor.py | Added object_ttl_config parameter to create() method signature and documentation |
| weaviate/collections/collections/sync.pyi | Added object_ttl_config parameter type hints for synchronous API |
| weaviate/collections/collections/async_.pyi | Added object_ttl_config parameter type hints for asynchronous API |
| integration/test_collection_config.py | Added three integration tests covering the different TTL deletion strategies |
| integration/conftest.py | Updated collection factory fixture to support object_ttl parameter |
| mock_tests/test_collection.py | Updated test assertion to include object_ttl_config field |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TTL parameter name proposals
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev/1.35 #1899 +/- ##
===========================================
Coverage ? 86.38%
===========================================
Files ? 274
Lines ? 19879
Branches ? 0
===========================================
Hits ? 17172
Misses ? 2707
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.