Skip to content

rest client: Only enable backoff_and_retry if urllib3 is at least 2.0.0 #1342

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 1 commit into from
Jun 12, 2024

Conversation

djgoku
Copy link
Contributor

@djgoku djgoku commented Mar 1, 2024

We are trying to use backoff_and_retry but are getting errors with urllib3 1.26.X this fixes and sets the minimum of urllib3 to >= 2.0.0

The first release supporting backoff_jitter in the Retry class is the 2.0.0 release.

https://github.com/urllib3/urllib3/releases/tag/2.0.0

It doesn't look like this will be added to 1.26.X urllib3/urllib3#2952 (comment)

@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 34.19%. Comparing base (0a5bc5e) to head (26ab8c0).
Report is 62 commits behind head on master.

Files with missing lines Patch % Lines
atlassian/rest_client.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1342      +/-   ##
==========================================
+ Coverage   34.16%   34.19%   +0.02%     
==========================================
  Files          45       46       +1     
  Lines        8373     8428      +55     
  Branches     1177     1185       +8     
==========================================
+ Hits         2861     2882      +21     
- Misses       5397     5431      +34     
  Partials      115      115              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@timsavage
Copy link
Contributor

This is problematic for companies using RHEL. urllib3>2.0 requires a version of libssl that is not available on older (but still supported releases) or RHEL.

@djgoku
Copy link
Contributor Author

djgoku commented Mar 13, 2024

This is problematic for companies using RHEL. urllib3>2.0 requires a version of libssl that is not available on older (but still supported releases) or RHEL.

Ok, I'll look into alternative options. Thanks.

@djgoku djgoku force-pushed the chore/add-urllib3-minimum branch from e49a8b8 to 6a9d6ba Compare March 22, 2024 00:32
@djgoku djgoku changed the title Added a minimum urllib3 of 2.0.0 rest client: Only enable backoff_and_retry if urllib3 is at least 2.0.0 Mar 22, 2024
@djgoku
Copy link
Contributor Author

djgoku commented Mar 22, 2024

This is problematic for companies using RHEL. urllib3>2.0 requires a version of libssl that is not available on older (but still supported releases) or RHEL.

Here is another option I thought of. Hacky, but at least it won't fail is urllib3 is less than version 2.

@djgoku djgoku force-pushed the chore/add-urllib3-minimum branch 2 times, most recently from 8629633 to 1f9b87f Compare March 22, 2024 00:37
@djgoku djgoku force-pushed the chore/add-urllib3-minimum branch from 1f9b87f to 26ab8c0 Compare March 24, 2024 15:47
@djgoku
Copy link
Contributor Author

djgoku commented May 8, 2024

@gonchik can I get a review on this?

@gonchik
Copy link
Member

gonchik commented May 21, 2024

@djgoku I did not check on the RHEL 7 yet. , I will come back once it's ready

@gonchik gonchik merged commit ffb3fc0 into atlassian-api:master Jun 12, 2024
@djgoku djgoku deleted the chore/add-urllib3-minimum branch July 13, 2024 00:00
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.

4 participants