You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/19 22:43:24 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #14323: Scheduler should not fail when invalid executor_config is passed

kaxil commented on a change in pull request #14323:
URL: https://github.com/apache/airflow/pull/14323#discussion_r579520804



##########
File path: airflow/executors/kubernetes_executor.py
##########
@@ -490,7 +490,13 @@ def execute_async(
     ) -> None:
         """Executes task asynchronously"""
         self.log.info('Add task %s with command %s with executor_config %s', key, command, executor_config)
-        kube_executor_config = PodGenerator.from_obj(executor_config)
+        try:
+            kube_executor_config = PodGenerator.from_obj(executor_config)
+        except Exception:  # pylint: disable=broad-except
+            self.log.error("Invalid executor_config for %s", key)
+            self.change_state(key=key, state=State.FAILED, info="Invalid executor_config passed")

Review comment:
       I want to remove it from self.executor.running too which is done by self.change_state




----------------------------------------------------------------
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:
users@infra.apache.org