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

fix: typo r_studio_package_manager_url in sagemaker domain #38547

Conversation

felipempda
Copy link
Contributor

@felipempda felipempda commented Jul 25, 2024

Description

Attribute r_studio_package_manager_url in SageMaker domain shows up in Terraform plan but is not used on API calls to AWS due to a typo.

Relations

Closes #38546

References

In order to run this tests you'd need a license shared from Posit to your account: https://docs.aws.amazon.com/sagemaker/latest/dg/rstudio-license.html

Output from Acceptance Testing

Please see comments below.

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.

@terraform-aws-provider terraform-aws-provider bot added service/sagemaker Issues and PRs that pertain to the sagemaker service. size/XS Managed by automation to categorize the size of a PR. labels Jul 25, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @felipempda 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@felipempda
Copy link
Contributor Author

Output from Acceptance Testing

% make testacc TESTS=TestAccDomain_rStudioServerProDomainSettings 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='TestAccDomain_rStudioServerProDomainSettings'  -timeout 360m
=== RUN   TestAccDomain_rStudioServerProDomainSettings
--- PASS: TestAccDomain_rStudioServerProDomainSettings (389.88s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  390.147s

...

@felipempda
Copy link
Contributor Author

felipempda commented Jul 26, 2024

I couldn't run test if function name was lowercase:

make testacc TESTS=testAccDomain_rStudioServerProDomainSettings 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='testAccDomain_rStudioServerProDomainSettings'  -timeout 360m
testing: warning: no tests to run
PASS

Converting it now to lowercase and putting it inside Domain because of SageMaker limits. If you want to test the acceptance test, you would have to go back to previous commit: 914b99c.

I hope this is up to standards!

@felipempda felipempda marked this pull request as ready for review July 26, 2024 03:25
@felipempda felipempda requested a review from a team as a code owner July 26, 2024 03:25
@felipempda felipempda changed the title [WIP] fix: typo r_studio_package_manager_url in sagemaker domain fix: typo r_studio_package_manager_url in sagemaker domain Jul 26, 2024
@terraform-aws-provider terraform-aws-provider bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Jul 26, 2024
@deepakbshetty
Copy link
Contributor

deepakbshetty commented Jul 26, 2024

Some feedback
Would use actual package manager url for completeness https://packagemanager.posit.co/cran/latest

IMO you should use the existing base terraform code for test case and attach license manager inline policy. Do not create a new one.

@DrFaust92 if you want review this bug fix PR

@DrFaust92 DrFaust92 added the bug Addresses a defect in current functionality. label Jul 29, 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

@ewbankkit ewbankkit self-assigned this Aug 1, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 1, 2024
…gurationError: Domain-level App [arn:aws:sagemaker:us-west-2:...:app/d-bejfwx765inu/domain-shared/RStudioServerPro/default] failed to start: [ResourceNotFoundError: No available licenses were found. Validate that a license for RStudio Workbench exists in AWS License Manager that is in Active state.]'.
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 TESTARGS='-run=TestAccSageMaker_serial/^Domain$$/rStudioServer' 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=TestAccSageMaker_serial/^Domain$/rStudioServer -timeout 360m
=== RUN   TestAccSageMaker_serial
=== PAUSE TestAccSageMaker_serial
=== CONT  TestAccSageMaker_serial
=== RUN   TestAccSageMaker_serial/Domain
=== RUN   TestAccSageMaker_serial/Domain/rStudioServerProAppSettings
=== RUN   TestAccSageMaker_serial/Domain/rStudioServerProDomainSettings
    acctest.go:1624: skipping test for aws/us-west-2: Error running apply: exit status 1
        
        Error: creating SageMaker Domain (d-xaufbhd7ggt1): waiting for completion: unexpected state 'Failed', wanted target 'InService'. last error: ConfigurationError: Domain-level App [arn:aws:sagemaker:us-west-2:123456789012:app/d-xaufbhd7ggt1/domain-shared/RStudioServerPro/default] failed to start: [ResourceNotFoundError: No available licenses were found. Validate that a license for RStudio Workbench exists in AWS License Manager that is in Active state.].
        
          with aws_sagemaker_domain.test,
          on terraform_plugin_test.tf line 86, in resource "aws_sagemaker_domain" "test":
          86: resource "aws_sagemaker_domain" "test" {

--- PASS: TestAccSageMaker_serial (904.12s)
    --- PASS: TestAccSageMaker_serial/Domain (904.12s)
        --- PASS: TestAccSageMaker_serial/Domain/rStudioServerProAppSettings (270.94s)
        --- SKIP: TestAccSageMaker_serial/Domain/rStudioServerProDomainSettings (633.18s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker	909.188s

@ewbankkit
Copy link
Contributor

@felipempda Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit ac3df3f into hashicorp:main Aug 1, 2024
34 checks passed
@github-actions github-actions bot added this to the v5.61.0 milestone Aug 1, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 2, 2024
Copy link

github-actions bot commented Aug 2, 2024

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

Copy link

github-actions bot commented Sep 1, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/sagemaker Issues and PRs that pertain to the sagemaker service. size/M 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.

[Bug]: r_studio_package_manager_url missing in SageMaker domain API calls
4 participants