-
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
r/sagemaker_image - new resource #16082
Conversation
e0c12f9
to
5059db6
Compare
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSagemakerImage_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSagemakerImage_ -timeout 120m
=== RUN TestAccAWSSagemakerImage_basic
=== PAUSE TestAccAWSSagemakerImage_basic
=== RUN TestAccAWSSagemakerImage_description
=== PAUSE TestAccAWSSagemakerImage_description
=== RUN TestAccAWSSagemakerImage_displayName
=== PAUSE TestAccAWSSagemakerImage_displayName
=== RUN TestAccAWSSagemakerImage_tags
=== PAUSE TestAccAWSSagemakerImage_tags
=== RUN TestAccAWSSagemakerImage_disappears
=== PAUSE TestAccAWSSagemakerImage_disappears
=== CONT TestAccAWSSagemakerImage_basic
=== CONT TestAccAWSSagemakerImage_disappears
=== CONT TestAccAWSSagemakerImage_tags
=== CONT TestAccAWSSagemakerImage_displayName
=== CONT TestAccAWSSagemakerImage_description
resource_aws_sagemaker_image_test.go:94: Step 1/4 error: Error running apply: 2020/11/10 13:03:45 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.10.0
Error: error waiting for SageMaker Image (tf-acc-test-6701078467973104332) to create: unexpected state 'CREATE_FAILED', wanted target 'CREATED'. last error: %!s(<nil>)
=== CONT TestAccAWSSagemakerImage_basic
resource_aws_sagemaker_image_test.go:65: Step 1/2 error: Error running apply: 2020/11/10 13:03:46 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.10.0
Error: error waiting for SageMaker Image (tf-acc-test-633219264484407602) to create: unexpected state 'CREATE_FAILED', wanted target 'CREATED'. last error: %!s(<nil>)
=== CONT TestAccAWSSagemakerImage_tags
resource_aws_sagemaker_image_test.go:174: Step 1/4 error: Error running apply: 2020/11/10 13:03:46 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.10.0
Error: error waiting for SageMaker Image (tf-acc-test-1768421131957399270) to create: unexpected state 'CREATE_FAILED', wanted target 'CREATED'. last error: %!s(<nil>)
=== CONT TestAccAWSSagemakerImage_displayName
resource_aws_sagemaker_image_test.go:134: Step 1/4 error: Error running apply: 2020/11/10 13:03:45 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.10.0
Error: error waiting for SageMaker Image (tf-acc-test-3019142710389142362) to create: unexpected state 'CREATE_FAILED', wanted target 'CREATED'. last error: %!s(<nil>)
=== CONT TestAccAWSSagemakerImage_disappears
resource_aws_sagemaker_image_test.go:218: Step 1/1 error: Error running apply: 2020/11/10 13:03:46 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.10.0
Error: error waiting for SageMaker Image (tf-acc-test-8203763318322771741) to create: unexpected state 'CREATE_FAILED', wanted target 'CREATED'. last error: %!s(<nil>)
--- FAIL: TestAccAWSSagemakerImage_basic (12.83s)
--- FAIL: TestAccAWSSagemakerImage_disappears (12.83s)
--- FAIL: TestAccAWSSagemakerImage_description (13.25s)
--- FAIL: TestAccAWSSagemakerImage_tags (13.33s)
--- FAIL: TestAccAWSSagemakerImage_displayName (13.40s)
FAIL
FAIL github.com/terraform-providers/terraform-provider-aws/aws 13.461s
FAIL
GNUmakefile:27: recipe for target 'testacc' failed
make: *** [testacc] Error 1 I assume some pre-requisite is missing. At the API level the error is:
It's an IAM eventual consistency error. If I create the role, wait a few seconds and then create the SageMaker image, all is good. |
Didn't get this before. now getting this constantly. I tried to retry but same result. will take a look again |
11dbf62
to
3373319
Compare
So this is not as much as eventual consistency but having the right policy, ill leave a retry logic in place in any case and update docs on what is needed. AWS docs are not super clear but if you create a role via the Sagemaker console it adds a custom policy to read from some sagemaker buckets |
Ok, so this is even more annoying, sleeping before create solve it. simply retrying create (even for 10 mins) returns the same error (like its caching it on the backend?) and role can technically be passed as an update arguement but it never really updates it. tests from latest changes
|
Co-authored-by: Kit Ewbank <Kit_Ewbank@hotmail.com>
Co-authored-by: Kit Ewbank <Kit_Ewbank@hotmail.com>
Co-authored-by: Kit Ewbank <Kit_Ewbank@hotmail.com>
Co-authored-by: Kit Ewbank <Kit_Ewbank@hotmail.com>
c5340fe
to
43c6942
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.
LGTM.
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSagemakerImage_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSagemakerImage_ -timeout 120m
=== RUN TestAccAWSSagemakerImage_basic
=== PAUSE TestAccAWSSagemakerImage_basic
=== RUN TestAccAWSSagemakerImage_description
=== PAUSE TestAccAWSSagemakerImage_description
=== RUN TestAccAWSSagemakerImage_displayName
=== PAUSE TestAccAWSSagemakerImage_displayName
=== RUN TestAccAWSSagemakerImage_tags
=== PAUSE TestAccAWSSagemakerImage_tags
=== RUN TestAccAWSSagemakerImage_disappears
=== PAUSE TestAccAWSSagemakerImage_disappears
=== CONT TestAccAWSSagemakerImage_basic
=== CONT TestAccAWSSagemakerImage_tags
=== CONT TestAccAWSSagemakerImage_disappears
=== CONT TestAccAWSSagemakerImage_displayName
=== CONT TestAccAWSSagemakerImage_description
--- PASS: TestAccAWSSagemakerImage_disappears (80.67s)
--- PASS: TestAccAWSSagemakerImage_basic (81.45s)
--- PASS: TestAccAWSSagemakerImage_description (103.85s)
--- PASS: TestAccAWSSagemakerImage_tags (108.45s)
--- PASS: TestAccAWSSagemakerImage_displayName (110.23s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 110.319s
LGTM 🚀 Thanks @DrFaust92 Verified Acceptance Tests in Commercial (us-west-2) make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSagemakerImage_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSagemakerImage_ -timeout 120m
=== RUN TestAccAWSSagemakerImage_basic
=== PAUSE TestAccAWSSagemakerImage_basic
=== RUN TestAccAWSSagemakerImage_description
=== PAUSE TestAccAWSSagemakerImage_description
=== RUN TestAccAWSSagemakerImage_displayName
=== PAUSE TestAccAWSSagemakerImage_displayName
=== RUN TestAccAWSSagemakerImage_tags
=== PAUSE TestAccAWSSagemakerImage_tags
=== RUN TestAccAWSSagemakerImage_disappears
=== PAUSE TestAccAWSSagemakerImage_disappears
=== CONT TestAccAWSSagemakerImage_basic
=== CONT TestAccAWSSagemakerImage_tags
=== CONT TestAccAWSSagemakerImage_disappears
=== CONT TestAccAWSSagemakerImage_displayName
=== CONT TestAccAWSSagemakerImage_description
--- PASS: TestAccAWSSagemakerImage_disappears (76.16s)
--- PASS: TestAccAWSSagemakerImage_basic (78.60s)
--- PASS: TestAccAWSSagemakerImage_description (98.61s)
--- PASS: TestAccAWSSagemakerImage_tags (99.68s)
--- PASS: TestAccAWSSagemakerImage_displayName (101.98s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 103.869s Note that this resource is part of SageMaker Studio which is not available in GovCloud. This will require work to skip these tests when run in that region. This is tracked here: #16968 |
This has been released in version 3.23.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:
Output from acceptance testing: