fbertos commented on a change in pull request #20485:
URL: https://github.com/apache/airflow/pull/20485#discussion_r776866273



##########
File path: airflow/api_connexion/endpoints/dag_run_endpoint.py
##########
@@ -164,6 +165,9 @@ def get_dag_runs(
     else:
         query = query.filter(DagRun.dag_id == dag_id)
 
+    if state:
+        query = query.filter(DagRun.state.in_(state))

Review comment:
       After testing the change "Optional[List[str]]" I will need to change 
back the datatype to as with that change I can not pass the tests, errors 
detected in mypy checks:
   
   airflow/plugins_manager.py:474: error: Incompatible types in assignment
   (expression has type "Set[str]", variable has type "Optional[List[str]]")
               attrs_to_dump = PLUGINS_ATTRIBUTES_TO_DUMP
                               ^
   airflow/plugins_manager.py:479: error: Item "None" of "Optional[List[str]]" 
has
   no attribute "__iter__" (not iterable)




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