Add a timeout attribute to pip_import rules. - #217
Conversation
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
Sounds reasonable, but this only affects Bazel's timeout when evaluating a repo rule. What about pip's own timeout? See also #118. |
|
@brandjon , the pip itself uses "pip wheel" instead of "pip install", the former does not have a "timeout" arg. |
The combination of a large requirements.txt file and a slow network can
cause the default timeout for repository_ctx.execute() to be reached.
This patch exposes that timeout to the pip_import() caller so they can
manually specify a longer timeout. E.g.
pip_import(
name = "requirements",
requirements = "//long_list_of_requirements.txt",
timeout = 3600,
)
|
Thanks for the PR, merging. |
The combination of a large
requirements.txtfile and a slow network cancause the default timeout for
repository_ctx.execute()to be reached.This patch exposes that timeout to the
pip_import()caller so they canmanually specify a longer timeout. E.g.