yuyua9 opened a new pull request, #71359: URL: https://github.com/apache/airflow/pull/71359
Invalid Anthropic Workload Identity Federation configuration currently raises a raw KeyError when a required field is missing, which makes connection setup failures harder to diagnose. This PR: - Validates the four required `workload_identity` fields before indexing them. - Raises `AnthropicError` listing missing or empty fields. - Adds parameterized regression tests for missing and empty values while preserving optional `workspace_id` and `scope` handling. Validation: - `uv run --project providers/anthropic --frozen pytest providers/anthropic/tests/unit/anthropic/hooks/test_anthropic.py -xvs` — 87 passed. - `uv run --project providers/anthropic --frozen ruff format providers/anthropic/src/airflow/providers/anthropic/hooks/anthropic.py providers/anthropic/tests/unit/anthropic/hooks/test_anthropic.py` - `uv run --project providers/anthropic --frozen ruff check --fix providers/anthropic/src/airflow/providers/anthropic/hooks/anthropic.py providers/anthropic/tests/unit/anthropic/hooks/test_anthropic.py` - The Breeze provider test command was not run because Breeze is unavailable in the local environment. ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Codex (GPT-5) Generated-by: Codex (GPT-5) 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]
