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

   The WASB task log handler currently reports remote log source URLs as:
   
   `https://<container>.blob.core.windows.net/<blob>`
   
   That makes the container name look like the storage account. Log reads still 
work because they use `WasbHook`, but the URL shown in the UI points at the 
wrong host.
   
   This PR builds the source URL from the Azure `BlobServiceClient` instead:
   
   - Uses `primary_endpoint` when available.
   - Adds the container and blob path to that endpoint.
   - Removes query strings and fragments before showing the URL.
   - Keeps Azurite-style account paths, while dropping SAS-like path segments.
   - Falls back to `account_name`, then to the old container-host format.
   
   Tests cover normal Azure endpoints, Azurite endpoints, SAS query/fragment 
removal, SAS-in-path removal, and fallback paths. The logging docs example now 
shows `account/container/blob`.
   
   Tests:
   
   - `uv run --project providers/microsoft/azure ruff check 
providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py
 
providers/microsoft/azure/tests/unit/microsoft/azure/log/test_wasb_task_handler.py`
   - `uv run --project providers/microsoft/azure pytest 
providers/microsoft/azure/tests/unit/microsoft/azure/log/test_wasb_task_handler.py
 -q`
   - `git diff --check`
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes, OpenAI Codex was used to help prepare the patch and PR text. 
Claude Code and Gemini were used to review the diff. The code and tests were 
checked locally before submission.
   
   Generated-by: OpenAI Codex following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


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