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


##########
airflow/utils/types.py:
##########
@@ -42,7 +43,11 @@ class DagRunType(str, enum.Enum):
     def __str__(self) -> str:
         return self.value
 
-    def generate_run_id(self, logical_date: datetime) -> str:
+    def generate_run_id(self, logical_date: datetime | None, run_after: 
datetime | None) -> str:
+        if logical_date is None:
+            if run_after is None:
+                raise ValueError("run_after cannot be None")
+            return run_after + get_random_string()
         return f"{self}__{logical_date.isoformat()}"

Review Comment:
   I would move random string generation to DagRun.



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