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

   `AzureAISearchHook` gets an optional `api_version`, also read from the 
connection (`api_version` extra, with a field on the connection form). When 
neither is set nothing changes: the SDK calls its own default version.
   
   **Why**
   
   Azure AI Search resolves an [index 
alias](https://learn.microsoft.com/en-us/azure/search/search-how-to-alias) only 
on preview API versions. On a stable one, which `azure-search-documents` 11.6.0 
calls by default (`2025-09-01`), the service answers 404 "The index '...' was 
not found", so a hook bound to an alias cannot read it. Measured against a 
search service:
   
   | Request | Result |
   |---|---|
   | search on an alias, `2025-09-01` or `2024-07-01` | 404, index not found |
   | search on the same alias, `2025-05-01-preview` | 200 |
   | search on the index the alias points to, `2025-09-01` | 200 |
   
   ```python
   hook = AzureAISearchHook("azure_ai_search_default", index="my-alias", 
api_version="2025-05-01-preview")
   ```
   
   Tests: 6 new unit tests (no version given, from the hook, from the extra, 
the hook overrides the extra, an empty extra).
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to