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

add managed_instance_scaling to sagemaker endpoint config production_variants #35479

Conversation

deepakbshetty
Copy link
Contributor

@deepakbshetty deepakbshetty commented Jan 25, 2024

Description

Add managed_instance_scaling to sagemaker endpoint config production_variants

Relations

Fixes #35011

References

Create Endpint Config API

Output from Acceptance Testing

$ make testacc TESTS=TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling PKG=sagemaker
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling'  -timeout 360m
=== RUN   TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling
=== PAUSE TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling
=== CONT  TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling
--- PASS: TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling (108.90s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  140.715s

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 size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/sagemaker Issues and PRs that pertain to the sagemaker service. labels Jan 25, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 25, 2024
@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_endpoint_config-managed_instance_scaling branch 2 times, most recently from 823a081 to 846d9eb Compare January 25, 2024 21:09
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 25, 2024
@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_endpoint_config-managed_instance_scaling branch 3 times, most recently from eb4db26 to b26025c Compare January 25, 2024 21:15
@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_endpoint_config-managed_instance_scaling branch from f8bebfa to 73bd1c7 Compare January 25, 2024 21:53
@deepakbshetty deepakbshetty reopened this Jan 25, 2024
Copy link
Collaborator

@DrFaust92 DrFaust92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DrFaust92
Copy link
Collaborator

deepakbshetty can you add changelog entry?

@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_endpoint_config-managed_instance_scaling branch from f49de2d to 6fa6b4e Compare July 20, 2024 18:57
@deepakbshetty deepakbshetty requested a review from a team as a code owner July 20, 2024 18:57
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

@deepakbshetty
Copy link
Contributor Author

Hi @DrFaust92 Changelog added and rebased.

Copy link
Collaborator

@DrFaust92 DrFaust92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing tests

@deepakbshetty
Copy link
Contributor Author

deepakbshetty commented Jul 20, 2024

Missing tests

I am struggling to find a jumpstart model that actually supports managed instance scaling. The model specified in original issue does not.
Any advice is appreciated

`endpoint_configuration_test.go:162: Step 1/3 error: Error running apply: exit status 1

Error: creating SageMaker Endpoint Configuration: ValidationException: ManagedInstanceScaling is not supported with the given EndpointConfig setup.
        status code: 400, request id: 32f1694c-6389-43f9-9bea-5245a1497bfd

  with aws_sagemaker_endpoint_configuration.test,
  on terraform_plugin_test.tf line 54, in resource "aws_sagemaker_endpoint_configuration" "test":
  54: resource "aws_sagemaker_endpoint_configuration" "test" {`

@DrFaust92
Copy link
Collaborator

deepakbshetty Thats tricky, ill see what i can find

@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_endpoint_config-managed_instance_scaling branch 2 times, most recently from ab13eae to 46b041b Compare August 3, 2024 01:19
@deepakbshetty
Copy link
Contributor Author

Hi @DrFaust92

Managed to add test now. All checks passing. Kindly review.

$ make testacc TESTS=TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling PKG=sagemaker
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling'  -timeout 360m
=== RUN   TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling
=== PAUSE TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling
=== CONT  TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling
--- PASS: TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling (108.90s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  140.715s

@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_endpoint_config-managed_instance_scaling branch from 46b041b to 2fbe7eb Compare August 31, 2024 13:30
@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_endpoint_config-managed_instance_scaling branch from 2fbe7eb to 9af49c7 Compare August 31, 2024 19:31
@ewbankkit ewbankkit self-assigned this Sep 9, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 9, 2024
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 🚀.

% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccSageMakerEndpointConfiguration_' PKG=sagemaker ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.0 test ./internal/service/sagemaker/... -v -count 1 -parallel 3  -run=TestAccSageMakerEndpointConfiguration_ -timeout 720m
=== RUN   TestAccSageMakerEndpointConfiguration_basic
=== PAUSE TestAccSageMakerEndpointConfiguration_basic
=== RUN   TestAccSageMakerEndpointConfiguration_nameGenerated
=== PAUSE TestAccSageMakerEndpointConfiguration_nameGenerated
=== RUN   TestAccSageMakerEndpointConfiguration_namePrefix
=== PAUSE TestAccSageMakerEndpointConfiguration_namePrefix
=== RUN   TestAccSageMakerEndpointConfiguration_shadowProductionVariants
=== PAUSE TestAccSageMakerEndpointConfiguration_shadowProductionVariants
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_routing
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_routing
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_ami
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_ami
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_serverlessProvisionedConcurrency
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_serverlessProvisionedConcurrency
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated
=== RUN   TestAccSageMakerEndpointConfiguration_kmsKeyID
=== PAUSE TestAccSageMakerEndpointConfiguration_kmsKeyID
=== RUN   TestAccSageMakerEndpointConfiguration_tags
=== PAUSE TestAccSageMakerEndpointConfiguration_tags
=== RUN   TestAccSageMakerEndpointConfiguration_dataCapture
=== PAUSE TestAccSageMakerEndpointConfiguration_dataCapture
=== RUN   TestAccSageMakerEndpointConfiguration_dataCapture_inputAndOutput
=== PAUSE TestAccSageMakerEndpointConfiguration_dataCapture_inputAndOutput
=== RUN   TestAccSageMakerEndpointConfiguration_disappears
=== PAUSE TestAccSageMakerEndpointConfiguration_disappears
=== RUN   TestAccSageMakerEndpointConfiguration_async
=== PAUSE TestAccSageMakerEndpointConfiguration_async
=== RUN   TestAccSageMakerEndpointConfiguration_async_includeInference
=== PAUSE TestAccSageMakerEndpointConfiguration_async_includeInference
=== RUN   TestAccSageMakerEndpointConfiguration_async_kms
=== PAUSE TestAccSageMakerEndpointConfiguration_async_kms
=== RUN   TestAccSageMakerEndpointConfiguration_Async_notif
=== PAUSE TestAccSageMakerEndpointConfiguration_Async_notif
=== RUN   TestAccSageMakerEndpointConfiguration_Async_client
=== PAUSE TestAccSageMakerEndpointConfiguration_Async_client
=== RUN   TestAccSageMakerEndpointConfiguration_Async_client_failurePath
=== PAUSE TestAccSageMakerEndpointConfiguration_Async_client_failurePath
=== RUN   TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess
=== PAUSE TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess
=== RUN   TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling
=== PAUSE TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling
=== CONT  TestAccSageMakerEndpointConfiguration_basic
=== CONT  TestAccSageMakerEndpointConfiguration_tags
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_ami
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_ami (24.16s)
=== CONT  TestAccSageMakerEndpointConfiguration_kmsKeyID
--- PASS: TestAccSageMakerEndpointConfiguration_basic (28.43s)
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated
--- PASS: TestAccSageMakerEndpointConfiguration_tags (38.36s)
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType
--- PASS: TestAccSageMakerEndpointConfiguration_kmsKeyID (19.32s)
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated (21.57s)
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_serverlessProvisionedConcurrency
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType (24.11s)
=== CONT  TestAccSageMakerEndpointConfiguration_async_kms
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight (21.35s)
=== CONT  TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_serverlessProvisionedConcurrency (19.70s)
=== CONT  TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess
--- PASS: TestAccSageMakerEndpointConfiguration_async_kms (26.76s)
=== CONT  TestAccSageMakerEndpointConfiguration_Async_client_failurePath
--- PASS: TestAccSageMakerEndpointConfiguration_productionVariantsManagedInstanceScaling (27.57s)
=== CONT  TestAccSageMakerEndpointConfiguration_Async_client
--- PASS: TestAccSageMakerEndpointConfiguration_Async_client_failurePath (20.67s)
=== CONT  TestAccSageMakerEndpointConfiguration_Async_notif
--- PASS: TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess (41.96s)
=== CONT  TestAccSageMakerEndpointConfiguration_disappears
--- PASS: TestAccSageMakerEndpointConfiguration_Async_client (22.47s)
=== CONT  TestAccSageMakerEndpointConfiguration_async_includeInference
--- PASS: TestAccSageMakerEndpointConfiguration_Async_notif (25.39s)
=== CONT  TestAccSageMakerEndpointConfiguration_async
--- PASS: TestAccSageMakerEndpointConfiguration_disappears (24.22s)
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless
--- PASS: TestAccSageMakerEndpointConfiguration_async_includeInference (22.23s)
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_routing
--- PASS: TestAccSageMakerEndpointConfiguration_async (21.01s)
=== CONT  TestAccSageMakerEndpointConfiguration_dataCapture_inputAndOutput
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless (21.18s)
=== CONT  TestAccSageMakerEndpointConfiguration_dataCapture
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_routing (21.69s)
=== CONT  TestAccSageMakerEndpointConfiguration_namePrefix
--- PASS: TestAccSageMakerEndpointConfiguration_dataCapture_inputAndOutput (22.28s)
=== CONT  TestAccSageMakerEndpointConfiguration_nameGenerated
--- PASS: TestAccSageMakerEndpointConfiguration_namePrefix (21.61s)
=== CONT  TestAccSageMakerEndpointConfiguration_shadowProductionVariants
--- PASS: TestAccSageMakerEndpointConfiguration_dataCapture (27.16s)
--- PASS: TestAccSageMakerEndpointConfiguration_nameGenerated (24.36s)
--- PASS: TestAccSageMakerEndpointConfiguration_shadowProductionVariants (24.81s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker	209.998s

@ewbankkit
Copy link
Contributor

@deepakbshetty Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 2eae23d into hashicorp:main Sep 9, 2024
40 checks passed
@github-actions github-actions bot added this to the v5.67.0 milestone Sep 9, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 13, 2024
Copy link

This functionality has been released in v5.67.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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/sagemaker Issues and PRs that pertain to the sagemaker service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: one to one mapping with sagemaker jumpstart model creation
4 participants