This is an automated email from the ASF dual-hosted git repository.

dstandish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 5383d57e20 Remove feature flag for AIP-52 (#31034)
5383d57e20 is described below

commit 5383d57e20f20672b9f9fa21d1118ddc7e13396b
Author: Daniel Standish <[email protected]>
AuthorDate: Fri May 5 00:52:00 2023 -0700

    Remove feature flag for AIP-52 (#31034)
    
    No longer needed because we will complete this for 2.7
---
 .github/workflows/ci.yml                           |  2 -
 airflow/decorators/setup_teardown.py               |  7 --
 airflow/example_dags/example_setup_teardown.py     | 34 +++++-----
 .../example_setup_teardown_taskflow.py             | 74 +++++++++++-----------
 airflow/models/baseoperator.py                     | 10 ---
 airflow/settings.py                                |  4 --
 .../airflow_breeze/utils/docker_command_utils.py   |  1 -
 scripts/ci/docker-compose/_docker.env              |  1 -
 scripts/ci/docker-compose/base.yml                 |  1 -
 scripts/ci/docker-compose/devcontainer.env         |  1 -
 tests/always/test_example_dags.py                  |  4 --
 tests/conftest.py                                  |  1 -
 tests/decorators/test_external_python.py           |  4 --
 tests/decorators/test_python.py                    |  3 -
 tests/decorators/test_python_virtualenv.py         |  4 --
 tests/decorators/test_setup_teardown.py            |  2 -
 tests/models/test_taskinstance.py                  |  3 +-
 .../cncf/kubernetes/decorators/test_kubernetes.py  |  3 -
 tests/providers/docker/decorators/test_docker.py   |  4 --
 tests/serialization/test_dag_serialization.py      |  2 -
 tests/ti_deps/deps/test_trigger_rule_dep.py        |  2 -
 tests/www/views/test_views_acl.py                  |  4 +-
 22 files changed, 54 insertions(+), 117 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index efb5fc32f6..a608dec31f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -46,7 +46,6 @@ env:
   USE_SUDO: "true"
   INCLUDE_SUCCESS_OUTPUTS: "true"
   AIRFLOW_ENABLE_AIP_44: "true"
-  AIRFLOW_ENABLE_AIP_52: "true"
 
 concurrency:
   group: ci-${{ github.event.pull_request.number || github.ref }}
@@ -1066,7 +1065,6 @@ jobs:
       POSTGRES_VERSION: 
"${{needs.build-info.outputs.default-postgres-version}}"
       BACKEND_VERSION: "${{needs.build-info.outputs.default-postgres-version}}"
       AIRFLOW_ENABLE_AIP_44: "false"
-      AIRFLOW_ENABLE_AIP_52: "false"
       JOB_ID: >
         
postgres-in-progress-disabled-${{needs.build-info.outputs.default-python-version}}-
         ${{needs.build-info.outputs.default-postgres-version}}
diff --git a/airflow/decorators/setup_teardown.py 
b/airflow/decorators/setup_teardown.py
index aa55cc5643..8fccdb9fe5 100644
--- a/airflow/decorators/setup_teardown.py
+++ b/airflow/decorators/setup_teardown.py
@@ -22,13 +22,9 @@ from typing import Callable
 from airflow import AirflowException
 from airflow.decorators import python_task
 from airflow.decorators.task_group import _TaskGroupFactory
-from airflow.settings import _ENABLE_AIP_52
 
 
 def setup_task(func: Callable) -> Callable:
-    if not _ENABLE_AIP_52:
-        raise AirflowException("AIP-52 Setup tasks are disabled.")
-
     # Using FunctionType here since _TaskDecorator is also a callable
     if isinstance(func, types.FunctionType):
         func = python_task(func)
@@ -39,9 +35,6 @@ def setup_task(func: Callable) -> Callable:
 
 
 def teardown_task(_func=None, *, on_failure_fail_dagrun: bool = False) -> 
Callable:
-    if not _ENABLE_AIP_52:
-        raise AirflowException("AIP-52 Teardown tasks are disabled.")
-
     def teardown(func: Callable) -> Callable:
         # Using FunctionType here since _TaskDecorator is also a callable
         if isinstance(func, types.FunctionType):
diff --git a/airflow/example_dags/example_setup_teardown.py 
b/airflow/example_dags/example_setup_teardown.py
index b193b108fd..9b2b6b6814 100644
--- a/airflow/example_dags/example_setup_teardown.py
+++ b/airflow/example_dags/example_setup_teardown.py
@@ -22,25 +22,23 @@ import pendulum
 
 from airflow.models.dag import DAG
 from airflow.operators.bash import BashOperator
-from airflow.settings import _ENABLE_AIP_52
 from airflow.utils.task_group import TaskGroup
 
-if _ENABLE_AIP_52:
-    with DAG(
-        dag_id="example_setup_teardown",
-        start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
-        catchup=False,
-        tags=["example"],
-    ) as dag:
-        BashOperator.as_setup(task_id="root_setup", bash_command="echo 'Hello 
from root_setup'")
-        normal = BashOperator(task_id="normal", bash_command="echo 'I am just 
a normal task'")
-        BashOperator.as_teardown(task_id="root_teardown", bash_command="echo 
'Goodbye from root_teardown'")
+with DAG(
+    dag_id="example_setup_teardown",
+    start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
+    catchup=False,
+    tags=["example"],
+) as dag:
+    BashOperator.as_setup(task_id="root_setup", bash_command="echo 'Hello from 
root_setup'")
+    normal = BashOperator(task_id="normal", bash_command="echo 'I am just a 
normal task'")
+    BashOperator.as_teardown(task_id="root_teardown", bash_command="echo 
'Goodbye from root_teardown'")
 
-        with TaskGroup("section_1") as section_1:
-            BashOperator.as_setup(task_id="taskgroup_setup", 
bash_command="echo 'Hello from taskgroup_setup'")
-            BashOperator(task_id="normal", bash_command="echo 'I am just a 
normal task'")
-            BashOperator.as_setup(
-                task_id="taskgroup_teardown", bash_command="echo 'Hello from 
taskgroup_teardown'"
-            )
+    with TaskGroup("section_1") as section_1:
+        BashOperator.as_setup(task_id="taskgroup_setup", bash_command="echo 
'Hello from taskgroup_setup'")
+        BashOperator(task_id="normal", bash_command="echo 'I am just a normal 
task'")
+        BashOperator.as_setup(
+            task_id="taskgroup_teardown", bash_command="echo 'Hello from 
taskgroup_teardown'"
+        )
 
-        normal >> section_1
+    normal >> section_1
diff --git a/airflow/example_dags/example_setup_teardown_taskflow.py 
b/airflow/example_dags/example_setup_teardown_taskflow.py
index 4f35585338..7e47475d16 100644
--- a/airflow/example_dags/example_setup_teardown_taskflow.py
+++ b/airflow/example_dags/example_setup_teardown_taskflow.py
@@ -22,51 +22,49 @@ import pendulum
 
 from airflow.decorators import setup, task, task_group, teardown
 from airflow.models.dag import DAG
-from airflow.settings import _ENABLE_AIP_52
 
-if _ENABLE_AIP_52:
-    with DAG(
-        dag_id="example_setup_teardown_taskflow",
-        start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
-        catchup=False,
-        tags=["example"],
-    ) as dag:
-        # You can use the setup and teardown decorators to add setup and 
teardown tasks at the DAG level
+with DAG(
+    dag_id="example_setup_teardown_taskflow",
+    start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
+    catchup=False,
+    tags=["example"],
+) as dag:
+    # You can use the setup and teardown decorators to add setup and teardown 
tasks at the DAG level
+    @setup
+    @task
+    def root_setup():
+        print("Hello from root_setup")
+
+    @teardown
+    @task
+    def root_teardown():
+        print("Goodbye from root_teardown")
+
+    @task
+    def normal():
+        print("I am just a normal task")
+
+    @task_group
+    def section_1():
+        # You can also have setup and teardown tasks at the task group level
         @setup
         @task
-        def root_setup():
-            print("Hello from root_setup")
+        def my_setup():
+            print("I set up")
 
         @teardown
         @task
-        def root_teardown():
-            print("Goodbye from root_teardown")
+        def my_teardown():
+            print("I tear down")
 
         @task
-        def normal():
-            print("I am just a normal task")
-
-        @task_group
-        def section_1():
-            # You can also have setup and teardown tasks at the task group 
level
-            @setup
-            @task
-            def my_setup():
-                print("I set up")
-
-            @teardown
-            @task
-            def my_teardown():
-                print("I tear down")
-
-            @task
-            def hello():
-                print("I say hello")
+        def hello():
+            print("I say hello")
 
-            my_setup()
-            hello()
-            my_teardown()
+        my_setup()
+        hello()
+        my_teardown()
 
-        root_setup()
-        normal() >> section_1()
-        root_teardown()
+    root_setup()
+    normal() >> section_1()
+    root_teardown()
diff --git a/airflow/models/baseoperator.py b/airflow/models/baseoperator.py
index 1f0bd6b74c..06379592d0 100644
--- a/airflow/models/baseoperator.py
+++ b/airflow/models/baseoperator.py
@@ -962,22 +962,12 @@ class BaseOperator(AbstractOperator, 
metaclass=BaseOperatorMeta):
 
     @classmethod
     def as_setup(cls, *args, **kwargs):
-        from airflow.settings import _ENABLE_AIP_52
-
-        if not _ENABLE_AIP_52:
-            raise AirflowException("AIP-52 Setup tasks are disabled.")
-
         op = cls(*args, **kwargs)
         op._is_setup = True
         return op
 
     @classmethod
     def as_teardown(cls, *args, **kwargs):
-        from airflow.settings import _ENABLE_AIP_52
-
-        if not _ENABLE_AIP_52:
-            raise AirflowException("AIP-52 Teardown tasks are disabled.")
-
         on_failure_fail_dagrun = kwargs.pop("on_failure_fail_dagrun", False)
         if "trigger_rule" in kwargs:
             raise ValueError("Cannot set trigger rule for teardown tasks.")
diff --git a/airflow/settings.py b/airflow/settings.py
index 19e8972e94..d9a47c4a2d 100644
--- a/airflow/settings.py
+++ b/airflow/settings.py
@@ -607,10 +607,6 @@ AIRFLOW_MOVED_TABLE_PREFIX = "_airflow_moved"
 DAEMON_UMASK: str = conf.get("core", "daemon_umask", fallback="0o077")
 
 
-# AIP-52: setup/teardown (experimental)
-# This feature is not complete yet, so we disable it by default.
-_ENABLE_AIP_52 = os.environ.get("AIRFLOW_ENABLE_AIP_52", "false").lower() in 
{"true", "t", "yes", "y", "1"}
-
 # AIP-44: internal_api (experimental)
 # This feature is not complete yet, so we disable it by default.
 _ENABLE_AIP_44 = os.environ.get("AIRFLOW_ENABLE_AIP_44", "false").lower() in 
{"true", "t", "yes", "y", "1"}
diff --git a/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py 
b/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
index f3f8573bfc..cda2c485b1 100644
--- a/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
+++ b/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
@@ -598,7 +598,6 @@ def update_expected_environment_variables(env: dict[str, 
str]) -> None:
     set_value_to_default_if_not_set(env, "AIRFLOW_CONSTRAINTS_REFERENCE", 
"constraints-source-providers")
     set_value_to_default_if_not_set(env, "AIRFLOW_EXTRAS", "")
     set_value_to_default_if_not_set(env, "AIRFLOW_ENABLE_AIP_44", "true")
-    set_value_to_default_if_not_set(env, "AIRFLOW_ENABLE_AIP_52", "true")
     set_value_to_default_if_not_set(env, "ANSWER", answer if answer is not 
None else "")
     set_value_to_default_if_not_set(env, "BASE_BRANCH", "main")
     set_value_to_default_if_not_set(env, "BREEZE", "true")
diff --git a/scripts/ci/docker-compose/_docker.env 
b/scripts/ci/docker-compose/_docker.env
index 5df75461fe..ec53b2a433 100644
--- a/scripts/ci/docker-compose/_docker.env
+++ b/scripts/ci/docker-compose/_docker.env
@@ -17,7 +17,6 @@
 AIRFLOW_CI_IMAGE
 AIRFLOW_EXTRAS
 AIRFLOW_ENABLE_AIP_44
-AIRFLOW_ENABLE_AIP_52
 AIRFLOW_CONSTRAINTS_REFERENCE
 ANSWER
 BACKEND
diff --git a/scripts/ci/docker-compose/base.yml 
b/scripts/ci/docker-compose/base.yml
index f075431412..5605977ab4 100644
--- a/scripts/ci/docker-compose/base.yml
+++ b/scripts/ci/docker-compose/base.yml
@@ -30,7 +30,6 @@ services:
       - AIRFLOW_CI_IMAGE=${AIRFLOW_CI_IMAGE}
       - AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS}
       - AIRFLOW_ENABLE_AIP_44=${AIRFLOW_ENABLE_AIP_44}
-      - AIRFLOW_ENABLE_AIP_52=${AIRFLOW_ENABLE_AIP_52}
       - AIRFLOW_CONSTRAINTS_REFERENCE=${AIRFLOW_CONSTRAINTS_REFERENCE}
       - ANSWER=${ANSWER}
       - BACKEND=${BACKEND}
diff --git a/scripts/ci/docker-compose/devcontainer.env 
b/scripts/ci/docker-compose/devcontainer.env
index 7536a89a93..d2ca64922b 100644
--- a/scripts/ci/docker-compose/devcontainer.env
+++ b/scripts/ci/docker-compose/devcontainer.env
@@ -18,7 +18,6 @@ HOME=
 AIRFLOW_CI_IMAGE="ghcr.io/apache/airflow/main/ci/python3.7:latest"
 ANSWER=
 AIRFLOW_ENABLE_AIP_44="true"
-AIRFLOW_ENABLE_AIP_52="true"
 PYTHON_MAJOR_MINOR_VERSION="3.7"
 AIRFLOW_EXTRAS=
 BASE_BRANCH="main"
diff --git a/tests/always/test_example_dags.py 
b/tests/always/test_example_dags.py
index d1567c4e62..02533b21cf 100644
--- a/tests/always/test_example_dags.py
+++ b/tests/always/test_example_dags.py
@@ -23,7 +23,6 @@ from pathlib import Path
 import pytest
 
 from airflow.models import DagBag
-from airflow.settings import _ENABLE_AIP_52
 from airflow.utils import yaml
 from tests.test_utils.asserts import assert_queries_count
 
@@ -62,9 +61,6 @@ def example_not_suspended_dags():
         for candidate in candidates:
             if any(candidate.startswith(s) for s in 
suspended_providers_folders):
                 continue
-            # we will also suspend AIP-52 DAGs unless it is enabled
-            if not _ENABLE_AIP_52 and "example_setup_teardown" in candidate:
-                continue
             yield candidate
 
 
diff --git a/tests/conftest.py b/tests/conftest.py
index f169e2b62e..071a6f77a9 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -39,7 +39,6 @@ os.environ["AIRFLOW__CORE__UNIT_TEST_MODE"] = "True"
 os.environ["AWS_DEFAULT_REGION"] = os.environ.get("AWS_DEFAULT_REGION") or 
"us-east-1"
 os.environ["CREDENTIALS_DIR"] = os.environ.get("CREDENTIALS_DIR") or 
"/files/airflow-breeze-config/keys"
 os.environ["AIRFLOW_ENABLE_AIP_44"] = os.environ.get("AIRFLOW_ENABLE_AIP_44") 
or "true"
-os.environ["AIRFLOW_ENABLE_AIP_52"] = os.environ.get("AIRFLOW_ENABLE_AIP_52") 
or "true"
 
 from airflow import settings  # noqa: E402
 from airflow.models.tasklog import LogTemplate  # noqa: E402
diff --git a/tests/decorators/test_external_python.py 
b/tests/decorators/test_external_python.py
index 0a686f5ca0..84c46127c1 100644
--- a/tests/decorators/test_external_python.py
+++ b/tests/decorators/test_external_python.py
@@ -28,7 +28,6 @@ from tempfile import TemporaryDirectory
 import pytest
 
 from airflow.decorators import setup, task, teardown
-from airflow.settings import _ENABLE_AIP_52
 from airflow.utils import timezone
 
 DEFAULT_DATE = timezone.datetime(2016, 1, 1)
@@ -127,7 +126,6 @@ class TestExternalPythonDecorator:
 
         ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
 
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     def test_marking_external_python_task_as_setup(self, dag_maker, 
venv_python):
         @setup
         @task.external_python(python=venv_python)
@@ -142,7 +140,6 @@ class TestExternalPythonDecorator:
         assert setup_task._is_setup
         ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
 
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     def test_marking_external_python_task_as_teardown(self, dag_maker, 
venv_python):
         @teardown
         @task.external_python(python=venv_python)
@@ -157,7 +154,6 @@ class TestExternalPythonDecorator:
         assert teardown_task._is_teardown
         ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
 
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     @pytest.mark.parametrize("on_failure_fail_dagrun", [True, False])
     def test_marking_external_python_task_as_teardown_with_on_failure_fail(
         self, dag_maker, on_failure_fail_dagrun, venv_python
diff --git a/tests/decorators/test_python.py b/tests/decorators/test_python.py
index b0545be8f9..2f5677e347 100644
--- a/tests/decorators/test_python.py
+++ b/tests/decorators/test_python.py
@@ -33,7 +33,6 @@ from airflow.models.mappedoperator import MappedOperator
 from airflow.models.taskinstance import TaskInstance
 from airflow.models.taskmap import TaskMap
 from airflow.models.xcom_arg import PlainXComArg, XComArg
-from airflow.settings import _ENABLE_AIP_52
 from airflow.utils import timezone
 from airflow.utils.state import State
 from airflow.utils.task_group import TaskGroup
@@ -858,7 +857,6 @@ def test_task_decorator_dataset(dag_maker, session):
     assert result == uri
 
 
[email protected](not _ENABLE_AIP_52, reason="AIP-52 is disabled")
 def test_teardown_trigger_rule_selective_application(dag_maker, session):
     with dag_maker(session=session) as dag:
 
@@ -884,7 +882,6 @@ def 
test_teardown_trigger_rule_selective_application(dag_maker, session):
     assert teardown_task.operator.trigger_rule == 
TriggerRule.ALL_DONE_SETUP_SUCCESS
 
 
[email protected](not _ENABLE_AIP_52, reason="AIP-52 is disabled")
 def test_teardown_trigger_rule_override_behavior(dag_maker, session):
     with dag_maker(session=session) as dag:
 
diff --git a/tests/decorators/test_python_virtualenv.py 
b/tests/decorators/test_python_virtualenv.py
index 0eac9e3e92..ec37c3586e 100644
--- a/tests/decorators/test_python_virtualenv.py
+++ b/tests/decorators/test_python_virtualenv.py
@@ -24,7 +24,6 @@ from subprocess import CalledProcessError
 import pytest
 
 from airflow.decorators import setup, task, teardown
-from airflow.settings import _ENABLE_AIP_52
 from airflow.utils import timezone
 
 DEFAULT_DATE = timezone.datetime(2016, 1, 1)
@@ -178,7 +177,6 @@ class TestPythonVirtualenvDecorator:
 
         ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
 
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     def test_marking_virtualenv_python_task_as_setup(self, dag_maker):
         @setup
         @task.virtualenv
@@ -193,7 +191,6 @@ class TestPythonVirtualenvDecorator:
         assert setup_task._is_setup
         ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
 
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     def test_marking_virtualenv_python_task_as_teardown(self, dag_maker):
         @teardown
         @task.virtualenv
@@ -208,7 +205,6 @@ class TestPythonVirtualenvDecorator:
         assert teardown_task._is_teardown
         ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
 
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     @pytest.mark.parametrize("on_failure_fail_dagrun", [True, False])
     def test_marking_virtualenv_python_task_as_teardown_with_on_failure_fail(
         self, dag_maker, on_failure_fail_dagrun
diff --git a/tests/decorators/test_setup_teardown.py 
b/tests/decorators/test_setup_teardown.py
index 896a41562e..8de3f625d4 100644
--- a/tests/decorators/test_setup_teardown.py
+++ b/tests/decorators/test_setup_teardown.py
@@ -22,10 +22,8 @@ import pytest
 from airflow import AirflowException
 from airflow.decorators import setup, task, task_group, teardown
 from airflow.operators.bash import BashOperator
-from airflow.settings import _ENABLE_AIP_52
 
 
[email protected](not _ENABLE_AIP_52, reason="AIP-52 is disabled")
 class TestSetupTearDownTask:
     def test_marking_functions_as_setup_task(self, dag_maker):
         @setup
diff --git a/tests/models/test_taskinstance.py 
b/tests/models/test_taskinstance.py
index f33f530b16..0dcfb63214 100644
--- a/tests/models/test_taskinstance.py
+++ b/tests/models/test_taskinstance.py
@@ -71,7 +71,7 @@ from airflow.operators.python import PythonOperator
 from airflow.sensors.base import BaseSensorOperator
 from airflow.sensors.python import PythonSensor
 from airflow.serialization.serialized_objects import SerializedBaseOperator
-from airflow.settings import _ENABLE_AIP_52, TIMEZONE
+from airflow.settings import TIMEZONE
 from airflow.stats import Stats
 from airflow.ti_deps.dep_context import DepContext
 from airflow.ti_deps.dependencies_deps import REQUEUEABLE_DEPS, RUNNING_DEPS
@@ -1103,7 +1103,6 @@ class TestTaskInstance:
     # of the trigger_rule under various circumstances
     # Numeric fields are in order:
     #   successes, skipped, failed, upstream_failed, removed, done
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     @pytest.mark.parametrize(
         "trigger_rule, upstream_setups, upstream_states, flag_upstream_failed, 
expect_state, expect_passed",
         [
diff --git a/tests/providers/cncf/kubernetes/decorators/test_kubernetes.py 
b/tests/providers/cncf/kubernetes/decorators/test_kubernetes.py
index 74668767cf..8493ba067f 100644
--- a/tests/providers/cncf/kubernetes/decorators/test_kubernetes.py
+++ b/tests/providers/cncf/kubernetes/decorators/test_kubernetes.py
@@ -23,7 +23,6 @@ from unittest import mock
 import pytest
 
 from airflow.decorators import setup, task, teardown
-from airflow.settings import _ENABLE_AIP_52
 from airflow.utils import timezone
 
 DEFAULT_DATE = timezone.datetime(2021, 9, 1)
@@ -167,7 +166,6 @@ def test_kubernetes_with_input_output(
     assert containers[1].volume_mounts[0].mount_path == "/airflow/xcom"
 
 
[email protected](not _ENABLE_AIP_52, reason="AIP-52 is disabled")
 def test_kubernetes_with_marked_as_setup(
     dag_maker, session, mock_create_pod: mock.Mock, mock_hook: mock.Mock
 ) -> None:
@@ -190,7 +188,6 @@ def test_kubernetes_with_marked_as_setup(
     assert setup_task._is_setup
 
 
[email protected](not _ENABLE_AIP_52, reason="AIP-52 is disabled")
 def test_kubernetes_with_marked_as_teardown(
     dag_maker, session, mock_create_pod: mock.Mock, mock_hook: mock.Mock
 ) -> None:
diff --git a/tests/providers/docker/decorators/test_docker.py 
b/tests/providers/docker/decorators/test_docker.py
index e4aba52576..2ed7068a52 100644
--- a/tests/providers/docker/decorators/test_docker.py
+++ b/tests/providers/docker/decorators/test_docker.py
@@ -22,7 +22,6 @@ from airflow.decorators import setup, task, teardown
 from airflow.exceptions import AirflowException
 from airflow.models import TaskInstance
 from airflow.models.dag import DAG
-from airflow.settings import _ENABLE_AIP_52
 from airflow.utils import timezone
 from airflow.utils.state import TaskInstanceState
 
@@ -146,7 +145,6 @@ class TestDockerDecorator:
             ti = dr.get_task_instances()[0]
             assert ti.state == expected_state
 
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     def test_setup_decorator_with_decorated_docker_task(self, dag_maker):
         @setup
         @task.docker(image="python:3.9-slim", auto_remove="force")
@@ -160,7 +158,6 @@ class TestDockerDecorator:
         setup_task = dag.task_group.children["f"]
         assert setup_task._is_setup
 
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     def test_teardown_decorator_with_decorated_docker_task(self, dag_maker):
         @teardown
         @task.docker(image="python:3.9-slim", auto_remove="force")
@@ -174,7 +171,6 @@ class TestDockerDecorator:
         teardown_task = dag.task_group.children["f"]
         assert teardown_task._is_teardown
 
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     @pytest.mark.parametrize("on_failure_fail_dagrun", [True, False])
     def 
test_teardown_decorator_with_decorated_docker_task_and_on_failure_fail_arg(
         self, dag_maker, on_failure_fail_dagrun
diff --git a/tests/serialization/test_dag_serialization.py 
b/tests/serialization/test_dag_serialization.py
index b025a61ae5..0fd2e4b427 100644
--- a/tests/serialization/test_dag_serialization.py
+++ b/tests/serialization/test_dag_serialization.py
@@ -1319,7 +1319,6 @@ class TestStringifiedDAGs:
         assert task._is_setup == is_setup
         assert task._is_teardown == is_teardown
 
-    @pytest.mark.skipif(not airflow.settings._ENABLE_AIP_52, reason="AIP-52 is 
disabled")
     def test_setup_teardown_tasks(self):
         """
         Test setup and teardown task serialization/deserialization.
@@ -1377,7 +1376,6 @@ class TestStringifiedDAGs:
             se_second_group.children["group1.group2.teardown2"], 
is_teardown=True
         )
 
-    @pytest.mark.skipif(not airflow.settings._ENABLE_AIP_52, reason="AIP-52 is 
disabled")
     def test_teardown_task_on_failure_fail_dagrun_serialization(self, 
dag_maker):
         with dag_maker() as dag:
 
diff --git a/tests/ti_deps/deps/test_trigger_rule_dep.py 
b/tests/ti_deps/deps/test_trigger_rule_dep.py
index 3ac72e5b13..2beaa7097e 100644
--- a/tests/ti_deps/deps/test_trigger_rule_dep.py
+++ b/tests/ti_deps/deps/test_trigger_rule_dep.py
@@ -30,7 +30,6 @@ from airflow.models.baseoperator import BaseOperator
 from airflow.models.dagrun import DagRun
 from airflow.models.taskinstance import TaskInstance
 from airflow.operators.empty import EmptyOperator
-from airflow.settings import _ENABLE_AIP_52
 from airflow.ti_deps.dep_context import DepContext
 from airflow.ti_deps.deps.trigger_rule_dep import TriggerRuleDep, 
_UpstreamTIStates
 from airflow.utils.state import DagRunState, TaskInstanceState
@@ -676,7 +675,6 @@ class TestTriggerRuleDep:
         )
         assert len(dep_statuses) == 0
 
-    @pytest.mark.skipif(not _ENABLE_AIP_52, reason="AIP-52 is disabled")
     @pytest.mark.parametrize(
         "task_cfg, states, exp_reason, exp_state",
         [
diff --git a/tests/www/views/test_views_acl.py 
b/tests/www/views/test_views_acl.py
index 8a820fe01b..db678ec465 100644
--- a/tests/www/views/test_views_acl.py
+++ b/tests/www/views/test_views_acl.py
@@ -25,7 +25,6 @@ import pytest
 
 from airflow.models import DagModel
 from airflow.security import permissions
-from airflow.settings import _ENABLE_AIP_52
 from airflow.utils import timezone
 from airflow.utils.session import create_session
 from airflow.utils.state import State
@@ -252,12 +251,11 @@ def test_dag_autocomplete_success(client_all_dags):
     )
     expected = [
         {"name": "airflow", "type": "owner"},
+        {"name": "example_setup_teardown_taskflow", "type": "dag"},
         {"name": "test_mapped_taskflow", "type": "dag"},
         {"name": "tutorial_taskflow_api", "type": "dag"},
         {"name": "tutorial_taskflow_api_virtualenv", "type": "dag"},
     ]
-    if _ENABLE_AIP_52:
-        expected.insert(1, {"name": "example_setup_teardown_taskflow", "type": 
"dag"})
 
     assert resp.json == expected
 

Reply via email to