Description
Reconfigure.ObjectTTL.delete_by_date_property() changes an omitted ttl_offset to 0. A partial update intended only to change filter_expired_objects therefore overwrites an existing nonzero expiry offset. Other TTL update helpers preserve omitted values.
Reproduction
No running server is required to inspect the merged configuration sent by the client:
from weaviate.classes.config import Reconfigure
existing = {
"enabled": True,
"filterExpiredObjects": False,
"deleteOn": "expiresAt",
"defaultTtl": 3600,
}
update = Reconfigure.ObjectTTL.delete_by_date_property(filter_expired_objects=True)
print(update.merge_with_existing(existing))
Actual: defaultTtl becomes 0 while filterExpiredObjects becomes True.
Expected: defaultTtl remains 3600, since no new offset was supplied. An explicit ttl_offset=0 should still reset it.
This can change object expiry timing when the caller only intended to change filtering. The same issue applies to negative offsets.
Environment and validation
Main commit 142d798, Python 3.13.13, macOS arm64. The editable shallow checkout reports 0.1.dev1+g142d798a9.
A patch leaves None unchanged on the update path and clarifies the parameter documentation. Creation still defaults to zero. Tests cover merging positive and negative existing offsets, explicit integer/timedelta offsets including zero, and the creation default. The two preservation cases fail before the fix. Afterward, both configuration test modules pass (233 tests). No live-server integration test was run.
AI assistance was used to investigate, implement, and test this patch.
Description
Reconfigure.ObjectTTL.delete_by_date_property()changes an omittedttl_offsetto0. A partial update intended only to changefilter_expired_objectstherefore overwrites an existing nonzero expiry offset. Other TTL update helpers preserve omitted values.Reproduction
No running server is required to inspect the merged configuration sent by the client:
Actual:
defaultTtlbecomes0whilefilterExpiredObjectsbecomesTrue.Expected:
defaultTtlremains3600, since no new offset was supplied. An explicitttl_offset=0should still reset it.This can change object expiry timing when the caller only intended to change filtering. The same issue applies to negative offsets.
Environment and validation
Main commit
142d798, Python 3.13.13, macOS arm64. The editable shallow checkout reports0.1.dev1+g142d798a9.A patch leaves
Noneunchanged on the update path and clarifies the parameter documentation. Creation still defaults to zero. Tests cover merging positive and negative existing offsets, explicit integer/timedelta offsets including zero, and the creation default. The two preservation cases fail before the fix. Afterward, both configuration test modules pass (233 tests). No live-server integration test was run.AI assistance was used to investigate, implement, and test this patch.