ramandumcs commented on a change in pull request #4941: [AIRFLOW-4123] Add
Exception handling for _change_state method in K8 …
URL: https://github.com/apache/airflow/pull/4941#discussion_r266769867
##########
File path: airflow/contrib/executors/kubernetes_executor.py
##########
@@ -660,7 +660,12 @@ def sync(self):
key, state, pod_id, resource_version = results
last_resource_version = resource_version
self.log.info('Changing state of %s to %s', results, state)
- self._change_state(key, state, pod_id)
+ try:
+ self._change_state(key, state, pod_id)
+ except Exception as e:
+ self.log.exception('Exception: %s when attempting ' +
+ 'to change state of %s to %s,
re-queueing.', e, results, state,)
Review comment:
Trailing "," is unnecessary
----------------------------------------------------------------
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