suryakvk opened a new pull request, #77480:
URL: https://github.com/apache/airflow/pull/77480

   Weaviate collection aliases (server 1.32+, `weaviate-client` 4.16+) let 
applications query a stable name while the collection behind it changes. They 
are the standard way to re-index without downtime, for example after changing 
an embedding model: build a new collection, load and embed the data, then 
switch the alias to it. The Weaviate provider has no alias support today.
   
   ### Changes
   - **`WeaviateHook`:** `create_alias`, `get_alias`, `list_aliases`, 
`update_alias` and `delete_alias`, thin wrappers over `client.alias`.
   - **New `WeaviateSwapAliasOperator`:** points an alias at 
`target_collection`.
     - It creates the alias if it's missing (`create_if_missing=True`) and does 
nothing if the alias already points there.
     - It can delete the previous collection after a successful swap 
(`delete_previous_collection=False` by default).
     - It returns the previous collection's name through XCom.
   - **Docs:** a how-to section in `operators/weaviate.rst`, plus a new example 
DAG, `example_weaviate_swap_alias.py`.
   - **Unit tests** for the hook methods and every branch of the operator.
   
   No dependency changes: the existing `weaviate-client>=4.16.0` floor already 
includes the alias API.
   
   ### Testing
   - `uv run pytest tests/unit/weaviate` in `providers/weaviate`: 67 passed
   - `ruff check` and `ruff format`: clean
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: GitHub Copilot (Claude) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   ---
   
   * Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [PR] Add alias support and Wea... suryakvk (via GitHub) via commits

Reply via email to