jason810496 commented on code in PR #65232:
URL: https://github.com/apache/airflow/pull/65232#discussion_r3098204123


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -1051,11 +1051,17 @@ def _clean(self, event: dict[str, Any], result: dict | 
None, context: Context) -
         reraise=True,
     )
     def _write_logs(self, pod: k8s.V1Pod, follow: bool = False, since_time: 
DateTime | None = None) -> None:
-        since_seconds = (
-            math.ceil((datetime.datetime.now(tz=datetime.timezone.utc) - 
since_time).total_seconds())
-            if since_time
-            else None
-        )
+        since_seconds = None
+        if since_time:

Review Comment:
   Based on the description, would it be better to try parse the str datetime 
to actual `DateTime` to avoid the error and raise exception if we encounter 
error when parsing the `DateTime`? Instead of raising `TypeError` here.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to