Skip to content

Commit

Permalink
Remove all remnants of "internal_api_call" (apache#44551)
Browse files Browse the repository at this point in the history
Part of apache#44436
  • Loading branch information
potiuk authored and Lefteris Gilmaz committed Jan 5, 2025
1 parent 89b8b84 commit 644a9e9
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 42 deletions.
1 change: 0 additions & 1 deletion dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ def __hash__(self):
SelectiveCoreTestType.API: [
r"^airflow/api/",
r"^airflow/api_connexion/",
r"^airflow/api_internal/",
r"^airflow/api_fastapi/",
r"^tests/api/",
r"^tests/api_connexion/",
Expand Down
26 changes: 0 additions & 26 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",),
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@
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",
Expand Down
8 changes: 0 additions & 8 deletions providers/src/airflow/providers/edge/cli/edge_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
8 changes: 2 additions & 6 deletions scripts/cov/restapi_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@

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",
Expand All @@ -34,10 +32,8 @@
"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)

0 comments on commit 644a9e9

Please sign in to comment.