diff --git a/UPDATING.md b/UPDATING.md index 4f2b8444794d6..969d1b851e196 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -214,6 +214,18 @@ The following metrics are deprecated and won't be emitted in Airflow 2.0: No breaking changes. +## CP + +### 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. +While using subdagoperator in unittest(without initializing the sqlite db), it was throwing the +following error: +``` +sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: slot_pool. +``` +Fix for this, https://github.com/apache/airflow/pull/8587 + ## Airflow 1.10.4 ### Export MySQL timestamps as UTC diff --git a/airflow/models/baseoperator.py b/airflow/models/baseoperator.py index 266ad64d08a0a..65cbc7bc5d1ec 100644 --- a/airflow/models/baseoperator.py +++ b/airflow/models/baseoperator.py @@ -309,7 +309,7 @@ def __init__( priority_weight=1, # type: int weight_rule=WeightRule.DOWNSTREAM, # type: str queue=conf.get('celery', 'default_queue'), # type: str - pool=Pool.DEFAULT_POOL_NAME, # type: str + pool=None, # type: str pool_slots=1, # type: int sla=None, # type: Optional[timedelta] execution_timeout=None, # type: Optional[timedelta] @@ -379,7 +379,7 @@ def __init__( self._schedule_interval = schedule_interval self.retries = retries self.queue = queue - self.pool = pool + self.pool = Pool.DEFAULT_POOL_NAME if pool is None else pool self.pool_slots = pool_slots if self.pool_slots < 1: raise AirflowException("pool slots for %s in dag %s cannot be less than 1"