Vamsi-klu commented on code in PR #68527:
URL: https://github.com/apache/airflow/pull/68527#discussion_r3410088766


##########
providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py:
##########
@@ -233,6 +238,47 @@ def _get_connection_attr(self, attr_name: str) -> str:
             raise ValueError(f"`{attr_name}` must be present in Connection")
         return attr
 
+    @cached_property
+    def proxies(self) -> dict[str, str] | None:
+        """Return validated proxy configuration from connection extras."""
+        extra_dejson = self.databricks_conn.extra_dejson

Review Comment:
   Thanks — I made proxy parsing fail-fast and deterministic by validating 
`extra_dejson` type, `proxies` shape, and values with explicit 
`DatabricksProxyConfigurationError` messages that include concrete runtime type 
details for malformed inputs



##########
providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py:
##########
@@ -445,7 +495,9 @@ def _get_aad_token_for_default_az_credential(self, 
resource: str) -> str:
                     #
                     # While there is a WorkloadIdentityCredential class, the 
below class is advised by Microsoft
                     # 
https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview
-                    token = 
DefaultAzureCredential().get_token(f"{resource}/.default")
+                    token = 
DefaultAzureCredential(**self._get_azure_credential_kwargs()).get_token(

Review Comment:
   Thanks — I updated both sync and async default Azure credential paths to use 
helper-based class/kwargs construction, and added tests that assert proxy 
kwargs are passed when configured and filtered safely when unsupported 
constructor params are encountered



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