Skip to content
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

Add the ability to configure GitHub session timeouts #71

Merged

Conversation

mcdonnnj
Copy link
Contributor

@mcdonnnj mcdonnnj commented Feb 24, 2023

Description

This pull request adds the ability to configure the connect and read timeouts in a github3.py GitHub session.

Motivation

I ran into an issue where partway through processing our org the scrape would fail due to a github3.exceptions.ConnectionError exception caused by a requests.exceptions.ReadTimeout exception. After implementing these changes I tried again after changing the read timeout to 15 (default is 10) and it was able to run to completion.

⚠ Testing Note

This pull request needs the changes in #72 to pass tests.

@mcdonnnj mcdonnnj force-pushed the improvement/configure_github_timeouts branch from e25de78 to 05e0acc Compare March 9, 2023 22:15
Add the ability to modify the timeouts available for GitHub sessions in
the github3.py package. When running the scraper against a GitHub org
with a large number of repositories a read timeout was observed which
would crash the run. With this implementation and modifying the read
timeout the scraper was able to process the same GitHub org with no
issues.

Please see https://requests.readthedocs.io/en/latest/user/advanced/#timeouts
for more information about these timeouts.
@mcdonnnj mcdonnnj force-pushed the improvement/configure_github_timeouts branch from 05e0acc to f01f11e Compare March 13, 2023 04:14
@IanLee1521 IanLee1521 merged commit e4918c0 into LLNL:main Mar 21, 2023
@mcdonnnj mcdonnnj deleted the improvement/configure_github_timeouts branch March 22, 2023 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants