Repository navigation
fix(config): write object TTL updates under objectTtlConfig - #2181
Conversation
The update path serialized objectTTLConfig while create and the server use objectTtlConfig, so existing TTL fields were dropped on merge. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
|
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
|
I agree to the Weaviate Contributor License Agreement. |
… only The server never sends objectTTLConfig, so the fallback and the pop could not run. Read the stored block the way the other config arms do. Move the test next to the other merge_with_existing cases and cover the first-time enable and the disable paths too.
There was a problem hiding this comment.
🟢 Approval recommended
The implementation consistently matches the server schema and includes focused regression coverage.
0 open findings
What changed in this PR
Fixes object TTL updates to use the server-compatible key while preserving existing TTL fields.
Changes:
- Renames the update field to
objectTtlConfig. - Merges updates into the stored TTL configuration.
- Adds coverage for update, creation, and disable scenarios.
| File | Description |
|---|---|
weaviate/collections/classes/config.py |
Corrects the TTL key and merge target. |
test/collection/test_config_update.py |
Verifies key spelling and field preservation. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…et tests into one table Main now merges object TTL updates onto the stored objectTtlConfig block (weaviate#2181). One parametrized test covers the omitted, zero and timedelta offsets against that merge.
Fixes #2178
collection.config.update(object_ttl_config=...)wroteobjectTTLConfig. Create and the server already useobjectTtlConfig, and the merge started from{}so existing TTL fields got dropped.The update field now matches the server key and merges the stored
objectTtlConfigblock.pytest -o addopts= test/collection/test_config.py→ 208 passedMade with Cursor