-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
resource/aws_emr_instance_group: Wait for RUNNING status on creation and various fixes to be region/partition agnostic #11688
Conversation
…and various fixes to be region/partition agnostic Previously in the acceptance testing: ``` --- FAIL: TestAccAWSEMRInstanceGroup_basic (74.42s) testing.go:640: Step 0 error: errors during apply: Error: Error waiting for EMR Cluster state to be "WAITING" or "RUNNING": TERMINATED_WITH_ERRORS: VALIDATION_ERROR: The requested instance type c4.large is not supported in the requested availability zone. Learn more at https://docs.aws.amazon.com/console/elasticmapreduce/ERROR_noinstancetype --- FAIL: TestAccAWSEMRInstanceGroup_AutoScalingPolicy (560.19s) testing.go:635: Step 1 error: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected. (map[string]string) (len=1) { (string) (len=6) "status": (string) (len=8) "RESIZING" } (map[string]string) (len=1) { (string) (len=6) "status": (string) (len=12) "PROVISIONING" } ``` In the resource logic, we ensure the EMR Instance Group enters the RUNNING state on creation to satisfy Terraform's usual stabilization guarantees and account for EMR Instance Groups that may have failed on startup. In the testing, we apply the same Availability Zone blacklisting as the `aws_emr_cluster` resource testing since many instance types are not available in usw2-az4. We also switch to using the aws_partition data source and remove bootstrap actions since the functionality is not required for testing the resource and breaks outside AWS Commercial, e.g. in GovCloud: ``` --- FAIL: TestAccAWSEMRInstanceGroup_basic (182.35s) testing.go:640: Step 0 error: errors during apply: Error: Error waiting for EMR Cluster state to be "WAITING" or "RUNNING": TERMINATING: BOOTSTRAP_FAILURE: Master instance (i-0f179d71c1ed4d08e) failed attempting to download bootstrap action 1 file from S3 ``` Output from acceptance testing in AWS Commercial: ``` --- PASS: TestAccAWSEMRInstanceGroup_EmrClusterDisappears (635.92s) --- PASS: TestAccAWSEMRInstanceGroup_basic (839.34s) --- PASS: TestAccAWSEMRInstanceGroup_AutoScalingPolicy (856.98s) --- PASS: TestAccAWSEMRInstanceGroup_InstanceCount (860.39s) --- PASS: TestAccAWSEMRInstanceGroup_ConfigurationsJson (924.79s) --- PASS: TestAccAWSEMRInstanceGroup_EbsConfig_EbsOptimized (1138.23s) --- PASS: TestAccAWSEMRInstanceGroup_BidPrice (1355.93s) ``` Output from acceptance testing in AWS GovCloud (US) (remaining test failure will require a `PreCheck`): ``` --- PASS: TestAccAWSEMRInstanceGroup_EmrClusterDisappears (617.03s) --- PASS: TestAccAWSEMRInstanceGroup_basic (757.87s) --- FAIL: TestAccAWSEMRInstanceGroup_BidPrice (796.55s) testing.go:640: Step 2 error: errors during apply: Error: ValidationException: Attempted to launch spot instance in an unsupported region. status code: 400, request id: 537adc73-095f-4212-af9e-8f49f996d60c on /var/folders/w8/05f3x02n27x72g0mc2jy6_180000gp/T/tf-test595681403/main.tf line 283: (source code not available) --- PASS: TestAccAWSEMRInstanceGroup_InstanceCount (824.20s) --- PASS: TestAccAWSEMRInstanceGroup_AutoScalingPolicy (826.08s) --- PASS: TestAccAWSEMRInstanceGroup_ConfigurationsJson (843.25s) --- PASS: TestAccAWSEMRInstanceGroup_EbsConfig_EbsOptimized (1055.92s) ```
bc995f2
to
ce68dc5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
AWS Commercial
--- PASS: TestAccAWSEMRInstanceGroup_EmrClusterDisappears (625.30s)
--- PASS: TestAccAWSEMRInstanceGroup_basic (821.07s)
--- PASS: TestAccAWSEMRInstanceGroup_AutoScalingPolicy (856.61s)
--- PASS: TestAccAWSEMRInstanceGroup_ConfigurationsJson (861.34s)
--- PASS: TestAccAWSEMRInstanceGroup_InstanceCount (880.06s)
--- PASS: TestAccAWSEMRInstanceGroup_EbsConfig_EbsOptimized (1038.06s)
--- PASS: TestAccAWSEMRInstanceGroup_BidPrice (1267.92s)
AWS GovCloud
--- PASS: TestAccAWSEMRInstanceGroup_EmrClusterDisappears (572.86s)
--- PASS: TestAccAWSEMRInstanceGroup_basic (719.57s)
--- PASS: TestAccAWSEMRInstanceGroup_AutoScalingPolicy (752.50s)
--- FAIL: TestAccAWSEMRInstanceGroup_BidPrice (755.91s)
testing.go:640: Step 2 error: errors during apply:
Error: ValidationException: Attempted to launch spot instance in an unsupported region.
status code: 400, request id: bcf4e73f-ac2d-4b90-8591-f6657b5b72a8
on /opt/teamcity-agent/temp/buildTmp/tf-test136962213/main.tf line 283:
(source code not available)
--- PASS: TestAccAWSEMRInstanceGroup_EmrClusterDisappears (572.86s)
--- PASS: TestAccAWSEMRInstanceGroup_basic (719.57s)
--- PASS: TestAccAWSEMRInstanceGroup_AutoScalingPolicy (752.50s)
This has been released in version 2.47.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 for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Release note for CHANGELOG:
Previously in the acceptance testing:
In the resource logic, we ensure the EMR Instance Group enters the RUNNING state on creation to satisfy Terraform's usual stabilization guarantees and account for EMR Instance Groups that may have failed on startup.
In the testing, we apply the same Availability Zone blacklisting as the
aws_emr_cluster
resource testing since many instance types are not available in usw2-az4. We also switch to using the aws_partition data source and remove bootstrap actions since the functionality is not required for testing the resource and breaks outside AWS Commercial, e.g. in GovCloud:Output from acceptance testing in AWS Commercial:
Output from acceptance testing in AWS GovCloud (US) (remaining test failure will require a
PreCheck
):