XD-DENG commented on a change in pull request #14323:
URL: https://github.com/apache/airflow/pull/14323#discussion_r579506512
##########
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:
maybe can use the existing `self.fail()` method?
----------------------------------------------------------------
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]