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/09/01 09:48:49 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #17649: Do not fail KubernetesPodOperator tasks if log following fails

potiuk commented on a change in pull request #17649:
URL: https://github.com/apache/airflow/pull/17649#discussion_r700041759



##########
File path: airflow/providers/cncf/kubernetes/utils/pod_launcher.py
##########
@@ -244,7 +254,9 @@ def read_pod_logs(
                 **additional_kwargs,
             )
         except BaseHTTPError as e:
-            raise AirflowException(f'There was an error reading the kubernetes API: {e}')
+            self.log.warning(f'There was an error reading the kubernetes API: {e}')
+            # Reraise to be catched by self.monitor_pod.
+            raise

Review comment:
       Yep. With tenacity we want to rety, I think removing raise was accidental suggestion. 
   The `log.exception` is better as it provides more information about the exception raised (and it's more explicit way of handling logs in exception).




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org