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

use retry mode: standard #537

Merged
merged 5 commits into from
Jul 9, 2021
Merged

Conversation

robpickerill
Copy link
Contributor

@robpickerill robpickerill commented Apr 25, 2021

This PR moves the boto config to using retry mode: standard, as the default retry mode is legacy.
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html

Please let me know your thoughts on this PR.


Before submitting pull requests, please see the
Development documentation
and specifically the Pull Request Guidelines.

IMPORTANT: Please take note of the below checklist, especially the first three items.

Summary

Add a summary of what your PR does here. This could be as simple as "adds support for X service" or "fixes default limit for Y", or a longer explanation for less straightforward changes.

Pull Request Checklist

  • All pull requests should be against the develop branch, not master.
  • All pull requests must include the Contributor License Agreement (see below).
  • Whether or not your PR includes unit tests:
    • Please make sure you have run the exact code contained in the PR locally, and it functions as desired.
    • Please make sure the TravisCI build passes or, if not, you've corrected any obvious problems identified by the tests.
  • Code should conform to the Development Guidelines:
    • pep8 compliant with some exceptions (see pytest.ini)
    • 100% test coverage with pytest (with valid tests). If you have difficulty
      writing tests for the code, that's fine, just mention that in the summary and either
      ask for assistance, or clarify that you'd like someone else to handle the tests. PRs that
      include complete test coverage will usually be merged faster.
    • Complete, correctly-formatted documentation for all classes, functions and methods.
    • documentation has been rebuilt with tox -e docs
    • Connections to the AWS services should only be made by the class's
      connect() and connect_resource() methods, inherited from
      awslimitchecker.connectable.Connectable
    • All modules should have (and use) module-level loggers.
    • Commit messages should be meaningful, and reference the Issue number
      if you're working on a GitHub issue (i.e. "issue #x - "). Please
      refrain from using the "fixes #x" notation unless you are sure that the
      the issue is fixed in that commit.
    • Git history is fully intact; please do not squash or rewrite history.

Contributor License Agreement

By submitting this work for inclusion in awslimitchecker, I agree to the following terms:

  • The contribution included in this request (and any subsequent revisions or versions of it)
    is being made under the same license as the awslimitchecker project (the Affero GPL v3,
    or any subsequent version of that license if adopted by awslimitchecker).
  • My contribution may perpetually be included in and distributed with awslimitchecker; submitting
    this pull request grants a perpetual, global, unlimited license for it to be used and distributed
    under the terms of awslimitchecker's license.
  • I have the legal power and rights to agree to these terms.

@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2021

Codecov Report

Merging #537 (2461439) into develop (c63dfaf) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop      #537   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           42        42           
  Lines         3026      3030    +4     
  Branches       455       455           
=========================================
+ Hits          3026      3030    +4     
Impacted Files Coverage Δ
awslimitchecker/connectable.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c63dfaf...2461439. Read the comment docs.

@robpickerill robpickerill changed the base branch from master to develop April 26, 2021 07:19
@jantman
Copy link
Owner

jantman commented Jul 8, 2021

@robpickerill I'm going to hold off on merging this one for now. I have some questions about the changes, but more importantly, I've also become a fan of the "adaptive" retry mode, and think that one might be a better option...

Also, a nitpick: I'm not in favor of bumping up the max line length. PEP8 clearly says to limit it to 79 characters. I... either find that too antiquated or don't like odd numbers, take your pick... but I don't really want to bump it up by an arbitrary 5 characters for one PR. To be fair (and pedantic?) I also use an editor that's set up to show two 80-character files side by side.

@robpickerill
Copy link
Contributor Author

Hey, would you prefer adaptive? I can change that over if so

Your right on the line length, actually not sure why that's in there now I look at it - I can revisit it if you want adaptive

@jantman
Copy link
Owner

jantman commented Jul 9, 2021

Yeah, if you don't mind, I think I'd prefer adaptive. We've been using it for some internal projects at work on very busy accounts, and it seems to work quite well.

@jantman jantman merged commit 032e2b9 into jantman:develop Jul 9, 2021
@jantman
Copy link
Owner

jantman commented Aug 4, 2021

This has been released in 12.0.0, which is now live on PyPI and Docker Hub. Thank you so much, and apologies for the delay!

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.

3 participants