mik-laj commented on a change in pull request #9503:
URL: https://github.com/apache/airflow/pull/9503#discussion_r448598638
##########
File path: airflow/api_connexion/endpoints/dag_run_endpoint.py
##########
@@ -69,24 +61,24 @@ def get_dag_runs(session, dag_id, start_date_gte=None,
start_date_lte=None,
# filter start date
if start_date_gte:
- query = query.filter(DagRun.start_date >= start_date_gte)
+ query = query.filter(DagRun.start_date >=
timezone.parse(start_date_gte))
Review comment:
To be honest I have mixed feelings. I wanted to remove custom code, but
adding rfc3339-validator does not meet all of our requirements. We need to
validate and convert parameters, but it is not possible to do it elegantly in
connexion.
When we convert these parameters before executing the function logic, we can
write more generic code.
https://github.com/apache/airflow/blob/37761e39587634bf524342e7cf465b1397320659/airflow/api_connexion/endpoints/task_instance_endpoint.py
The _apply_range_filter method can be used for datetime and duration. Both
types are supported.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]