uranusjr commented on code in PR #46460:
URL: https://github.com/apache/airflow/pull/46460#discussion_r1952075236


##########
airflow/models/taskinstance.py:
##########
@@ -2034,20 +2034,22 @@ def generate_command(
     def log_url(self) -> str:
         """Log URL for TaskInstance."""
         run_id = quote(self.run_id)
-        base_date = quote(self.logical_date.strftime("%Y-%m-%dT%H:%M:%S%z"))
         base_url = conf.get_mandatory_value("webserver", "BASE_URL")
         map_index = f"&map_index={self.map_index}" if self.map_index >= 0 else 
""
-        return (
+        _log_uri = (
             f"{base_url}"
             f"/dags"
             f"/{self.dag_id}"
             f"/grid"
             f"?dag_run_id={run_id}"
             f"&task_id={self.task_id}"
             f"{map_index}"
-            f"&base_date={base_date}"
             "&tab=logs"
         )
+        if self.logical_date:
+            base_date = 
quote(self.logical_date.strftime("%Y-%m-%dT%H:%M:%S%z"))
+            _log_uri = f"{_log_uri}&base_date={base_date}"
+        return _log_uri

Review Comment:
   Let’s create an issue to track this. (I’m not sure what `base_date` even 
does.)



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