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

potiuk 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 8c019cf5907 Remove all remnants of "internal_api_call" (#44551)
8c019cf5907 is described below

commit 8c019cf5907cdba320bea7bf50c7fd341ca8ee49
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon Dec 2 00:11:32 2024 +0100

    Remove all remnants of "internal_api_call" (#44551)
    
    Part of #44436
---
 .../src/airflow_breeze/utils/selective_checks.py   |  1 -
 dev/breeze/tests/test_selective_checks.py          | 26 ----------------------
 docs/conf.py                                       |  1 -
 .../src/airflow/providers/edge/cli/edge_command.py |  8 -------
 scripts/cov/restapi_coverage.py                    |  8 ++-----
 5 files changed, 2 insertions(+), 42 deletions(-)

diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py 
b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index 14abb95376e..07b25ae98c7 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -291,7 +291,6 @@ TEST_TYPE_MATCHES = HashableDict(
         SelectiveCoreTestType.API: [
             r"^airflow/api/",
             r"^airflow/api_connexion/",
-            r"^airflow/api_internal/",
             r"^airflow/api_fastapi/",
             r"^tests/api/",
             r"^tests/api_connexion/",
diff --git a/dev/breeze/tests/test_selective_checks.py 
b/dev/breeze/tests/test_selective_checks.py
index f57b156181f..7107b15a175 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -172,32 +172,6 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                 id="Only API tests and DOCS and common.compat, FAB providers 
should run",
             )
         ),
-        (
-            pytest.param(
-                ("airflow/api_internal/file.py",),
-                {
-                    "all-python-versions": "['3.9']",
-                    "all-python-versions-list-as-string": "3.9",
-                    "python-versions": "['3.9']",
-                    "python-versions-list-as-string": "3.9",
-                    "ci-image-build": "true",
-                    "prod-image-build": "false",
-                    "needs-helm-tests": "false",
-                    "run-tests": "true",
-                    "run-amazon-tests": "false",
-                    "docs-build": "true",
-                    "skip-pre-commits": 
"check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,"
-                    
"mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
-                    "upgrade-to-newer-dependencies": "false",
-                    "core-test-types-list-as-string": "API Always",
-                    "providers-test-types-list-as-string": "",
-                    "individual-providers-test-types-list-as-string": "",
-                    "needs-mypy": "true",
-                    "mypy-checks": "['mypy-airflow']",
-                },
-                id="Only API tests and DOCS should run (no provider tests) 
when only internal api changed",
-            )
-        ),
         (
             pytest.param(
                 ("airflow/api_fastapi/file.py",),
diff --git a/docs/conf.py b/docs/conf.py
index 54268182325..f2cebd8c89d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -202,7 +202,6 @@ if PACKAGE_NAME == "apache-airflow":
     exclude_patterns = [
         # We only link to selected subpackages.
         "_api/airflow/index.rst",
-        "_api/internal_api_call/index.rst",
         # Included in the cluster-policies doc
         "_api/airflow/policies/index.rst",
         "README.rst",
diff --git a/providers/src/airflow/providers/edge/cli/edge_command.py 
b/providers/src/airflow/providers/edge/cli/edge_command.py
index d93a2269973..7f110da38ea 100644
--- a/providers/src/airflow/providers/edge/cli/edge_command.py
+++ b/providers/src/airflow/providers/edge/cli/edge_command.py
@@ -95,14 +95,6 @@ def force_use_internal_api_on_edge_worker():
         logger.info("Starting worker with API endpoint %s", api_url)
         os.environ["AIRFLOW__CORE__INTERNAL_API_URL"] = api_url
 
-        from airflow.api_internal import internal_api_call
-        from airflow.serialization import serialized_objects
-
-        # Note: Need to patch internal settings as statically initialized 
before we get here
-        serialized_objects._ENABLE_AIP_44 = True
-        internal_api_call._ENABLE_AIP_44 = True
-        internal_api_call.InternalApiConfig.set_use_internal_api("edge-worker")
-
 
 force_use_internal_api_on_edge_worker()
 
diff --git a/scripts/cov/restapi_coverage.py b/scripts/cov/restapi_coverage.py
index af46468b1c7..52728c4b7d8 100644
--- a/scripts/cov/restapi_coverage.py
+++ b/scripts/cov/restapi_coverage.py
@@ -23,9 +23,7 @@ from cov_runner import run_tests
 
 sys.path.insert(0, str(Path(__file__).parent.resolve()))
 
-source_files = ["airflow/api_connexion", "airflow/api_internal"]
-
-restapi_files = ["tests/api_connexion"]
+source_files = ["airflow/api_connexion"]
 
 files_not_fully_covered = [
     "airflow/api_connexion/endpoints/forward_to_fab_endpoint.py",
@@ -34,10 +32,8 @@ files_not_fully_covered = [
     "airflow/api_connexion/schemas/common_schema.py",
     "airflow/api_connexion/security.py",
     "airflow/api_connexion/types.py",
-    "airflow/api_internal/endpoints/rpc_api_endpoint.py",
-    "airflow/api_internal/internal_api_call.py",
 ]
 
 if __name__ == "__main__":
-    args = ["-qq"] + restapi_files
+    args = ["-qq"] + source_files
     run_tests(args, source_files, files_not_fully_covered)

Reply via email to