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

common options - change ini section, deprecate old, separate plugin doc fragments #144

Merged
merged 3 commits into from
Sep 27, 2021

Conversation

briantist
Copy link
Collaborator

SUMMARY

The currently used INI section, lookup_hashi_vault, is specific to the hashi_vault lookup, but the options have all been moved to doc fragments with the intention for them to be shared collection-wide, in both modules and plugins.

To those ends, this PR:

  • adds an INI section hashi_vault_collection that replaces lookup_hashi_vault
  • deprecates lookup_hashi_vault INI section in version 3.0.0
  • ensures the lookup_hashi_vault INI section is only valid within the hashi_vault lookup, and won't be inherited by new content; unfortunately to do this, I had to duplicate all the options within that plugin, including the shared INI sections. So that's going to be crappy for maintenance for a while.
  • also note if a setting is set in both the [lookup_hashi_vault] and [hashi_vault_collection] sections, the latter wins.
  • splits out the plugin-specific option values in the doc fragments, preparing for module content
  • updates hashi_vault lookup and the test lookups to use the new doc fragment sections
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

plugins/doc_fragments

ADDITIONAL INFORMATION

N/A

@briantist briantist added the enhancement New feature or request label Sep 22, 2021
@briantist briantist added this to the v1.4.0 milestone Sep 22, 2021
@briantist briantist self-assigned this Sep 22, 2021
@briantist briantist added this to In progress in Internal Refactor Sep 22, 2021
@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #144 (7756c15) into main (e78c74f) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 7756c15 differs from pull request most recent head badffcd. Consider uploading reports for the commit badffcd to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
+ Coverage   89.22%   89.24%   +0.01%     
==========================================
  Files          34       34              
  Lines        1346     1348       +2     
  Branches      102      102              
==========================================
+ Hits         1201     1203       +2     
  Misses        135      135              
  Partials       10       10              
Flag Coverage Δ
env_docker-default 89.24% <100.00%> (+0.01%) ⬆️
integration 71.23% <100.00%> (+0.10%) ⬆️
py2.6 34.96% <ø> (ø)
py2.7 80.78% <100.00%> (+0.02%) ⬆️
py3.10 88.35% <100.00%> (+0.01%) ⬆️
py3.5 81.08% <100.00%> (+0.02%) ⬆️
py3.6 81.08% <100.00%> (+0.02%) ⬆️
py3.7 81.08% <100.00%> (+0.02%) ⬆️
py3.8 88.35% <100.00%> (+0.01%) ⬆️
py3.9 88.35% <100.00%> (+0.01%) ⬆️
sanity 35.18% <100.00%> (+0.22%) ⬆️
target_ansible-doc 36.01% <100.00%> (-0.15%) ⬇️
target_auth_approle 84.21% <ø> (ø)
target_auth_jwt 86.95% <ø> (ø)
target_auth_none 100.00% <ø> (ø)
target_auth_token 73.33% <ø> (ø)
target_connection_options 73.78% <ø> (ø)
target_controller 67.74% <100.00%> (+0.07%) ⬆️
target_import 34.48% <100.00%> (+0.22%) ⬆️
target_lookup_hashi_vault 78.75% <ø> (ø)
target_module_utils 87.92% <ø> (ø)
units 86.64% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
plugins/lookup/hashi_vault.py 83.75% <ø> (ø)
plugins/doc_fragments/auth.py 100.00% <100.00%> (ø)
plugins/doc_fragments/connection.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 e78c74f...badffcd. Read the comment docs.

Copy link
Contributor

@acozine acozine left a comment

Choose a reason for hiding this comment

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

I didn't look at the implementation/larger implications of this change, but I did find one very small nit in the docs.

plugins/doc_fragments/auth.py Outdated Show resolved Hide resolved
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Copy link

@tadeboro tadeboro left a comment

Choose a reason for hiding this comment

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

I see no apparent issues with this PR, but I did not test the code since I am not intimately familiar with the Hashi Vault.

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
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants