Once TaskGroups (https://airflow.readthedocs.io/en/latest/concepts.html#taskgroup) that would be released in Airflow 2.0 reach feature parity with SubDags and we have wide adoption and feedback from users about Taskgroups we should deprecate Subdags and remove them eventually in Airflow 3.0.

Discussion Thread: https://lists.apache.org/thread.html/ra52746f9c8274469d343b5f0251199de776e75ab75ded6830886fb6a%40%3Cdev.airflow.apache.org%3E
tests/operators/test_subdag_operator.py
"""
        Creating a sub DAG within a main DAG's context manager
        """
        with DAG('parent', default_args=default_args) as dag:
            subdag = DAG('parent.test', default_args=default_args)
            op = SubDagOperator(task_id='test', subdag=subdag)
            assert op.dag == dag
            assert op.subdag == subdag
    def test_subdag_pools(self):
        """
        Subdags and subdag tasks can't both have a pool with 1 slot
        """
        dag = DAG('parent', default_args=default_args)
        subdag = DAG('parent.child', default_args=default_args)
        session = airflow.settings.Session()
        pool_1 = airflow.models.Pool(pool='test_pool_1', slots=1)
        pool_10 = airflow.models.Pool(pool='test_pool_10', slots=10)
        session.add(pool_1)
        session.add(pool_10)
        session.commit()
        DummyOperator(task_id='dummy', dag=subdag, pool='test_pool_1')
        with pytest.raises(AirflowException):
            SubDagOperator(task_id='child', dag=dag, subdag=subdag, pool='test_pool_1')
        
        dag = DAG('parent', default_args=default_args)
        SubDagOperator(task_id='child', dag=dag, subdag=subdag, pool='test_pool_10')
        session.delete(pool_1)
        session.delete(pool_10)
        session.commit()
    def test_subdag_pools_no_possible_conflict(self):