uranusjr commented on code in PR #46390:
URL: https://github.com/apache/airflow/pull/46390#discussion_r1948530388
##########
airflow/api_fastapi/core_api/datamodels/dag_run.py:
##########
@@ -96,18 +96,16 @@ def check_data_intervals(cls, values):
)
return values
+ ## when logical date is null, the run id should be generated from
run_after + random string.
+ # TODO we need to modify this validator after
https://github.com/apache/airflow/pull/46398 is merged
Review Comment:
```suggestion
## when logical date is null, the run id should be generated from
run_after + random string.
# TODO: AIP83: we need to modify this validator after
https://github.com/apache/airflow/pull/46398 is merged
```
Just so we can find this easier later.
##########
airflow/api_fastapi/core_api/datamodels/dag_run.py:
##########
@@ -96,18 +96,16 @@ def check_data_intervals(cls, values):
)
return values
+ ## when logical date is null, the run id should be generated from
run_after + random string.
+ # TODO we need to modify this validator after
https://github.com/apache/airflow/pull/46398 is merged
@model_validator(mode="after")
def validate_dag_run_id(self):
if not self.dag_run_id:
- self.dag_run_id = DagRun.generate_run_id(DagRunType.MANUAL,
self.logical_date)
+ self.dag_run_id = DagRun.generate_run_id(
+ DagRunType.MANUAL, self.logical_date if self.logical_date is
not None else pendulum.now("UTC")
Review Comment:
```suggestion
DagRunType.MANUAL, self.logical_date or pendulum.now("UTC")
```
--
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]