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/sagemaker_feature_group - new resource #16728

Merged
merged 20 commits into from
Jan 18, 2021

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Dec 11, 2020

Community Note

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

Release note for CHANGELOG:

resource_aws_sagemaker_feature_group - add new resource

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSSagemakerFeatureGroup_'
--- PASS: TestAccAWSSagemakerFeatureGroup_disappears (49.09s)
--- PASS: TestAccAWSSagemakerFeatureGroup_description (54.42s)
--- PASS: TestAccAWSSagemakerFeatureGroup_multipleFeatures (60.96s)
--- PASS: TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig (63.50s)
--- PASS: TestAccAWSSagemakerFeatureGroup_basic (64.97s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog (84.52s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog (87.71s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_basic (93.84s)
--- PASS: TestAccAWSSagemakerFeatureGroup_tags (140.86s)

@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. service/sagemaker Issues and PRs that pertain to the sagemaker service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 11, 2020
@DrFaust92 DrFaust92 added the new-resource Introduces a new resource. label Dec 11, 2020
@DrFaust92 DrFaust92 changed the title R/sagemaker_feature_group - new resource r/sagemaker_feature_group - new resource Dec 11, 2020
@DrFaust92 DrFaust92 force-pushed the r/sagemaker_feature_group branch from 304346d to 9166424 Compare December 20, 2020 08:11
@DrFaust92 DrFaust92 marked this pull request as ready for review December 20, 2020 08:11
@DrFaust92 DrFaust92 requested a review from a team as a code owner December 20, 2020 08:11
@ghost ghost added the documentation Introduces or discusses updates to documentation. label Dec 20, 2020
@DrFaust92 DrFaust92 force-pushed the r/sagemaker_feature_group branch from 082a209 to 4737e39 Compare January 5, 2021 20:06
@ewbankkit ewbankkit self-assigned this Jan 5, 2021
@ewbankkit
Copy link
Contributor

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSagemakerFeatureGroup_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSagemakerFeatureGroup_ -timeout 120m
=== RUN   TestAccAWSSagemakerFeatureGroup_basic
=== PAUSE TestAccAWSSagemakerFeatureGroup_basic
=== RUN   TestAccAWSSagemakerFeatureGroup_description
=== PAUSE TestAccAWSSagemakerFeatureGroup_description
=== RUN   TestAccAWSSagemakerFeatureGroup_tags
=== PAUSE TestAccAWSSagemakerFeatureGroup_tags
=== RUN   TestAccAWSSagemakerFeatureGroup_multipleFeatures
=== PAUSE TestAccAWSSagemakerFeatureGroup_multipleFeatures
=== RUN   TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig
=== PAUSE TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig
=== RUN   TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== PAUSE TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== RUN   TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog
=== PAUSE TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog
=== RUN   TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog
=== PAUSE TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog
=== RUN   TestAccAWSSagemakerFeatureGroup_disappears
=== PAUSE TestAccAWSSagemakerFeatureGroup_disappears
=== CONT  TestAccAWSSagemakerFeatureGroup_basic
=== CONT  TestAccAWSSagemakerFeatureGroup_disappears
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== CONT  TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig
=== CONT  TestAccAWSSagemakerFeatureGroup_multipleFeatures
=== CONT  TestAccAWSSagemakerFeatureGroup_tags
=== CONT  TestAccAWSSagemakerFeatureGroup_description
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog
    resource_aws_sagemaker_feature_group_test.go:267: Step 1/2 error: Error running apply: 2021/01/05 17:18:52 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.12.0
        
        Error: error creating SageMaker Feature Group: ValidationException: The execution role ARN is invalid. Please ensure that the role exists and that its trust relationship policy allows the action 'sts:AssumeRole' for the service principal 'sagemaker.amazonaws.com'.
        	status code: 400, request id: 650c3e63-04f5-4cb8-8d3e-093e4006b4e6
        
        
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog
    resource_aws_sagemaker_feature_group_test.go:303: Step 1/2 error: Error running apply: 2021/01/05 17:18:51 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.12.0
        
        Error: error creating SageMaker Feature Group: ValidationException: The execution role ARN is invalid. Please ensure that the role exists and that its trust relationship policy allows the action 'sts:AssumeRole' for the service principal 'sagemaker.amazonaws.com'.
        	status code: 400, request id: 76c5898e-c8ab-4dce-86e5-6dba370577c0
        
        
--- FAIL: TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog (23.37s)
--- FAIL: TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog (24.20s)
--- PASS: TestAccAWSSagemakerFeatureGroup_multipleFeatures (41.02s)
--- PASS: TestAccAWSSagemakerFeatureGroup_description (41.53s)
--- PASS: TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig (55.38s)
--- PASS: TestAccAWSSagemakerFeatureGroup_disappears (58.55s)
--- PASS: TestAccAWSSagemakerFeatureGroup_tags (64.60s)
--- PASS: TestAccAWSSagemakerFeatureGroup_basic (65.25s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_basic (72.15s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	72.262s
FAIL
GNUmakefile:27: recipe for target 'testacc' failed
make: *** [testacc] Error 1

and then

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSagemakerFeatureGroup_offlineConfig_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSagemakerFeatureGroup_offlineConfig_basic -timeout 120m
=== RUN   TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== PAUSE TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
    resource_aws_sagemaker_feature_group_test.go:236: Step 1/2 error: Error running apply: 2021/01/05 17:30:48 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.12.0
        
        Error: error creating SageMaker Feature Group: ValidationException: The execution role ARN is invalid. Please ensure that the role exists and that its trust relationship policy allows the action 'sts:AssumeRole' for the service principal 'sagemaker.amazonaws.com'.
        	status code: 400, request id: c6aa741c-6c7e-4bde-96e8-e357f653dea8
        
        
--- FAIL: TestAccAWSSagemakerFeatureGroup_offlineConfig_basic (12.55s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	12.646s
FAIL
GNUmakefile:27: recipe for target 'testacc' failed
make: *** [testacc] Error 1

which passed in a previous run.
This suggests an IAM eventual consistency issue: #16752.

@DrFaust92 DrFaust92 force-pushed the r/sagemaker_feature_group branch from a57d783 to ddb3911 Compare January 8, 2021 18:30
@DrFaust92
Copy link
Collaborator Author

Added retry for IAM error mentioned above

Copy link
Contributor

@ewbankkit ewbankkit 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 TEST=./aws/ TESTARGS='-run=TestAccAWSSagemakerFeatureGroup_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSagemakerFeatureGroup_ -timeout 120m
=== RUN   TestAccAWSSagemakerFeatureGroup_basic
=== PAUSE TestAccAWSSagemakerFeatureGroup_basic
=== RUN   TestAccAWSSagemakerFeatureGroup_description
=== PAUSE TestAccAWSSagemakerFeatureGroup_description
=== RUN   TestAccAWSSagemakerFeatureGroup_tags
=== PAUSE TestAccAWSSagemakerFeatureGroup_tags
=== RUN   TestAccAWSSagemakerFeatureGroup_multipleFeatures
=== PAUSE TestAccAWSSagemakerFeatureGroup_multipleFeatures
=== RUN   TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig
=== PAUSE TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig
=== RUN   TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== PAUSE TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== RUN   TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog
=== PAUSE TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog
=== RUN   TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog
=== PAUSE TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog
=== RUN   TestAccAWSSagemakerFeatureGroup_disappears
=== PAUSE TestAccAWSSagemakerFeatureGroup_disappears
=== CONT  TestAccAWSSagemakerFeatureGroup_basic
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== CONT  TestAccAWSSagemakerFeatureGroup_disappears
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog
=== CONT  TestAccAWSSagemakerFeatureGroup_multipleFeatures
=== CONT  TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig
=== CONT  TestAccAWSSagemakerFeatureGroup_tags
=== CONT  TestAccAWSSagemakerFeatureGroup_description
--- PASS: TestAccAWSSagemakerFeatureGroup_disappears (39.49s)
--- PASS: TestAccAWSSagemakerFeatureGroup_multipleFeatures (49.82s)
--- PASS: TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig (50.46s)
--- PASS: TestAccAWSSagemakerFeatureGroup_description (56.64s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog (58.49s)
--- PASS: TestAccAWSSagemakerFeatureGroup_basic (58.53s)
--- PASS: TestAccAWSSagemakerFeatureGroup_tags (59.22s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_basic (68.68s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog (68.84s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	68.949s

@DrFaust92 DrFaust92 force-pushed the r/sagemaker_feature_group branch from 0c6fee1 to 3c94f11 Compare January 14, 2021 07:50
@DrFaust92
Copy link
Collaborator Author

Added retry for S3 access denied issue and descoped s3 test permissions:

--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog (99.63s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_basic (109.86s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog (121.75s)

@breathingdust
Copy link
Member

LGTM 🚀 Thanks @DrFaust92!

Verified Acceptance Tests in Commercial (us-west-2)

make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSagemakerFeatureGroup_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSagemakerFeatureGroup_ -timeout 120m
=== RUN   TestAccAWSSagemakerFeatureGroup_basic
=== PAUSE TestAccAWSSagemakerFeatureGroup_basic
=== RUN   TestAccAWSSagemakerFeatureGroup_description
=== PAUSE TestAccAWSSagemakerFeatureGroup_description
=== RUN   TestAccAWSSagemakerFeatureGroup_tags
=== PAUSE TestAccAWSSagemakerFeatureGroup_tags
=== RUN   TestAccAWSSagemakerFeatureGroup_multipleFeatures
=== PAUSE TestAccAWSSagemakerFeatureGroup_multipleFeatures
=== RUN   TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig
=== PAUSE TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig
=== RUN   TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== PAUSE TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== RUN   TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog
=== PAUSE TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog
=== RUN   TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog
=== PAUSE TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog
=== RUN   TestAccAWSSagemakerFeatureGroup_disappears
=== PAUSE TestAccAWSSagemakerFeatureGroup_disappears
=== CONT  TestAccAWSSagemakerFeatureGroup_basic
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_basic
=== CONT  TestAccAWSSagemakerFeatureGroup_tags
=== CONT  TestAccAWSSagemakerFeatureGroup_multipleFeatures
=== CONT  TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig
=== CONT  TestAccAWSSagemakerFeatureGroup_disappears
=== CONT  TestAccAWSSagemakerFeatureGroup_description
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog
=== CONT  TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog
--- PASS: TestAccAWSSagemakerFeatureGroup_multipleFeatures (34.67s)
--- PASS: TestAccAWSSagemakerFeatureGroup_basic (34.71s)
--- PASS: TestAccAWSSagemakerFeatureGroup_onlineConfigSecurityConfig (38.67s)
--- PASS: TestAccAWSSagemakerFeatureGroup_disappears (47.89s)
--- PASS: TestAccAWSSagemakerFeatureGroup_description (48.45s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_createCatalog (49.26s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_providedCatalog (52.14s)
--- PASS: TestAccAWSSagemakerFeatureGroup_offlineConfig_basic (63.03s)
--- PASS: TestAccAWSSagemakerFeatureGroup_tags (65.08s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	66.697s

Verified Acceptance Tests in GovCloud (us-gov-west-1)

As this resource covers a component of SageMaker Studio it is not available in GovCloud. The tests currently fail with the following. An issue to cover allowing these tests to skip will be created and linked back to this issue.

=== CONT  TestAccAWSSagemakerFeatureGroup_basic
    resource_aws_sagemaker_feature_group_test.go:66: Step 1/2 error: Error running apply: 2021/01/18 09:07:49 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.12.0

        Error: Error creating SageMaker Feature Group: UnknownOperationException: The requested operation is not supported in the called region.
        	status code: 400, request id: 24cef7ef-5040-484b-bdd5-829420ec9ea1


@breathingdust breathingdust merged commit 3f1d68e into hashicorp:master Jan 18, 2021
@github-actions github-actions bot added this to the v3.25.0 milestone Jan 18, 2021
breathingdust added a commit that referenced this pull request Jan 18, 2021
@ghost
Copy link

ghost commented Jan 22, 2021

This has been released in version 3.25.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!

@ghost
Copy link

ghost commented Feb 18, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 18, 2021
@DrFaust92 DrFaust92 deleted the r/sagemaker_feature_group branch April 15, 2021 10:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/sagemaker Issues and PRs that pertain to the sagemaker service. size/XXL 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.

3 participants