You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Partial date-property TTL updates reset an omitted offset to zero #2170
Reconfigure.ObjectTTL.delete_by_date_property() changes an omitted ttl_offset to 0. A call that only supplies filter_expired_objects consequently includes an explicit defaultTtl: 0 in the generated TTL update block. Other TTL update helpers leave an omitted offset as None.
Reproduction
This inspects the TTL update block locally; it does not test the complete collection update request or server behavior:
The direct TTL-block merge overwrites defaultTtl with zero even though no offset was supplied. An explicit ttl_offset=0 should still reset it. Negative existing offsets have the same issue.
Scope clarification from review
Review on #2171 identified a separate casing mismatch: the collection update path uses objectTTLConfig, while creation and reading use objectTtlConfig. A local collection merge with the latter spelling produces two blocks. The original reproduction above operates on an individual TTL block and cannot establish server-side preservation. The delete_by_* factories also set enabled=True, even for a filter-only call. Those existing behaviors need a maintainer decision before the offset fix lands.
Environment and validation
Originally reproduced on main commit 142d798, Python 3.13.13, macOS arm64. The offset coercion and related collection-key/activation paths remain present in upstream eb5546a8 inspected on 2026-09-29.
PR #2171 leaves None unchanged in the update factory; creation still defaults to zero. Revised regression tests verify offset omission directly, positive/negative TTL-block merges, explicit integer/timedelta offsets including zero, and the creation default. Restoring the coercion gives two failures; with the fix 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 and review follow-up.
Activity