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

r/aws_autoscaling_policy: Fix type of target_value for predictive scaling #28444

Conversation

jungseoklee
Copy link
Contributor

@jungseoklee jungseoklee commented Dec 19, 2022

Description

This patch fixes type of target_value for predictive scaling, which allows double per AWS API reference. The existing users will not be affected because this change is backward compatible (= the existing acceptance testing using TypeInt succeeds without modification).

Relations

Closes #27817

References

This is corresponding API reference: https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PredictiveScalingMetricSpecification.html

Output from Acceptance Testing

make testacc TESTS=TestAccAutoScalingPolicy PKG=autoscaling
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/autoscaling/... -v -count 1 -parallel 20 -run='TestAccAutoScalingPolicy'  -timeout 180m
=== RUN   TestAccAutoScalingPolicy_basic
=== PAUSE TestAccAutoScalingPolicy_basic
=== RUN   TestAccAutoScalingPolicy_disappears
=== PAUSE TestAccAutoScalingPolicy_disappears
=== RUN   TestAccAutoScalingPolicy_predictiveScalingPredefined
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingPredefined
=== RUN   TestAccAutoScalingPolicy_predictiveScalingCustom
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingCustom
=== RUN   TestAccAutoScalingPolicy_predictiveScalingRemoved
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingRemoved
=== RUN   TestAccAutoScalingPolicy_predictiveScalingUpdated
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingUpdated
=== RUN   TestAccAutoScalingPolicy_predictiveScalingFloatTargetValue
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingFloatTargetValue
=== RUN   TestAccAutoScalingPolicy_simpleScalingStepAdjustment
=== PAUSE TestAccAutoScalingPolicy_simpleScalingStepAdjustment
=== RUN   TestAccAutoScalingPolicy_TargetTrack_predefined
=== PAUSE TestAccAutoScalingPolicy_TargetTrack_predefined
=== RUN   TestAccAutoScalingPolicy_TargetTrack_custom
=== PAUSE TestAccAutoScalingPolicy_TargetTrack_custom
=== RUN   TestAccAutoScalingPolicy_zeroValue
=== PAUSE TestAccAutoScalingPolicy_zeroValue
=== CONT  TestAccAutoScalingPolicy_basic
=== CONT  TestAccAutoScalingPolicy_predictiveScalingFloatTargetValue
=== CONT  TestAccAutoScalingPolicy_TargetTrack_custom
=== CONT  TestAccAutoScalingPolicy_TargetTrack_predefined
=== CONT  TestAccAutoScalingPolicy_predictiveScalingPredefined
=== CONT  TestAccAutoScalingPolicy_zeroValue
=== CONT  TestAccAutoScalingPolicy_disappears
=== CONT  TestAccAutoScalingPolicy_predictiveScalingCustom
=== CONT  TestAccAutoScalingPolicy_predictiveScalingUpdated
=== CONT  TestAccAutoScalingPolicy_simpleScalingStepAdjustment
=== CONT  TestAccAutoScalingPolicy_predictiveScalingRemoved
--- PASS: TestAccAutoScalingPolicy_disappears (39.13s)
--- PASS: TestAccAutoScalingPolicy_simpleScalingStepAdjustment (40.16s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingCustom (40.38s)
--- PASS: TestAccAutoScalingPolicy_TargetTrack_custom (43.00s)
--- PASS: TestAccAutoScalingPolicy_TargetTrack_predefined (45.07s)
--- PASS: TestAccAutoScalingPolicy_zeroValue (51.36s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingFloatTargetValue (52.98s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingPredefined (53.60s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingRemoved (54.54s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingUpdated (62.95s)
--- PASS: TestAccAutoScalingPolicy_basic (69.99s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/autoscaling	70.121s

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. size/S Managed by automation to categorize the size of a PR. service/autoscaling Issues and PRs that pertain to the autoscaling service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 19, 2022
@jungseoklee jungseoklee force-pushed the b-aws_autoscaling_policy-target_value_type_for_predictive_scaling branch from 5780b45 to 9d66c42 Compare December 19, 2022 01:34
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. service/networkfirewall Issues and PRs that pertain to the networkfirewall service. and removed size/S Managed by automation to categorize the size of a PR. labels Dec 19, 2022
@jungseoklee jungseoklee force-pushed the b-aws_autoscaling_policy-target_value_type_for_predictive_scaling branch from 9d66c42 to 5d5dc21 Compare December 19, 2022 01:37
@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. and removed service/networkfirewall Issues and PRs that pertain to the networkfirewall service. size/L Managed by automation to categorize the size of a PR. labels Dec 19, 2022
@jungseoklee jungseoklee force-pushed the b-aws_autoscaling_policy-target_value_type_for_predictive_scaling branch from 5d5dc21 to ae8272c Compare December 19, 2022 02:02
…ling

This patch fixes type of target_value for predictive scaling, which allows double
per AWS API reference. The existing users will not be affected because this change
is backward compatible.
@jungseoklee jungseoklee force-pushed the b-aws_autoscaling_policy-target_value_type_for_predictive_scaling branch from ae8272c to 1f626f7 Compare December 19, 2022 02:10
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 6, 2023
@AdamTylerLynch AdamTylerLynch added the partner Contribution from a partner. label Jan 24, 2023
Copy link
Collaborator

@AdamTylerLynch AdamTylerLynch left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@johnsonaj johnsonaj self-requested a review February 10, 2023 23:09
Copy link
Contributor

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

$ make testacc TESTARGS='-run=TestAccAutoScalingPolicy_' PKG=autoscaling

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/autoscaling/... -v -count 1 -parallel 20  -run=TestAccAutoScalingPolicy_ -timeout 180m
--- PASS: TestAccAutoScalingPolicy_disappears (35.52s)
--- PASS: TestAccAutoScalingPolicy_TargetTrack_predefined (38.50s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingFloatTargetValue (45.09s)
--- PASS: TestAccAutoScalingPolicy_zeroValue (45.64s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingCustom (47.12s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingPredefined (50.94s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingRemoved (58.23s)
--- PASS: TestAccAutoScalingPolicy_TargetTrack_custom (59.06s)
--- PASS: TestAccAutoScalingPolicy_simpleScalingStepAdjustment (65.88s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingUpdated (70.65s)
--- PASS: TestAccAutoScalingPolicy_basic (74.36s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/autoscaling	77.436s

@johnsonaj johnsonaj merged commit b6cdb76 into hashicorp:main Feb 11, 2023
@github-actions github-actions bot added this to the v4.55.0 milestone Feb 11, 2023
@github-actions
Copy link

This functionality has been released in v4.55.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. partner Contribution from a partner. service/autoscaling Issues and PRs that pertain to the autoscaling service. size/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Predictive autoscaling policy target_value does not accept double values
4 participants