Skip to content

fix(config): write object TTL updates under objectTtlConfig - #2181

Merged
g-despot merged 2 commits into
weaviate:mainfrom
Kayvan-Zahiri:fix/object-ttl-update-schema-key
Oct 9, 2026
Merged

g-despot merged 2 commits into
weaviate:mainfrom
Kayvan-Zahiri:fix/object-ttl-update-schema-key

Conversation

@Kayvan-Zahiri

Copy link
Copy Markdown
Contributor

Fixes #2178

collection.config.update(object_ttl_config=...) wrote objectTTLConfig. Create and the server already use objectTtlConfig, and the merge started from {} so existing TTL fields got dropped.

The update field now matches the server key and merges the stored objectTtlConfig block.

pytest -o addopts= test/collection/test_config.py → 208 passed

Made with Cursor

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>

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

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
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@weaviate-git-bot

Copy link
Copy Markdown

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.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Forum?

@Kayvan-Zahiri

Copy link
Copy Markdown
Contributor Author

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@g-despot
g-despot merged commit ba6ccb3 into weaviate:main Oct 9, 2026
127 of 128 checks passed
g-despot added a commit to HuaTNA/weaviate-python-client that referenced this pull request Oct 9, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Object TTL update sends objectTTLConfig, while the server spells it objectTtlConfig

4 participants