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

Add check_mode support to ec2_asg #1033

Conversation

mandar242
Copy link
Contributor

@mandar242 mandar242 commented Mar 29, 2022

SUMMARY

Added check_mode support to ec2_asg.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ec2_asg

@ansibullbot
Copy link

@ansibullbot ansibullbot added WIP Work in progress feature This issue/PR relates to a feature request integration tests/integration module module needs_triage plugins plugin (any type) tests tests labels Mar 29, 2022
@mandar242 mandar242 changed the title WIP: Add check_mode support to ec2_asg [WIP]: Add check_mode support to ec2_asg Mar 29, 2022
@mandar242
Copy link
Contributor Author

recheck

@mandar242 mandar242 changed the title [WIP]: Add check_mode support to ec2_asg Add check_mode support to ec2_asg Mar 30, 2022
@ansibullbot ansibullbot added community_review and removed WIP Work in progress labels Mar 30, 2022
@mandar242 mandar242 force-pushed the ec2_asg-check-mode-support branch from 8c4060b to 692b474 Compare March 31, 2022 04:42
@markuman
Copy link
Member

LGTM, can you also add a changelog fragment please?

@markuman markuman added backport-3 PR should be backported to the stable-3 branch backport-2 PR should be backported to the stable-2 branch labels Mar 31, 2022
@mandar242 mandar242 force-pushed the ec2_asg-check-mode-support branch from a197021 to cbdd8fd Compare March 31, 2022 18:43
@markuman markuman requested a review from alinabuzachis March 31, 2022 18:54
@jatorcasso
Copy link
Contributor

could you add more check_mode tests? for general operations like enabling/disabling metrics collection, but also idempotence check_mode tests as well. afaik each test case should cover check_mode, action, check_mode idempotence, idempotence

@mandar242
Copy link
Contributor Author

could you add more check_mode tests? for general operations like enabling/disabling metrics collection, but also idempotence check_mode tests as well. afaik each test case should cover check_mode, action, check_mode idempotence, idempotence

With the general behavior of the API, and the amount of time it takes to adjust the ASG configuration, it would need to add more pause operations, likely resulting in longer running tests, in my opinion the current tests might be good enough to test the module behavior.

Unless others have different opinion, then we can try adding more tests where appropriate.

@jatorcasso
Copy link
Contributor

could you add more check_mode tests? for general operations like enabling/disabling metrics collection, but also idempotence check_mode tests as well. afaik each test case should cover check_mode, action, check_mode idempotence, idempotence

With the general behavior of the API, and the amount of time it takes to adjust the ASG configuration, it would need to add more pause operations, likely resulting in longer running tests, in my opinion the current tests might be good enough to test the module behavior.

Unless others have different opinion, then we can try adding more tests where appropriate.

Can you add waiters?

@jillr jillr added the mergeit Merge the PR (SoftwareFactory) label Apr 1, 2022
@mandar242 mandar242 added mergeit Merge the PR (SoftwareFactory) and removed mergeit Merge the PR (SoftwareFactory) labels Apr 1, 2022
@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 13a20d4 into ansible-collections:main Apr 1, 2022
@patchback
Copy link

patchback bot commented Apr 1, 2022

Backport to stable-2: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 13a20d4 on top of patchback/backports/stable-2/13a20d48e2cc1afe2434243bc41d8b8e95faddfb/pr-1033

Backporting merged PR #1033 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/ansible-collections/community.aws.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/stable-2/13a20d48e2cc1afe2434243bc41d8b8e95faddfb/pr-1033 upstream/stable-2
  4. Now, cherry-pick PR Add check_mode support to ec2_asg #1033 contents into that branch:
    $ git cherry-pick -x 13a20d48e2cc1afe2434243bc41d8b8e95faddfb
    If it'll yell at you with something like fatal: Commit 13a20d48e2cc1afe2434243bc41d8b8e95faddfb is a merge but no -m option was given., add -m 1 as follows intead:
    $ git cherry-pick -m1 -x 13a20d48e2cc1afe2434243bc41d8b8e95faddfb
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Add check_mode support to ec2_asg #1033 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/stable-2/13a20d48e2cc1afe2434243bc41d8b8e95faddfb/pr-1033
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link

patchback bot commented Apr 1, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/13a20d48e2cc1afe2434243bc41d8b8e95faddfb/pr-1033

Backported as #1046

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Apr 1, 2022
Add check_mode support to ec2_asg

SUMMARY

Added check_mode support to ec2_asg.

 CI failure could be resolved by #1036

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ec2_asg

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Jill R <None>
(cherry picked from commit 13a20d4)
@mandar242 mandar242 deleted the ec2_asg-check-mode-support branch April 1, 2022 22:42
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Apr 16, 2022
[PR #1033/13a20d48 backport][stable-3] Add check_mode support to ec2_asg

This is a backport of PR #1033 as merged into main (13a20d4).
SUMMARY

Added check_mode support to ec2_asg.


 CI failure could be resolved by #1036

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

ec2_asg

Reviewed-by: Markus Bergholz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2 PR should be backported to the stable-2 branch backport-3 PR should be backported to the stable-3 branch community_review feature This issue/PR relates to a feature request integration tests/integration mergeit Merge the PR (SoftwareFactory) module module plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants