fix: carry require_existing collection lifecycle through the legacy renderer config
This commit is contained in:
@@ -36,11 +36,14 @@ def translate_legacy_config(raw: dict[str, Any]) -> tuple[dict[str, Any], bool]:
|
||||
if isinstance(resources, dict) and "vector" in resources and "vectors" not in translated:
|
||||
vector = _as_mapping(resources.get("vector"))
|
||||
if isinstance(vector, dict):
|
||||
translated["vectors"] = {
|
||||
translated_vectors: dict[str, Any] = {
|
||||
"type": "qdrant",
|
||||
"base_url": vector.get("base_url"),
|
||||
"collection": vector.get("collection"),
|
||||
}
|
||||
if vector.get("collection_lifecycle") in ("self_heal", "require_existing"):
|
||||
translated_vectors["collection_lifecycle"] = vector["collection_lifecycle"]
|
||||
translated["vectors"] = translated_vectors
|
||||
legacy = any(key in raw for key in _LEGACY_RESOURCE_KEYS)
|
||||
if not legacy:
|
||||
return translated, False
|
||||
|
||||
Reference in New Issue
Block a user