-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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_app - new resource #17251
Conversation
baab6f6
to
927aede
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=TestAccAWSSagemakerApp_\|TestAccAWSSagemakerUserProfile_disappears' ACCTEST_PARALLELISM=1
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 1 -run=TestAccAWSSagemakerApp_\|TestAccAWSSagemakerUserProfile_disappears -timeout 120m
=== RUN TestAccAWSSagemakerApp_basic
=== PAUSE TestAccAWSSagemakerApp_basic
=== RUN TestAccAWSSagemakerApp_resourceSpec
=== PAUSE TestAccAWSSagemakerApp_resourceSpec
=== RUN TestAccAWSSagemakerApp_tags
=== PAUSE TestAccAWSSagemakerApp_tags
=== RUN TestAccAWSSagemakerApp_disappears
=== PAUSE TestAccAWSSagemakerApp_disappears
=== RUN TestAccAWSSagemakerUserProfile_disappears
=== PAUSE TestAccAWSSagemakerUserProfile_disappears
=== CONT TestAccAWSSagemakerApp_basic
--- PASS: TestAccAWSSagemakerApp_basic (602.93s)
=== CONT TestAccAWSSagemakerApp_disappears
--- PASS: TestAccAWSSagemakerApp_disappears (775.08s)
=== CONT TestAccAWSSagemakerUserProfile_disappears
--- PASS: TestAccAWSSagemakerUserProfile_disappears (196.78s)
=== CONT TestAccAWSSagemakerApp_tags
--- PASS: TestAccAWSSagemakerApp_tags (942.22s)
=== CONT TestAccAWSSagemakerApp_resourceSpec
--- PASS: TestAccAWSSagemakerApp_resourceSpec (826.60s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 3343.715s
$ SAGEMAKER_IMAGE_VERSION_BASE_IMAGE=x make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSagemakerDomain_kernelGatewayAppSettings_customImage'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSagemakerDomain_kernelGatewayAppSettings_customImage -timeout 120m
=== RUN TestAccAWSSagemakerDomain_kernelGatewayAppSettings_customImage
=== PAUSE TestAccAWSSagemakerDomain_kernelGatewayAppSettings_customImage
=== CONT TestAccAWSSagemakerDomain_kernelGatewayAppSettings_customImage
--- PASS: TestAccAWSSagemakerDomain_kernelGatewayAppSettings_customImage (260.99s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 261.094s
16c4d8a
to
c2a310a
Compare
Serialized Sagemaker Studio tests |
rName := acctest.RandomWithPrefix("tf-acc-test") | ||
resourceName := "aws_sagemaker_app.test" | ||
|
||
resource.ParallelTest(t, resource.TestCase{ |
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.
To get test serialization you will also have to change all the relevant resource.ParallelTest(...)
calls into resource.Test(...)
calls, otherwise I get errors like:
$ SAGEMAKER_IMAGE_VERSION_BASE_IMAGE=x make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSagemakerDomain_\|TestAccAWSSagemakerApp_\|TestAccAWSSagemakerUserProfile_disappears'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSagemakerDomain_\|TestAccAWSSagemakerApp_\|TestAccAWSSagemakerUserProfile_disappears -timeout 120m
=== RUN TestAccAWSSagemakerDomain_serial
=== RUN TestAccAWSSagemakerDomain_serial/Domain
=== RUN TestAccAWSSagemakerDomain_serial/Domain/basic
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/basic
=== RUN TestAccAWSSagemakerDomain_serial/Domain/tags
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/tags
=== RUN TestAccAWSSagemakerDomain_serial/Domain/tensorboardAppSettings
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/tensorboardAppSettings
=== RUN TestAccAWSSagemakerDomain_serial/Domain/kernelGatewayAppSettings_customImage
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/kernelGatewayAppSettings_customImage
=== RUN TestAccAWSSagemakerDomain_serial/Domain/jupyterServerAppSettings
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/jupyterServerAppSettings
=== RUN TestAccAWSSagemakerDomain_serial/Domain/kms
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/kms
=== RUN TestAccAWSSagemakerDomain_serial/Domain/disappears
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/disappears
=== RUN TestAccAWSSagemakerDomain_serial/Domain/tensorboardAppSettingsWithImage
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/tensorboardAppSettingsWithImage
=== RUN TestAccAWSSagemakerDomain_serial/Domain/kernelGatewayAppSettings
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/kernelGatewayAppSettings
=== RUN TestAccAWSSagemakerDomain_serial/Domain/securityGroup
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/securityGroup
=== RUN TestAccAWSSagemakerDomain_serial/Domain/sharingSettings
=== PAUSE TestAccAWSSagemakerDomain_serial/Domain/sharingSettings
=== CONT TestAccAWSSagemakerDomain_serial/Domain/basic
=== CONT TestAccAWSSagemakerDomain_serial/Domain/sharingSettings
=== CONT TestAccAWSSagemakerDomain_serial/Domain/securityGroup
=== CONT TestAccAWSSagemakerDomain_serial/Domain/kernelGatewayAppSettings
=== CONT TestAccAWSSagemakerDomain_serial/Domain/tensorboardAppSettingsWithImage
=== CONT TestAccAWSSagemakerDomain_serial/Domain/disappears
=== CONT TestAccAWSSagemakerDomain_serial/Domain/kms
=== CONT TestAccAWSSagemakerDomain_serial/Domain/jupyterServerAppSettings
=== CONT TestAccAWSSagemakerDomain_serial/Domain/kernelGatewayAppSettings_customImage
=== CONT TestAccAWSSagemakerDomain_serial/Domain/tensorboardAppSettings
=== CONT TestAccAWSSagemakerDomain_serial/Domain/tags
=== CONT TestAccAWSSagemakerDomain_serial/Domain/securityGroup
resource_aws_sagemaker_domain_test.go:224: Step 1/3 error: Error running apply: 2021/02/04 07:51:43 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.12.0
Error: error creating SageMaker domain: ResourceLimitExceeded: The account-level service limit 'Total domains' is 1 Domains, with current utilization of 1 Domains and a request delta of 1 Domains. Please contact AWS support to request an increase for this limit.
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" | ||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" | ||
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform" | ||
"github.com/terraform-providers/terraform-provider-aws/aws/internal/service/sagemaker/finder" | ||
) | ||
|
||
func TestAccAWSSagemakerDomain_serial(t *testing.T) { |
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.
Maybe add a comment noting that SageMaker app and user profile tests are also serialized as they reference a SageMaker domain resource and there is a low overall account limit to the number of domains.
ccbb508
to
36dfddc
Compare
LGTM 🚀 Thanks @DrFaust92! Verified Acceptance Tests in Commercial (us-west-2) ACCTEST_TIMEOUT=600m SAGEMAKER_IMAGE_VERSION_BASE_IMAGE=x.dkr.ecr.us-west-2.amazonaws.com/smtest make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSagemakerDomain_serial'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSagemakerDomain_serial -timeout 600m
=== RUN TestAccAWSSagemakerDomain_serial
=== RUN TestAccAWSSagemakerDomain_serial/Domain
=== RUN TestAccAWSSagemakerDomain_serial/Domain/sharingSettings
=== RUN TestAccAWSSagemakerDomain_serial/Domain/basic
=== RUN TestAccAWSSagemakerDomain_serial/Domain/tags
=== RUN TestAccAWSSagemakerDomain_serial/Domain/tensorboardAppSettings
=== RUN TestAccAWSSagemakerDomain_serial/Domain/tensorboardAppSettingsWithImage
=== RUN TestAccAWSSagemakerDomain_serial/Domain/kms
=== RUN TestAccAWSSagemakerDomain_serial/Domain/disappears
=== RUN TestAccAWSSagemakerDomain_serial/Domain/kernelGatewayAppSettings
=== RUN TestAccAWSSagemakerDomain_serial/Domain/kernelGatewayAppSettings_customImage
=== RUN TestAccAWSSagemakerDomain_serial/Domain/jupyterServerAppSettings
=== RUN TestAccAWSSagemakerDomain_serial/Domain/securityGroup
=== RUN TestAccAWSSagemakerDomain_serial/UserProfile
=== RUN TestAccAWSSagemakerDomain_serial/UserProfile/kernelGatewayAppSettings
=== RUN TestAccAWSSagemakerDomain_serial/UserProfile/jupyterServerAppSettings
=== RUN TestAccAWSSagemakerDomain_serial/UserProfile/basic
=== RUN TestAccAWSSagemakerDomain_serial/UserProfile/disappears
=== RUN TestAccAWSSagemakerDomain_serial/UserProfile/tags
=== RUN TestAccAWSSagemakerDomain_serial/UserProfile/tensorboardAppSettings
=== RUN TestAccAWSSagemakerDomain_serial/UserProfile/tensorboardAppSettingsWithImage
=== RUN TestAccAWSSagemakerDomain_serial/App
=== RUN TestAccAWSSagemakerDomain_serial/App/basic
=== RUN TestAccAWSSagemakerDomain_serial/App/disappears
=== RUN TestAccAWSSagemakerDomain_serial/App/tags
=== RUN TestAccAWSSagemakerDomain_serial/App/resourceSpec
--- PASS: TestAccAWSSagemakerDomain_serial (7755.79s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain (2413.67s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/sharingSettings (253.48s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/basic (178.50s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/tags (218.93s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/tensorboardAppSettings (310.72s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/tensorboardAppSettingsWithImage (249.84s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/kms (190.80s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/disappears (236.71s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/kernelGatewayAppSettings (191.01s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/kernelGatewayAppSettings_customImage (74.11s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/jupyterServerAppSettings (189.90s)
--- PASS: TestAccAWSSagemakerDomain_serial/Domain/securityGroup (319.67s)
--- PASS: TestAccAWSSagemakerDomain_serial/UserProfile (2218.77s)
--- PASS: TestAccAWSSagemakerDomain_serial/UserProfile/kernelGatewayAppSettings (266.94s)
--- PASS: TestAccAWSSagemakerDomain_serial/UserProfile/jupyterServerAppSettings (368.26s)
--- PASS: TestAccAWSSagemakerDomain_serial/UserProfile/basic (226.84s)
--- PASS: TestAccAWSSagemakerDomain_serial/UserProfile/disappears (437.79s)
--- PASS: TestAccAWSSagemakerDomain_serial/UserProfile/tags (369.45s)
--- PASS: TestAccAWSSagemakerDomain_serial/UserProfile/tensorboardAppSettings (272.96s)
--- PASS: TestAccAWSSagemakerDomain_serial/UserProfile/tensorboardAppSettingsWithImage (276.51s)
--- PASS: TestAccAWSSagemakerDomain_serial/App (3123.35s)
--- PASS: TestAccAWSSagemakerDomain_serial/App/basic (800.60s)
--- PASS: TestAccAWSSagemakerDomain_serial/App/disappears (788.74s)
--- PASS: TestAccAWSSagemakerDomain_serial/App/tags (800.01s)
--- PASS: TestAccAWSSagemakerDomain_serial/App/resourceSpec (734.00s)
PASS
Ok github.com/terraform-providers/terraform-provider-aws/aws 7759.179s |
This has been released in version 3.30.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
Closes #17402
Output from acceptance testing: