Shaan-alpha commented on PR #66886:
URL: https://github.com/apache/airflow/pull/66886#issuecomment-4485792842

   Thanks @potiuk for the triage — pushed `e9da47e` addressing all three 
categories:
   
   - **Provider tests (Compat 2.11.1 / 3.0.6 / 3.1.8 / 3.2.1, Non-DB 
common.compat...google, Low-dep databricks)** — these ~30 `AttributeError: 
'NoneType' object has no attribute 'get'` failures all reduced to one root 
cause: pre-existing Databricks operator tests call `op.execute(None)`, and 
`_inject_query_tags` was unconditionally calling `context.get(...)`. Added an 
early-return for falsy context in `_inject_query_tags` so the existing tests 
are unaffected and the public `execute()` stays tolerant. The new behavioral 
test `test_query_tags_injection_with_empty_context` continues to assert the 
no-op path explicitly.
   - **MyPy providers checks** — `_escape_query_tag_value` was annotated 
`(value: str)` but the call site passes a value derived from `context.get(...)` 
/ `getattr(...)`, which MyPy widens to `object`. The function already does 
`str(value)` internally, so broadened the parameter type to `object` — resolves 
the `[arg-type]` error at `databricks_sql.py:80` without changing behavior.
   - **CI image checks / Static checks** — two test files had multi-line 
parenthesized `assert` expressions that pinned `ruff==0.15.12` wanted 
collapsed. Ran `ruff format`.
   
   Verified locally: `ruff format --check`, `ruff check`, mypy on the file, and 
a focused repro that confirms `execute(None)` no longer raises while the 
positive injection path still produces the expected `query_tags`. Marking ready 
for review.


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