Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions scripts/in_container/run_provider_yaml_files_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import os
import pathlib
import platform
import subprocess
import sys
import textwrap
import warnings
Expand Down Expand Up @@ -101,6 +102,31 @@
suspended_integrations: set[str] = set()


def sync_dependencies_without_dev() -> None:
"""
Run uv sync --no-dev to strip development dependencies.

This ensures validation runs in an environment closer to production,
which helps detect cases where providers have unhandled optional
cross-provider dependencies.
"""
console.print("[magenta]Running uv sync --no-dev to strip development dependencies...[/]")
result = subprocess.run(
["uv", "sync", "--no-dev", "--all-packages", "--no-python-downloads", "--no-managed-python"],
capture_output=True,
text=True,
cwd=AIRFLOW_ROOT_PATH,
check=False,
)
if result.returncode != 0:
console.print(f"[red]Failed to remove dev dependencies: {result.stderr}[/]")
sys.exit(1)

console.print("[green]Successfully synchronized without dev dependencies[/]")
if result.stdout:
console.print(result.stdout)


def _filepath_to_module(filepath: pathlib.Path | str) -> str:
if isinstance(filepath, str):
filepath = pathlib.Path(filepath)
Expand Down Expand Up @@ -718,6 +744,7 @@ def check_providers_have_all_documentation_files(yaml_files: dict[str, dict]):


if __name__ == "__main__":
sync_dependencies_without_dev()
ProvidersManager().initialize_providers_configuration()
architecture = Architecture.get_current()
console.print(f"Verifying packages on {architecture} architecture. Platform: {platform.machine()}.")
Expand Down