8000 Add a timeout attribute to pip_import rules. by ChrisCummins · Pull Request #217 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content

Add a timeout attribute to pip_import rules. #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2020

Conversation

ChrisCummins
Copy link

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

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

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@brandjon
Copy link
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

@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
Copy link
Contributor
brandjon commented Mar 5, 2020

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
0