Arunodoy18 commented on PR #59030:
URL: https://github.com/apache/airflow/pull/59030#issuecomment-3610735426

   Hi maintainers! 👋
   
   This PR fixes an issue where `PythonVirtualenvOperator` fails in 
environments without direct internet access when using `uv` for package 
management.
   
   **The Problem:**
   When `index_urls_from_connection_ids` is configured to use custom package 
indexes (e.g., Artifactory in transparent proxy mode), the `uv venv --seed` 
command was still trying to reach `https://pypi.org/simple/pip/` directly, 
causing timeout errors in air-gapped or restricted network environments.
   
   **The Solution:**
   Pass the `UV_DEFAULT_INDEX` and `UV_INDEX` environment variables during 
virtual environment creation, matching the behavior already implemented for 
package installation commands.
   
   **Testing:**
   - Added unit test `test_should_create_virtualenv_with_index_urls_uv` to 
verify index URLs are passed to both venv creation and package installation
   - Follows the same pattern already used for `pip_cmd` execution in the 
codebase
   
   This should help users deploying Airflow in secure/enterprise environments 
with restricted internet access. Happy to address any feedback!


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