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

Deprecate managing instances through autoscaling_group #2396

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Nov 20, 2024

SUMMARY

Managing instances directly through autoscaling_group has lead to a significant sprawl in the code which is difficult to test. With Amazon now also supporting "Instance Refresh" through its own API we can handle rolling replacements using less home-brew code (available through autoscaling_instance_refresh). The autoscaling_instance also has support for a more complete set of attach/detach/standby/terminate functionality (including instance protection management).

Deprecates the following parameters:

  • replace_all_instances -> amazon.aws.autoscaling_instance_refresh
  • replace_batch_size (tied to replace_all_instances)
  • lc_check (tied to replace_all_instances)
  • lt_check (tied to replace_all_instances)
  • detach_instances -> amazon.aws.autoscaling_instance
  • replace_instances -> amazon.aws.autoscaling_instance
  • decrement_desired_capacity (tied to detach_instances and replace_instances)

This functionality provided through these parameters is now available through autoscaling_instance and autoscaling_instance_refresh

Also adds group_name as an alias for name on both autoscaling_instance_refresh and autoscaling_group for consistency with autoscaling_instance where name would be ambiguous.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • autoscaling_group
  • autoscaling_instance
  • autoscaling_instance_refresh
ADDITIONAL INFORMATION

Copy link

github-actions bot commented Nov 20, 2024

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@tremble tremble force-pushed the autoscaling_deprecate branch from c6327be to cf80810 Compare November 20, 2024 10:04
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/a13e9bf229ce41ae9d3c5bfed7840d02

✔️ ansible-galaxy-importer SUCCESS in 4m 48s
✔️ build-ansible-collection SUCCESS in 11m 09s
✔️ ansible-test-splitter SUCCESS in 3m 50s
✔️ integration-amazon.aws-1 SUCCESS in 31m 48s
✔️ integration-amazon.aws-2 SUCCESS in 13m 25s
✔️ integration-amazon.aws-3 SUCCESS in 15m 37s
Skipped 41 jobs

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/5ed5404c277f457c9460c7cf8615a479

✔️ ansible-galaxy-importer SUCCESS in 5m 33s
✔️ build-ansible-collection SUCCESS in 10m 03s
✔️ ansible-test-splitter SUCCESS in 3m 54s
✔️ integration-amazon.aws-1 SUCCESS in 32m 38s
✔️ integration-amazon.aws-2 SUCCESS in 11m 25s
✔️ integration-amazon.aws-3 SUCCESS in 13m 19s
Skipped 41 jobs

@tremble tremble added this to the 10.0.0 milestone Nov 21, 2024
@@ -341,13 +373,14 @@
"""

EXAMPLES = r"""
# Basic configuration with Launch Configuration
# Basic configuration with Launch Template

- amazon.aws.autoscaling_group:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be clearer if a name was provided for each task?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome! Thanks.

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/f193a2a031c548248a409cad524eb82e

✔️ ansible-galaxy-importer SUCCESS in 4m 52s
✔️ build-ansible-collection SUCCESS in 10m 03s
✔️ ansible-test-splitter SUCCESS in 3m 59s
integration-amazon.aws-1 FAILURE in 51m 47s
✔️ integration-amazon.aws-2 SUCCESS in 11m 08s
✔️ integration-amazon.aws-3 SUCCESS in 20m 35s
Skipped 41 jobs

@tremble
Copy link
Contributor Author

tremble commented Nov 21, 2024

recheck

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/53157c42aea34d43b9b3f31489e99611

✔️ ansible-galaxy-importer SUCCESS in 4m 43s
✔️ build-ansible-collection SUCCESS in 10m 21s
✔️ ansible-test-splitter SUCCESS in 3m 48s
integration-amazon.aws-1 FAILURE in 52m 58s
✔️ integration-amazon.aws-2 SUCCESS in 11m 57s
✔️ integration-amazon.aws-3 SUCCESS in 17m 59s
Skipped 41 jobs

@tremble
Copy link
Contributor Author

tremble commented Nov 22, 2024

recheck

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/7efda84c30644b428cd543c953c2d491

✔️ ansible-galaxy-importer SUCCESS in 4m 53s
✔️ build-ansible-collection SUCCESS in 10m 13s
✔️ ansible-test-splitter SUCCESS in 4m 25s
✔️ integration-amazon.aws-1 SUCCESS in 37m 42s
✔️ integration-amazon.aws-2 SUCCESS in 10m 41s
✔️ integration-amazon.aws-3 SUCCESS in 16m 13s
Skipped 41 jobs

@tremble tremble added mergeit Merge the PR (SoftwareFactory) backport-9 and removed backport-9 labels Nov 22, 2024
Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/89df5bfde6184f0780662bf6336b9c9f

✔️ ansible-galaxy-importer SUCCESS in 4m 47s
✔️ build-ansible-collection SUCCESS in 10m 02s
✔️ ansible-test-splitter SUCCESS in 3m 51s
✔️ integration-amazon.aws-1 SUCCESS in 34m 40s
✔️ integration-amazon.aws-2 SUCCESS in 12m 35s
✔️ integration-amazon.aws-3 SUCCESS in 14m 31s
Skipped 41 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 3c7e9ec into ansible-collections:main Nov 22, 2024
45 of 47 checks passed
Copy link

patchback bot commented Nov 22, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/3c7e9eca848857127f11b9aa16f5c2796ef4b8a8/pr-2396

Backported as #2399

🤖 @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 Nov 22, 2024
SUMMARY
Managing instances directly through autoscaling_group has lead to a significant sprawl in the code which is difficult to test.  With Amazon now also supporting "Instance Refresh" through its own API we can handle rolling replacements using less home-brew code (available through autoscaling_instance_refresh).  The autoscaling_instance also has support for a more complete set of attach/detach/standby/terminate functionality (including instance protection management).
Deprecates the following parameters:

replace_all_instances -> amazon.aws.autoscaling_instance_refresh
replace_batch_size (tied to replace_all_instances)
lc_check (tied to replace_all_instances)
lt_check (tied to replace_all_instances)
detach_instances -> amazon.aws.autoscaling_instance
replace_instances -> amazon.aws.autoscaling_instance
decrement_desired_capacity (tied to detach_instances and replace_instances)

This functionality provided through these parameters is now available through autoscaling_instance and autoscaling_instance_refresh
Also adds group_name as an alias for name on both autoscaling_instance_refresh and autoscaling_group for consistency with autoscaling_instance where name would be ambiguous.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

autoscaling_group
autoscaling_instance
autoscaling_instance_refresh

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
Reviewed-by: Mark Chappell
(cherry picked from commit 3c7e9ec)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Nov 22, 2024
This is a backport of PR #2396 as merged into main (3c7e9ec).
SUMMARY
Managing instances directly through autoscaling_group has lead to a significant sprawl in the code which is difficult to test.  With Amazon now also supporting "Instance Refresh" through its own API we can handle rolling replacements using less home-brew code (available through autoscaling_instance_refresh).  The autoscaling_instance also has support for a more complete set of attach/detach/standby/terminate functionality (including instance protection management).
Deprecates the following parameters:

replace_all_instances -> amazon.aws.autoscaling_instance_refresh
replace_batch_size (tied to replace_all_instances)
lc_check (tied to replace_all_instances)
lt_check (tied to replace_all_instances)
detach_instances -> amazon.aws.autoscaling_instance
replace_instances -> amazon.aws.autoscaling_instance
decrement_desired_capacity (tied to detach_instances and replace_instances)

This functionality provided through these parameters is now available through autoscaling_instance and autoscaling_instance_refresh
Also adds group_name as an alias for name on both autoscaling_instance_refresh and autoscaling_group for consistency with autoscaling_instance where name would be ambiguous.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

autoscaling_group
autoscaling_instance
autoscaling_instance_refresh

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants