jason810496 commented on code in PR #68682:
URL: https://github.com/apache/airflow/pull/68682#discussion_r3587377720
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -571,9 +587,41 @@ def get_dag_runs(
use_cursor = cursor is not None
query = select(DagRun).options(*eager_load_dag_run_for_list())
+ partition_date_local_day: RangeFilter | None = None
if dag_id != "~":
- get_latest_version_of_dag(dag_bag, dag_id, session) # Check if the
Dag exists.
+ dag = get_latest_version_of_dag(dag_bag, dag_id, session) # Check if
the Dag exists.
query = query.filter(DagRun.dag_id == dag_id).options()
+ # This endpoint accepts date-only bounds, so convert the inclusive
local calendar
+ # day window to a half-open datetime interval.
DagRun.apply_partition_date_window
Review Comment:
As the comment mentioned, why not reuse `DagRun.apply_partition_date_window`
directly?
It seems we're duplicating the `DagRun.apply_partition_date_window` again at
router level.
It should be fine to apply the `where` statement anyway.
--
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]