Fury0508 commented on PR #60728:
URL: https://github.com/apache/airflow/pull/60728#issuecomment-3764273938

   Hi! I've implemented a fix for this in PR #60728.
   
   ## The Problem
   The script imports `jsonpath_ng` at the top level, but it's a dev 
dependency. Simply adding `uv sync --no-dev` would cause an `ImportError` when 
the script tries to use it.
   
   ## My Solution
   
   1. **Added a `sync_dependencies_without_dev()` function** that runs:
   ```bash
      uv sync --no-dev --all-packages --no-python-downloads --no-managed-python
   ```
      This strips dev dependencies to create an environment closer to 
production, helping detect unhandled optional cross-provider dependencies.
   
   2. **Converted the `jsonpath_ng` import to a lazy import** inside 
`check_providers_are_mentioned_in_issue_template()` to avoid the `ImportError`.
   
   This approach ensures the validation runs without dev dependencies while 
still allowing the script to function when it needs `jsonpath_ng` for that 
specific check.


-- 
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]

Reply via email to