Object TTL update sends `objectTTLConfig`, while the server spells it `objectTtlConfig`
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 62/100
Línea de trabajo
Lee las cinco apariciones de la clave TTL en weaviate/collections/classes/config.py, especialmente la lógica de merge alrededor de las líneas 1748-1750. Añade una prueba de regresión que fije la escritura del servidor y objectTtlConfig, y ejecuta las pruebas relevantes además de python -m pytest test/; se considera terminado cuando el PUT contiene un único bloque con el nombre correcto y conserva el comportamiento existente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 228
- Forks
- 161
- Merge medio
- 2 d 9 h
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de weaviate/weaviate-python-client
-
Batch: re-added rate-limited objects stay in results.objs.all_responses as errorsPosiblemente ocupada @inchang-ing la tomó hace 16 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
weaviate/weaviate-python-client#2179 ·
Los mantenedores suelen responder en 1 día
-
insert_many silently discards vectors if they're NumPy arraysPosiblemente ocupada @tibor-reiss la tomó hace 822 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
weaviate/weaviate-python-client#1002 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
Client-side batching: wholesale chunk failures are reported under chunk-local indices, so errors collide and describe the wrong objectsPosiblemente ocupada @feiiiiii5 la tomó hace 30 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 15/100
weaviate/weaviate-python-client#2165 ·
Los mantenedores suelen responder en 1 día
-
[HTTPXodus] Consider migrating from httpx to httpx2 (the actively maintained fork)Posiblemente ocupada @ProgrammerPlus1998 la tomó hace 45 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
weaviate/weaviate-python-client#2154 ·
Los mantenedores suelen responder en 1 día
-
fetch_objects(limit=0) returns a default page of objects instead of nonePosiblemente ocupada @databyjp la tomó hace 3 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
weaviate/weaviate-python-client#2150 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de weaviate/weaviate-python-client
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
SACGF/variantgrid#2341 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
comp/cli P3 type/security
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
NousResearch/hermes-agent#141420 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
CKV_GCP_18 (GKEPublicControlPlane) passes when master_authorized_networks_config is absent, control plane is internet-reachablePosiblemente ocupada @Varshith-Kali la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bridgecrewio/checkov#7753 ·
Los mantenedores suelen responder en 1 día