hussein-awala opened a new pull request, #74731:
URL: https://github.com/apache/airflow/pull/74731

   ## Summary
   
   Use `httpx2` throughout the Dag processor Execution API client and its 
tests, matching the Task SDK base client migrated in #73116. Imports and 
references use `httpx2` explicitly, without an alias.
   
   This fixes both `mypy-airflow-core` override errors (`_update_auth` and 
`request`) and the runtime mismatch: `httpx` exception handlers do not catch 
`httpx2` errors, and `httpx.Timeout` objects are incompatible with the new 
client. Those failures affect credential renewal, registration retirement, and 
closed-Job handling.
   
   ## Why #73116 did not catch this
   
   The two changes landed independently:
   
   - #73116's final head was `b312d3df05ecc229a8fcc2106b252cfa2ef459d4`. 
Neither `airflow-core/src/airflow/dag_processing/api_client.py` nor its test 
file exists in that tree. Its [visible successful AMD CI 
run](https://github.com/apache/airflow/actions/runs/38404776005) started on 
October 13, before the new processor client merged.
   - #74370 introduced the processor client and merged as `a73ffaedbf` on 
October 14 at 07:40 UTC, using the then-current `httpx` SDK client.
   - #73116 merged as `63f5845dd2` at 09:27 UTC that day, changing the SDK base 
client to `httpx2` without migrating the newly added subclass.
   
   The passing pre-merge checks therefore predated this incompatible 
combination. This is an integration gap between independently validated 
changes, not an error mypy is unable to detect. The import ban added by #73116 
is scoped to `task-sdk/pyproject.toml`; it does not cover this `airflow-core` 
subclass. Git history establishes the branch contents and merge ordering; 
individual CI job logs were not available through the public checks view.
   
   ## Validation
   
   - Reproduced exactly two `mypy-airflow-core` errors before the production 
fix; the hook now passes, including during commit. No mypy suppression or hook 
exclusion was added.
   - Updated the existing tests to use `httpx2` responses and transport first: 
**29 failed, 61 passed** with the unfixed production client. After the fix: 
**90 passed**.
   - Regular static checks and applicable manual checks passed. Manual checks 
excluded only the three long-running/opt-in hooks documented in the 
contribution workflow.
   - Selected core non-database suites on Python 3.11: **5,345 passed, 11 
skipped, 2 xfailed**.
   - `breeze build-docs apache-airflow`: **passed**.
   - Selected SQLite database suites were attempted but the invocation hit its 
eight-minute execution limit before all suites completed. **This is incomplete 
validation, not a passing result.**
   
   Related: #73116, #74370, #74244. The broader core migration in draft #74244 
currently does not modify these Dag processor files; this is a targeted fix for 
the already-merged SDK migration.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Pi coding agent 1.1.0 (OpenAI)
   
   Generated-by: Pi coding agent 1.1.0 (OpenAI) 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