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

[PR #893/44daa2de backport][stable-3] Refactor iam_managed_policy module and add integration tests #935

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Feb 10, 2022

This is a backport of PR #893 as merged into main (44daa2d).

SUMMARY

Refactor iam_managed_policy module to:

  • Improve AWS retry backoff logic
  • Add check_mode support
  • Fix module exit on updates to policies when no changes are present

Other changes:

  • Add disabled integration tests
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

iam_managed_policy

ADDITIONAL INFORMATION

Backoff logic only partially covered the module, and it didn't support check_mode or have any integration tests.

Due to the nature of the IAM based modules the tests are intentionally disabled but have been run locally:

ansible-test integration iam_managed_policy --allow-unsupported --docker

PLAY RECAP *********************************************************************
testhost                   : ok=20   changed=6    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

AWS ACTIONS: ['iam:CreatePolicy', 'iam:CreatePolicyVersion', 'iam:DeletePolicy', 'iam:DeletePolicyVersion', 'iam:GetPolicy', 'iam:GetPolicyVersion', 'iam:ListEntitiesForPolicy', 'iam:ListPolicies', 'iam:ListPolicyVersions', 'iam:SetDefaultPolicyVersion']

Refactor iam_managed_policy module and add integration tests

SUMMARY
Refactor iam_managed_policy module to:

Improve AWS retry backoff logic
Add check_mode support
Fix module exit on updates to policies when no changes are present

Other changes:

Add disabled integration tests

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
iam_managed_policy
ADDITIONAL INFORMATION
Backoff logic only partially covered the module, and it didn't support check_mode or have any integration tests.
Due to the nature of the IAM based modules the tests are intentionally disabled but have been run locally:
ansible-test integration iam_managed_policy --allow-unsupported --docker

PLAY RECAP *********************************************************************
testhost                   : ok=20   changed=6    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

AWS ACTIONS: ['iam:CreatePolicy', 'iam:CreatePolicyVersion', 'iam:DeletePolicy', 'iam:DeletePolicyVersion', 'iam:GetPolicy', 'iam:GetPolicyVersion', 'iam:ListEntitiesForPolicy', 'iam:ListPolicies', 'iam:ListPolicyVersions', 'iam:SetDefaultPolicyVersion']

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Markus Bergholz <[email protected]>
(cherry picked from commit 44daa2d)
@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review integration tests/integration module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests labels Feb 10, 2022
@markuman markuman added the mergeit Merge the PR (SoftwareFactory) label Feb 10, 2022
@softwarefactory-project-zuul
Copy link
Contributor

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit ca884b0 into stable-3 Feb 10, 2022
@softwarefactory-project-zuul softwarefactory-project-zuul bot deleted the patchback/backports/stable-3/44daa2ded8dc9f1dab0f7a4643176fe668a2a89c/pr-893 branch February 10, 2022 14:19
abikouo pushed a commit to abikouo/community.aws that referenced this pull request Oct 24, 2023
Add deprecation note about Python 3.6

SUMMARY
The AWS SDK for Python has now dropped support for Python 3.6 and announced that in future they're dropping support 6 months after PSF End Of Support for a version.
Keeping with our 1-year-old Botocore/Boto3 requirements, this will result in us needing to drop support for Python 3.6 in about a year, when we would be scheduled to bump to botocore >= 1.27.0, as 1.27.0 requires Python 3.7.  This means we're generally going to drop support for a version of Python around 18 months after PSF End Of Support.  For the sake of transparency to our users, add a deprecation notice.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
README.md
ADDITIONAL INFORMATION
(community.aws PRs will follow after the amazon.aws PRs are approved)

Reviewed-by: Felix Fontein <[email protected]>
Reviewed-by: Alina Buzachis <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug community_review integration tests/integration mergeit Merge the PR (SoftwareFactory) module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants