techcodie commented on PR #63775:
URL: https://github.com/apache/airflow/pull/63775#issuecomment-4117802231

   Thanks for the pointers, @mwojtyczka! I've addressed those points in the 
latest push:
   - **Deduplication**: Extracted host resolution into 
[_resolve_host_from_conn](cci:1://file:///Users/anshbaheti/airflow/airflow/providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py:224:4-236:19)
 used by both 
[host](cci:1://file:///Users/anshbaheti/airflow/airflow/providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py:215:4-217:65)
 and 
[a_host](cci:1://file:///Users/anshbaheti/airflow/airflow/providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py:219:4-222:49).
   - **Async Robustness**: Updated 
[_a_get_sp_token](cci:1://file:///Users/anshbaheti/airflow/airflow/providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py:331:4-365:34)
 and 
[_a_get_aad_token](cci:1://file:///Users/anshbaheti/airflow/airflow/providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py:412:4-458:34)
 to use `self._get_connection_attr("login", conn)` to ensure they raise 
`ValueError` for missing credentials.
   - **Improved Types**: Added `AnyConnection` for better Airflow 2/3 
compatibility in the async signatures.
   - **Clarification**: Added a comment explaining the safety of the connection 
cache for triggers.
   - **Test Consistency**: Updated 
[test_cancel_run](cci:1://file:///Users/anshbaheti/airflow/airflow/providers/databricks/tests/unit/databricks/hooks/test_databricks.py:719:4-732:9)
 return value mocks to `{}` for consistency with the sync path.
   All 229 tests passed locally. Ready for another check!


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