mik-laj commented on a change in pull request #7583: [AIRFLOW-6954] Use
DagRunType instead of ID_PREFIX in run_id
URL: https://github.com/apache/airflow/pull/7583#discussion_r386045883
##########
File path: airflow/api/common/experimental/mark_tasks.py
##########
@@ -187,7 +188,7 @@ def get_subdag_runs(dag, session, state, task_ids, commit,
confirmed_dates):
dag_runs = _create_dagruns(current_task.subdag,
execution_dates=confirmed_dates,
state=State.RUNNING,
-
run_id_template=BackfillJob.ID_FORMAT_PREFIX)
+
run_id_template=DagRunType.BACKFILL_JOB.value + "{}")
Review comment:
We need to standardize it if we want to introduce a new column in the table
later. I would be happy if this PR cleaned up all the weirdnesses about
DagRunType. In the next PR, we will update the database model and queries.
Cleaning up this mess is crucial for performance.
```
select * from test_runs where run_type=‘{}’
(0.0284, 0.037, 0.025)
select * from test_runs where run_id like ‘{}%’
(0.0426, 0.0531, 0.0377)
type / like [-33.35%, -28.89%, -32.99%]
(avg, min, max)
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services