vchiapaikeo commented on code in PR #35403:
URL: https://github.com/apache/airflow/pull/35403#discussion_r1408433601
##########
airflow/www/views.py:
##########
@@ -3527,13 +3527,15 @@ def grid_data(self):
with create_session() as session:
query = select(DagRun).where(DagRun.dag_id == dag.dag_id,
DagRun.execution_date <= base_date)
- run_type = request.args.get("run_type")
- if run_type:
- query = query.where(DagRun.run_type == run_type)
-
- run_state = request.args.get("run_state")
- if run_state:
- query = query.where(DagRun.state == run_state)
+ run_type_raw = request.args.get("run_type")
+ if run_type_raw:
+ run_types = {run_type.strip() for run_type in
run_type_raw.split(",")}
+ query = query.where(DagRun.run_type.in_(run_types))
+
+ run_state_raw = request.args.get("run_state")
+ if run_state_raw:
+ run_states = {run_state.strip() for run_state in
run_state_raw.split(",")}
+ query = query.where(DagRun.state.in_(run_states))
Review Comment:
Ok. This will require a bit of refactoring. Give me a couple days.
--
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]