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/05/03 18:20:14 UTC

[GitHub] [airflow] dimberman commented on a change in pull request #15638: Fix issue with parsing error logs in the KPO

dimberman commented on a change in pull request #15638:
URL: https://github.com/apache/airflow/pull/15638#discussion_r625274292



##########
File path: airflow/providers/cncf/kubernetes/utils/pod_launcher.py
##########
@@ -183,7 +186,12 @@ def parse_log_line(self, line: str) -> Tuple[str, str]:
             raise Exception(f'Log not in "{{timestamp}} {{log}}" format. Got: {line}')
         timestamp = line[:split_at]
         message = line[split_at + 1 :].rstrip()
-        return timestamp, message
+        try:
+            last_log_time = pendulum.parse(timestamp)
+        except ParserError:
+            self.log.error("Error parsing timestamp. Will continue execution but won't update timestamp")

Review comment:
       @ashb using a print statement?




-- 
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