gopidesupavan commented on code in PR #42427:
URL: https://github.com/apache/airflow/pull/42427#discussion_r1778273567
##########
airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py:
##########
@@ -282,6 +286,8 @@ def custom_obj_api(self) -> CustomObjectsApi:
return CustomObjectsApi()
def execute(self, context: Context):
+ self.name = self.create_job_name()
Review Comment:
Thanks rom for the review,
Yes there are two things i noticed if we call it from __init__,
1. create_job requires other properties `template_body` , this is being
build using another method `manage_template_specs`. so when ever it class init
the create_job triggers computation , i feel triggering computation on __init__
is not good , performance is not efficient ?.
2. In this case am getting type errors
` File
"/opt/airflow/airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py",
line 154, in manage_template_specs
raise TypeError(msg)
TypeError: application_file body can't transformed into the dictionary:
example_spark_kubernetes_spark_pi.yaml`
--
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]