sunank200 commented on code in PR #46398:
URL: https://github.com/apache/airflow/pull/46398#discussion_r1948896067
##########
airflow/api_connexion/schemas/dag_run_schema.py:
##########
@@ -88,7 +88,8 @@ def autogenerate(self, data, **kwargs):
if "dag_run_id" not in data:
try:
data["dag_run_id"] = DagRun.generate_run_id(
- DagRunType.MANUAL, timezone.parse(data["logical_date"])
+ DagRunType.MANUAL,
+ timezone.parse(data["logical_date"]),
)
Review Comment:
I have changed it here: https://github.com/apache/airflow/pull/46616
##########
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 have changed it here: https://github.com/apache/airflow/pull/46616
##########
airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -371,6 +371,7 @@ def trigger_dag_run(
run_type=DagRunType.MANUAL,
logical_date=logical_date,
data_interval=data_interval,
+ run_after=data_interval.end,
Review Comment:
I have changed it here: https://github.com/apache/airflow/pull/46616
--
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]