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

Tech debt: Switch to WithoutTimeout CRUD handlers for MQ #27989

Merged
merged 8 commits into from
Nov 23, 2022

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Nov 23, 2022

Description

Migrates MQ service resources to WithoutTimeout CRUD handlers.

Relations

Relates #15090.

Output from Acceptance Testing

--- PASS: TestAccMQBrokerDataSource_basic (1103.10s)
--- PASS: TestAccMQBroker_Update_users (1543.10s)
--- PASS: TestAccMQBroker_EncryptionOptions_managedKeyEnabled (951.01s)
--- PASS: TestAccMQBroker_AllFields_defaultVPC (1790.04s)
--- PASS: TestAccMQBroker_EncryptionOptions_managedKeyDisabled (990.96s)
--- PASS: TestAccMQBroker_EncryptionOptions_kmsKeyID (1153.36s)
--- PASS: TestAccMQBroker_tags (1047.21s)
--- PASS: TestAccMQBroker_AllFields_customVPC (1818.54s)
--- PASS: TestAccMQBroker_throughputOptimized (794.75s)
--- PASS: TestAccMQBroker_disappears (1060.37s)
--- PASS: TestAccMQBroker_RabbitMQ_logs (893.70s)
--- PASS: TestAccMQBroker_ldap (1063.29s)g
--- PASS: TestAccMQBroker_RabbitMQ_cluster (961.99s)
--- PASS: TestAccMQBroker_RabbitMQ_validationAuditLog (818.20s)
--- PASS: TestAccMQBroker_RabbitMQ_basic (881.14s)
--- PASS: TestAccMQBroker_Update_hostInstanceType (1491.39s)
--- PASS: TestAccMQBroker_Update_engineVersion (1135.92s)
--- PASS: TestAccMQBroker_Update_securityGroup (1297.64s)
% make sweep SWEEPARGS=-sweep-run=aws_mq_broker 
# make sweep SWEEPARGS=-sweep-run=aws_example_thing
# set SWEEPARGS=-sweep-allow-failures to continue after first failure
WARNING: This will destroy infrastructure. Use only in development accounts.
go test ./internal/sweep -v -tags=sweep -sweep=us-west-2,us-east-1,us-east-2 -sweep-run=aws_mq_broker -timeout 60m
2022/11/23 15:04:30 [DEBUG] Running Sweepers for region (us-west-2):
2022/11/23 15:04:30 [DEBUG] Running Sweeper (aws_mq_broker) in region (us-west-2)
2022/11/23 15:04:30 [INFO] Retrieved credentials from "EnvConfigCredentials"
2022/11/23 15:04:30 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/11/23 15:04:31 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/11/23 15:04:32 [DEBUG] Waiting for state to become: [success]
2022/11/23 15:04:32 [INFO] Deleting MQ Broker: b-4b327080-5ee8-47e8-a1d9-8d356c70ad39
2022/11/23 15:04:32 [DEBUG] Waiting for state to become: []
2022/11/23 15:04:32 [TRACE] Waiting 200ms before next try
2022/11/23 15:04:33 [TRACE] Waiting 400ms before next try
2022/11/23 15:04:34 [TRACE] Waiting 800ms before next try
2022/11/23 15:04:35 [TRACE] Waiting 1.6s before next try
2022/11/23 15:04:36 [TRACE] Waiting 3.2s before next try
2022/11/23 15:04:40 [TRACE] Waiting 6.4s before next try
2022/11/23 15:04:46 [TRACE] Waiting 10s before next try
2022/11/23 15:04:57 [TRACE] Waiting 10s before next try
2022/11/23 15:05:07 [TRACE] Waiting 10s before next try
2022/11/23 15:05:17 [TRACE] Waiting 10s before next try
2022/11/23 15:05:27 [TRACE] Waiting 10s before next try
2022/11/23 15:05:37 [TRACE] Waiting 10s before next try
2022/11/23 15:05:47 [TRACE] Waiting 10s before next try
2022/11/23 15:05:58 [TRACE] Waiting 10s before next try
2022/11/23 15:06:08 [TRACE] Waiting 10s before next try
2022/11/23 15:06:18 [TRACE] Waiting 10s before next try
2022/11/23 15:06:28 [TRACE] Waiting 10s before next try
2022/11/23 15:06:38 [TRACE] Waiting 10s before next try
2022/11/23 15:06:49 [TRACE] Waiting 10s before next try
2022/11/23 15:06:59 [TRACE] Waiting 10s before next try
2022/11/23 15:07:09 [TRACE] Waiting 10s before next try
2022/11/23 15:07:19 [TRACE] Waiting 10s before next try
2022/11/23 15:07:29 [TRACE] Waiting 10s before next try
2022/11/23 15:07:39 [TRACE] Waiting 10s before next try
2022/11/23 15:07:50 [TRACE] Waiting 10s before next try
2022/11/23 15:08:00 [TRACE] Waiting 10s before next try
2022/11/23 15:08:10 [TRACE] Waiting 10s before next try
2022/11/23 15:08:20 [TRACE] Waiting 10s before next try
2022/11/23 15:08:31 [TRACE] Waiting 10s before next try
2022/11/23 15:08:41 [TRACE] Waiting 10s before next try
2022/11/23 15:08:51 [TRACE] Waiting 10s before next try
2022/11/23 15:09:01 [TRACE] Waiting 10s before next try
2022/11/23 15:09:11 [TRACE] Waiting 10s before next try
2022/11/23 15:09:22 [TRACE] Waiting 10s before next try
2022/11/23 15:09:32 [TRACE] Waiting 10s before next try
2022/11/23 15:09:42 [TRACE] Waiting 10s before next try
2022/11/23 15:09:52 [TRACE] Waiting 10s before next try
2022/11/23 15:10:02 [DEBUG] Completed Sweeper (aws_mq_broker) in region (us-west-2) in 5m31.840968851s
2022/11/23 15:10:02 Completed Sweepers for region (us-west-2) in 5m31.841176786s
2022/11/23 15:10:02 Sweeper Tests for region (us-west-2) ran successfully:
	- aws_mq_broker
2022/11/23 15:10:02 [DEBUG] Running Sweepers for region (us-east-1):
2022/11/23 15:10:02 [DEBUG] Running Sweeper (aws_mq_broker) in region (us-east-1)
2022/11/23 15:10:02 [INFO] Retrieved credentials from "EnvConfigCredentials"
2022/11/23 15:10:02 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/11/23 15:10:02 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/11/23 15:10:03 [DEBUG] Completed Sweeper (aws_mq_broker) in region (us-east-1) in 634.966193ms
2022/11/23 15:10:03 Completed Sweepers for region (us-east-1) in 635.029274ms
2022/11/23 15:10:03 Sweeper Tests for region (us-east-1) ran successfully:
	- aws_mq_broker
2022/11/23 15:10:03 [DEBUG] Running Sweepers for region (us-east-2):
2022/11/23 15:10:03 [DEBUG] Running Sweeper (aws_mq_broker) in region (us-east-2)
2022/11/23 15:10:03 [INFO] Retrieved credentials from "EnvConfigCredentials"
2022/11/23 15:10:03 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/11/23 15:10:03 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/11/23 15:10:04 [DEBUG] Completed Sweeper (aws_mq_broker) in region (us-east-2) in 933.721337ms
2022/11/23 15:10:04 Completed Sweepers for region (us-east-2) in 933.802554ms
2022/11/23 15:10:04 Sweeper Tests for region (us-east-2) ran successfully:
	- aws_mq_broker
ok  	github.com/hashicorp/terraform-provider-aws/internal/sweep	337.904s

Acceptance test output:

% make testacc TESTARGS='-run=TestAccMQConfiguration_' PKG=mq ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/mq/... -v -count 1 -parallel 2  -run=TestAccMQConfiguration_ -timeout 180m
=== RUN   TestAccMQConfiguration_basic
=== PAUSE TestAccMQConfiguration_basic
=== RUN   TestAccMQConfiguration_withData
=== PAUSE TestAccMQConfiguration_withData
=== RUN   TestAccMQConfiguration_withLdapData
=== PAUSE TestAccMQConfiguration_withLdapData
=== RUN   TestAccMQConfiguration_tags
=== PAUSE TestAccMQConfiguration_tags
=== CONT  TestAccMQConfiguration_basic
=== CONT  TestAccMQConfiguration_withLdapData
--- PASS: TestAccMQConfiguration_withLdapData (21.43s)
=== CONT  TestAccMQConfiguration_withData
--- PASS: TestAccMQConfiguration_basic (38.58s)
=== CONT  TestAccMQConfiguration_tags
--- PASS: TestAccMQConfiguration_withData (19.96s)
--- PASS: TestAccMQConfiguration_tags (46.36s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/mq	89.544s
).

Acceptance test output:

% make testacc TESTARGS='-run=TestAccMQConfiguration_' PKG=mq ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/mq/... -v -count 1 -parallel 2  -run=TestAccMQConfiguration_ -timeout 180m
=== RUN   TestAccMQConfiguration_basic
=== PAUSE TestAccMQConfiguration_basic
=== RUN   TestAccMQConfiguration_withData
=== PAUSE TestAccMQConfiguration_withData
=== RUN   TestAccMQConfiguration_withLdapData
=== PAUSE TestAccMQConfiguration_withLdapData
=== RUN   TestAccMQConfiguration_tags
=== PAUSE TestAccMQConfiguration_tags
=== CONT  TestAccMQConfiguration_basic
=== CONT  TestAccMQConfiguration_withLdapData
--- PASS: TestAccMQConfiguration_withLdapData (25.43s)
=== CONT  TestAccMQConfiguration_withData
--- PASS: TestAccMQConfiguration_basic (35.47s)
=== CONT  TestAccMQConfiguration_tags
--- PASS: TestAccMQConfiguration_withData (20.19s)
--- PASS: TestAccMQConfiguration_tags (47.72s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/mq	88.212s
…RUD handlers (#15090).

Acceptance test output:

% make testacc TESTARGS='-run=TestAccMQBrokerInstanceTypeOfferingsDataSource_' PKG=mq ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/mq/... -v -count 1 -parallel 2  -run=TestAccMQBrokerInstanceTypeOfferingsDataSource_ -timeout 180m
=== RUN   TestAccMQBrokerInstanceTypeOfferingsDataSource_basic
=== PAUSE TestAccMQBrokerInstanceTypeOfferingsDataSource_basic
=== CONT  TestAccMQBrokerInstanceTypeOfferingsDataSource_basic
--- PASS: TestAccMQBrokerInstanceTypeOfferingsDataSource_basic (18.12s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/mq	22.768s
@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 generators Relates to code generators. service/mq Issues and PRs that pertain to the mq service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. labels Nov 23, 2022
@github-actions github-actions bot added service/logs Issues and PRs that pertain to the logs service. sweeper Pertains to changes to or issues with the sweeper. labels Nov 23, 2022
@ewbankkit ewbankkit added the technical-debt Addresses areas of the codebase that need refactoring or redesign. label Nov 23, 2022
@ewbankkit ewbankkit merged commit 86436c0 into main Nov 23, 2022
@ewbankkit ewbankkit deleted the td-mq-modernize branch November 23, 2022 22:56
@github-actions github-actions bot added this to the v4.41.0 milestone Nov 23, 2022
github-actions bot pushed a commit that referenced this pull request Nov 23, 2022
@github-actions
Copy link

This functionality has been released in v4.41.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 Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
generators Relates to code generators. service/logs Issues and PRs that pertain to the logs service. service/mq Issues and PRs that pertain to the mq service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. technical-debt Addresses areas of the codebase that need refactoring or redesign. 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.

1 participant