hussein-awala commented on code in PR #34996:
URL: https://github.com/apache/airflow/pull/34996#discussion_r1376885634


##########
airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py:
##########
@@ -111,6 +111,11 @@ def _get_namespace_event_stream(self, namespace, 
query_kwargs=None):
                 raise
 
     def execute(self, context: Context):
+        if isinstance(self.application_file, str):

Review Comment:
   ```python
       def __init__(
           self,
           *,
           application_file: str,
           namespace: str | None = None,
   ```
   The current type is string, if you want to support other types, you need to 
update the type of this parameter (and its doc.)



##########
airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py:
##########
@@ -111,6 +111,11 @@ def _get_namespace_event_stream(self, namespace, 
query_kwargs=None):
                 raise
 
     def execute(self, context: Context):
+        if isinstance(self.application_file, str):
+            body = _load_body_to_dict(self.application_file)
+        else:
+            body = self.application_file
+
         body = _load_body_to_dict(self.application_file)

Review Comment:
   I think this line should be removed, no?



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