From e81a4b55f8b8e37d1c161fd6feb5fdd271a600a5 Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Thu, 21 May 2020 12:11:06 +0100 Subject: [PATCH] Add note in Updating.md about the removel of DagRun.ID_PREFIX --- UPDATING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/UPDATING.md b/UPDATING.md index e4e6c5f0b8b64..a4c324edcf7e3 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -101,6 +101,30 @@ To maintain consistent behavior, both successful or skipped downstream task can `wait_for_downstream=True` flag. +### Use DagRunType.SCHEDULED.value instead of DagRun.ID_PREFIX + +All the run_id prefixes for different kind of DagRuns have been grouped into a single +enum in `airflow.utils.types.DagRunType`. + +Previously, there were defined in various places, example as `ID_PREFIX` class variables for +`DagRun`, `BackfillJob` and in `_trigger_dag` function. + +Was: + +```python +>> from airflow.models.dagrun import DagRun +>> DagRun.ID_PREFIX +scheduled__ +``` + +Replaced by: + +```python +>> from airflow.utils.types import DagRunType +>> DagRunType.SCHEDULED.value +scheduled +``` + ### Ability to patch Pool.DEFAULT_POOL_NAME in BaseOperator It was not possible to patch pool in BaseOperator as the signature sets the default value of pool as Pool.DEFAULT_POOL_NAME.