Object TTL update sends `objectTTLConfig`, while the server spells it `objectTtlConfig`
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 62/100
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:
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
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di weaviate/weaviate-python-client
-
Batch: re-added rate-limited objects stay in results.objs.all_responses as errorsForse già presa @inchang-ing l’ha presa 16 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
weaviate/weaviate-python-client#2179 ·
I maintainer di solito rispondono entro 1 giorno
-
insert_many silently discards vectors if they're NumPy arraysForse già presa @tibor-reiss l’ha presa 822 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
weaviate/weaviate-python-client#1002 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Client-side batching: wholesale chunk failures are reported under chunk-local indices, so errors collide and describe the wrong objectsForse già presa @feiiiiii5 l’ha presa 30 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 15/100
weaviate/weaviate-python-client#2165 ·
I maintainer di solito rispondono entro 1 giorno
-
[HTTPXodus] Consider migrating from httpx to httpx2 (the actively maintained fork)Forse già presa @ProgrammerPlus1998 l’ha presa 45 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
weaviate/weaviate-python-client#2154 ·
I maintainer di solito rispondono entro 1 giorno
-
fetch_objects(limit=0) returns a default page of objects instead of noneForse già presa @databyjp l’ha presa 3 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
weaviate/weaviate-python-client#2150 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di weaviate/weaviate-python-client
Issue simili
-
comp/cli P3 type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
NousResearch/hermes-agent#141420 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
vendor-pitch
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
I maintainer di solito rispondono entro 1 giorno
-
bug llm p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
New tool: ZIPZAX Python Notebook StudioForse già presa @github-actions l’ha presa oggi. Apertasubmission triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
kausalflow/tools#226 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100