potiuk commented on a change in pull request #6596: [AIRFLOW-6004] Untangle 
Executors class to avoid cyclic imports
URL: https://github.com/apache/airflow/pull/6596#discussion_r352328151
 
 

 ##########
 File path: airflow/executors/kubernetes_executor.py
 ##########
 @@ -703,10 +735,12 @@ def _create_or_update_secret(secret_name, secret_path):
             for service_account in name_path_pair_list:
                 _create_or_update_secret(service_account['name'], 
service_account['path'])
 
-    def start(self):
+    def start(self) -> None:
         """Starts the executor"""
         self.log.info('Start Kubernetes executor')
         self.worker_uuid = 
KubeWorkerIdentifier.get_or_create_current_kube_worker_uuid()
+        if not self.worker_uuid:
+            raise AirflowException("Could not get worker_uuid")
 
 Review comment:
   Yeah. We have not used asserts too much in the core part, but I would also 
prefer to use more of it. @ashb - what do you think of that ?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to