You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "dhanyabad11 (via GitHub)" <gi...@apache.org> on 2026/01/17 15:15:23 UTC

[PR] Remove dev dependencies before provider YAML check [airflow]

dhanyabad11 opened a new pull request, #60709:
URL: https://github.com/apache/airflow/pull/60709

   This change adds a call to `uv sync --no-dev --all-packages` before running the provider YAML validation checks. 
   
   ### Why is this needed?
   
   Currently, the [run_provider_yaml_files_check.py](cci:7://file:///Users/dhanyabad/open-source/apache-airflow/airflow/scripts/in_container/run_provider_yaml_files_check.py:0:0-0:0) script runs with all development dependencies installed, which may mask issues where:
   - Provider code requires dependencies that should be optional
   - Cross-provider dependencies are not properly marked as optional
   
   By running `uv sync --no-dev` before validation, we remove dev dependencies and can detect cases where provider code has unhandled optional dependencies.
   
   ### What this PR does:
   - Adds a [remove_dev_dependencies()](cci:1://file:///Users/dhanyabad/open-source/apache-airflow/airflow/scripts/in_container/run_provider_yaml_files_check.py:720:0-738:68) function that runs `uv sync --no-dev --all-packages`
   - Calls this function at the start of the main block, before `ProvidersManager().initialize_providers_configuration()`
   
   Fixes: #60662


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove dev dependencies before provider YAML check [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed pull request #60709: Remove dev dependencies before provider YAML check
URL: https://github.com/apache/airflow/pull/60709


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove dev dependencies before provider YAML check [airflow]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove dev dependencies before provider YAML check [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #60709:
URL: https://github.com/apache/airflow/pull/60709#issuecomment-3763995212

   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)
   Here are some useful points:
   - Pay attention to the quality of your code (ruff, mypy and type annotations). Our [prek-hooks]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-prek-hooks) will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
   - Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
   Apache Airflow is a community-driven project and together we are making it better 🚀.
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://s.apache.org/airflow-slack
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove dev dependencies before provider YAML check [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #60709:
URL: https://github.com/apache/airflow/pull/60709#issuecomment-3901950152

   Let's see if CI agrees. 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove dev dependencies before provider YAML check [airflow]

Posted by "dhanyabad11 (via GitHub)" <gi...@apache.org>.
dhanyabad11 commented on PR #60709:
URL: https://github.com/apache/airflow/pull/60709#issuecomment-3767484421

   @potiuk 
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove dev dependencies before provider YAML check [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #60709:
URL: https://github.com/apache/airflow/pull/60709#issuecomment-3905946514

   Yep.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org