You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/08/07 05:40:27 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #33017: Allow PythonVenvOperator using other index url and caching

uranusjr commented on code in PR #33017:
URL: https://github.com/apache/airflow/pull/33017#discussion_r1285396952


##########
airflow/decorators/__init__.pyi:
##########
@@ -106,6 +106,11 @@ class TaskDecoratorCollection:
         python_version: None | str | int | float = None,
         use_dill: bool = False,
         system_site_packages: bool = True,
+        pip_install_options: list[str] | None = None,
+        skip_on_exit_code: int | Container[int] | None = None,
+        extra_index_urls: None | Iterable[str] | str = None,

Review Comment:
   I would prefer this to be able to override the default index URL, preferrably forcing the user to do so when specifying additional indexes. [Using `--extra-index-url` without also changing the default index URL is a common source of bugs.](https://kambojrehaan.medium.com/dependency-confusion-how-i-hacked-into-apple-microsoft-and-dozens-of-other-companies-e5503bbc97f9#70c6)
   
   I would advise changing this argument to `index_urls: Collection[str] | None = None` and change the implementation so if `index_urls` is not None, the first entry is passed to `--index-url`, and from the second on to `--extra-index-url`. A nice addition would be to padd `--no-index-url` if an empty list is provided.



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