mwojtyczka commented on code in PR #63611:
URL: https://github.com/apache/airflow/pull/63611#discussion_r2938982078
##########
providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py:
##########
@@ -292,11 +324,10 @@ async def _a_get_sp_token(self, resource: str) -> str:
try:
async for attempt in self._a_get_retry_object():
with attempt:
+ conn = await self.adatabricks_conn()
Review Comment:
In the PR, `_a_get_aad_token` fetches conn once before the loop:
```
conn = await self.adatabricks_conn()
async for attempt in self._a_get_retry_object():
```
But `_a_get_sp_token` fetches conn inside each attempt. Both are correct due
to caching, but `_a_get_sp_token` should match `_a_get_aad_token's` style and
fetch before the loop.
--
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]