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

hashi_vault - add retries option to allow for retrying failed requests #71

Merged
merged 26 commits into from Jun 27, 2021

Conversation

briantist
Copy link
Collaborator

@briantist briantist commented Mar 22, 2021

SUMMARY

Closes #58

Adds retries option which enables retrying failed requests with urllib3.Retry.

Also adds retry_action to control whether or not to emit warnings when a request is retried.

This PR also adds the start of a collection docsite, with a User Guide that goes into detail on the retry support.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

hashi_vault

ADDITIONAL INFORMATION

@briantist briantist added the enhancement New feature or request label Mar 22, 2021
@briantist briantist added this to the v1.2.0 milestone Mar 22, 2021
@briantist briantist self-assigned this Mar 22, 2021
@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #71 (fe27f07) into main (d597e13) will increase coverage by 0.50%.
The diff coverage is 88.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
+ Coverage   83.01%   83.52%   +0.50%     
==========================================
  Files          16       16              
  Lines         789      892     +103     
  Branches       78       87       +9     
==========================================
+ Hits          655      745      +90     
- Misses        120      129       +9     
- Partials       14       18       +4     
Impacted Files Coverage Δ
plugins/doc_fragments/connection.py 100.00% <ø> (ø)
plugins/lookup/hashi_vault.py 63.84% <ø> (ø)
plugins/module_utils/_hashi_vault_common.py 93.61% <80.95%> (-6.39%) ⬇️
plugins/plugin_utils/_hashi_vault_plugin.py 58.82% <87.50%> (+6.97%) ⬆️
...odule_utils/test_hashi_vault_connection_options.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 d597e13...fe27f07. Read the comment docs.

@briantist briantist changed the title WIP hashi_vault - add retries option to allow for retrying failed requests hashi_vault - add retries option to allow for retrying failed requests Jun 23, 2021
Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to run pip install antsibull && antsibull-lint collection-docs . in a new workflow to add basic linting for the docs.

(I only looked at the documentation.)

docs/extra-docs.yml Outdated Show resolved Hide resolved
plugins/doc_fragments/connection.py Outdated Show resolved Hide resolved
@briantist
Copy link
Collaborator Author

It looks I've gotten about all the review I'm gonna get on this one. In addition to tests added here, I've run other local manual tests. I learned some things with that, that I hope to port over to CI at some point, but it's going to require some more of the test improvement work to be done. It's pretty exciting nonetheless, looking at using MMock to support some advanced testing scenarios that are going to be difficult with a real Vault server alone (intermittent failing connections, maybe AWS/Azure/GCP/etc. backend testing without setting up the actual backend 3rd party service, etc.) by mocking various endpoints.

In the meantime, I'll merge this is in so we can get it released.

@briantist briantist merged commit 2339e43 into ansible-collections:main Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hashi_vault - add options for retries on failure
3 participants