Uh oh!
There was an error while loading. Please reload this page.
Remove dev dependencies before provider YAML check - #60709
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
There was a problem hiding this comment.
Pull request overview
This PR adds a step to remove development dependencies before running provider YAML validation checks. The change helps detect cases where provider code has unhandled optional dependencies that are normally masked when dev dependencies are present.
Changes:
- Added
remove_dev_dependencies()function that runsuv sync --no-dev --all-packages - Integrated the function call at the start of the main execution block
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| console.print(f"[red]Failed to remove dev dependencies: {result.stderr}[/]") | ||
| sys.exit(1) |
There was a problem hiding this comment.
The subprocess output (stdout) is captured but never displayed to the user, even on success. Consider either:
- Setting
capture_output=Falseto let the output stream directly to the console (like in run_prepare_airflow_distributions.py), or - Displaying
result.stdouton success to show what was removed
This would provide better visibility into what the uv sync command did, which could be helpful for debugging.
| console.print(f"[red]Failed to remove dev dependencies: {result.stderr}[/]") | |
| sys.exit(1) | |
| console.print(f"[red]Failed to remove dev dependencies: {result.stderr}[/]") | |
| ifresult.stdout: | |
| console.print(f"[red]uv sync stdout:[/]\n{result.stdout}") | |
| sys.exit(1) | |
| ifresult.stdout: | |
| console.print(result.stdout) |
fcf10f9 to
2d8a004CompareThis change runs 'uv sync --no-dev --all-packages' before running the provider YAML validation checks inside the breeze container. This ensures that dev dependencies are removed so we can detect cases where provider code has optional cross-provider dependencies that aren't handled properly. The uv sync command is now run from the prek hook (check_provider_yaml_files.py) before invoking the actual provider yaml check script. Fixes: apache#60662
2d8a004 to
f03e92aComparedhanyabad11
commented
Jan 19, 2026
potiuk
commented
Feb 14, 2026
Let's see if CI agrees. |
jason810496
left a comment
There was a problem hiding this comment.
Nice! Thanks for the PR.
However, it seems like duplicated of #60728.
potiuk
commented
Feb 16, 2026
Yep. |
This change adds a call to
uv sync --no-dev --all-packagesbefore running the provider YAML validation checks.Why is this needed?
Currently, the run_provider_yaml_files_check.py script runs with all development dependencies installed, which may mask issues where:
By running
uv sync --no-devbefore validation, we remove dev dependencies and can detect cases where provider code has unhandled optional dependencies.What this PR does:
uv sync --no-dev --all-packagesProvidersManager().initialize_providers_configuration()Fixes: #60662