Copilot commented on code in PR #60709:
URL: https://github.com/apache/airflow/pull/60709#discussion_r2701220645
##########
scripts/in_container/run_provider_yaml_files_check.py:
##########
@@ -717,7 +718,29 @@ def
check_providers_have_all_documentation_files(yaml_files: dict[str, dict]):
return num_providers, num_errors
+def remove_dev_dependencies() -> None:
+ """Remove dev dependencies before running provider checks.
+
+ This ensures that we can detect cases where provider code has
+ optional cross-provider dependencies that aren't handled properly.
+ See: https://github.com/apache/airflow/issues/60662
+ """
+ console.print("[bright_blue]Removing dev dependencies with uv sync
--no-dev[/]")
+ result = subprocess.run(
+ ["uv", "sync", "--no-dev", "--all-packages", "--no-python-downloads",
"--no-managed-python"],
+ cwd=AIRFLOW_ROOT_PATH,
+ check=False,
+ capture_output=True,
+ text=True,
+ )
+ if result.returncode != 0:
+ console.print(f"[red]Failed to remove dev dependencies:
{result.stderr}[/]")
+ sys.exit(1)
Review Comment:
The subprocess output (stdout) is captured but never displayed to the user,
even on success. Consider either:
1. Setting `capture_output=False` to let the output stream directly to the
console (like in run_prepare_airflow_distributions.py), or
2. Displaying `result.stdout` on success to show what was removed
This would provide better visibility into what the uv sync command did,
which could be helpful for debugging.
```suggestion
console.print(f"[red]Failed to remove dev dependencies:
{result.stderr}[/]")
if result.stdout:
console.print(f"[red]uv sync stdout:[/]\n{result.stdout}")
sys.exit(1)
if result.stdout:
console.print(result.stdout)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]