Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado Apto para principiantes
#2,178 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Kayvan-Zahiri ya está trabajando en esto.

Desde el 2/10/2026.

  • #2181 de @Kayvan-Zahiri — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
api

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:

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.

Lenguaje dominante
Python
Estrellas
228
Forks
161
Merge medio
2 d 9 h
PR fusionados (30 d)
12

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de weaviate/weaviate-python-client

Todos los issues de weaviate/weaviate-python-client

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.