ferruzzi commented on code in PR #27116:
URL: https://github.com/apache/airflow/pull/27116#discussion_r1001009198


##########
airflow/providers/cncf/kubernetes/hooks/kubernetes.py:
##########
@@ -329,11 +329,18 @@ def get_custom_object(
     def get_namespace(self) -> str | None:
         """Returns the namespace that defined in the connection"""
         if self.conn_id:
-            connection = self.get_connection(self.conn_id)
-            extras = connection.extra_dejson
-            namespace = extras.get("extra__kubernetes__namespace", "default")
-            return namespace
-        return None
+            namespace = self.conn_extras.get("extra__kubernetes__namespace")

Review Comment:
   Non-blocking:   I can't seem to find it now, but I thought there was recent 
discussion about removing the "extra__" part of these index names.  I could be 
completely mistaken though and I can't find it now so maybe I'm just making 
this up.



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