Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa Adatta ai principianti
#2,178 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Kayvan-Zahiri ci sta già lavorando.

Dal 2/10/2026.

  • #2181 di @Kayvan-Zahiri — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Leggi le cinque occorrenze della chiave TTL in weaviate/collections/classes/config.py, in particolare la logica di merge intorno alle righe 1748-1750. Aggiungi un test di regressione che fissi la denominazione lato server e objectTtlConfig, quindi esegui i test pertinenti insieme a python -m pytest test/; il lavoro è completato quando il PUT contiene un solo blocco denominato correttamente e preserva il comportamento esistente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

collection.config.update(object_ttl_config=...) merges the update into the schema it fetched, under a different key than the one the server returns. The server names the field objectTtlConfig, in schema.json#L1824 and in the Go tag at class.go#L50. The client writes objectTTLConfig here:

https://github.com/weaviate/weaviate-python-client/blob/38f30c11cd7531da5ab61246d56aa61410cca11c/weaviate/collections/classes/config.py#L1748-L1750

The PUT carries both blocks:

from weaviate.classes.config import Reconfigure
from weaviate.collections.classes.config import _CollectionConfigUpdate

stored = {"objectTtlConfig": {"enabled": True, "deleteOn": "expiresAt", "defaultTtl": 3600, "filterExpiredObjects": False}}
update = _CollectionConfigUpdate(
    object_ttl_config=Reconfigure.ObjectTTL.delete_by_date_property(property_name="customDate", filter_expired_objects=True)
)
print(update.merge_with_existing(stored))
# main 38f30c1
{'objectTtlConfig': {'enabled': True, 'deleteOn': 'expiresAt', 'defaultTtl': 3600, 'filterExpiredObjects': False}, 'objectTTLConfig': {'enabled': True, 'filterExpiredObjects': True, 'deleteOn': 'customDate', 'defaultTtl': 0}}

The update still reaches the server for two reasons. Go's encoding/json matches keys without regard to case, and the client puts its key last, so it overlays the stale block. With the two blocks in the other order, a live server stores nothing from the update:

# raw PUT /v1/schema/<class> against semitechnologies/weaviate:1.39.7, update block {'enabled': True, 'filterExpiredObjects': True}
A  both blocks, objectTTLConfig last     200  stored filterExpiredObjects=True
B  both blocks, objectTTLConfig first    200  stored filterExpiredObjects=False
C  only objectTtlConfig, fully merged    200  stored filterExpiredObjects=True

A rename of the five occurrences to objectTtlConfig sends one block and stores the same state as main. python -m pytest test/ gives 526 passed, as on main without it, and the five TTL integration tests pass against 1.39.7. On top of #2171's head the PUT carries one block with defaultTtl: 3600, and test/ gives 496 passed, as on that head alone. No test pins either spelling today.

#2171 lists this mismatch as awaiting a maintainer decision. Related: #2170.

@g-despot do you want the rename, with a test that pins objectTtlConfig, as a pull request? cc @dirkkul, as the key came in with ef6e0e3.

Lingua principale
Python
Stelle
228
Fork
161
Merge medio
2g 9h
PR unite (30g)
12

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di weaviate/weaviate-python-client

Tutte le issue di weaviate/weaviate-python-client

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.