Skip to content

Add a timeout attribute to pip_import rules. - #217

Merged
brandjon merged 2 commits into
bazel-contrib:masterfrom
ChrisCummins:master
Mar 5, 2020
Merged

Add a timeout attribute to pip_import rules.#217
brandjon merged 2 commits into
bazel-contrib:masterfrom
ChrisCummins:master

Conversation

@ChrisCummins

Copy link
Copy Markdown

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

@googlebot

Copy link
Copy Markdown

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@brandjon

Copy link
Copy Markdown
Contributor

Sounds reasonable, but this only affects Bazel's timeout when evaluating a repo rule. What about pip's own timeout? See also #118.

@michael4338

Copy link
Copy Markdown

@brandjon , the pip itself uses "pip wheel" instead of "pip install", the former does not have a "timeout" arg.

ChrisCummins and others added 2 commits March 5, 2020 14:36
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,
    )
@brandjon

brandjon commented Mar 5, 2020

Copy link
Copy Markdown
Contributor

Thanks for the PR, merging.

@brandjon
brandjon merged commit 748aa53 into bazel-contrib:master Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants