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 listTag condition to allow for failed sagemaker app #39976

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bruceadowns
Copy link
Contributor

@bruceadowns bruceadowns commented Oct 31, 2024

Description

Add a condition to the listing of tags for a SageMaker App. If a SageMaker App is in a failed state due to a startup failure (i.e. lifecycle script) terraform (and aws cli) is unable to list tags and the action will continue to fail until the app is manually cleaned up.

Here's the error that cannot be overcome:

│ Error: listing tags for SageMaker App (arn:aws:sagemaker:us-west-2:167806804118:app/d-feb4mgoibnna/default-user/jupyterserver/default): operation error SageMaker: ListTags, https response error StatusCode: 400, RequestID: b844e0b2-e840-434b-ba72-453449e7292e, api error ValidationException: UnknownError
│ 
│   with module.studio_domain[0].aws_sagemaker_app.user_default["sagemaker-amps-c-uw2-foo.default-user"],
│   on modules/studio/main.tf line 80, in resource "aws_sagemaker_app" "user_default":
│   80: resource "aws_sagemaker_app" "user_default" {

This occurs when the SageMaker App fails to startup, and is not cleared for 24h.

Relations

Closes #0000

References

Output from Acceptance Testing

$ make test
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running unit tests...
go1.23.2 test -count 1 ./...  -timeout=15m
?       github.com/hashicorp/terraform-provider-aws     [no test files]
?       github.com/hashicorp/terraform-provider-aws/internal/acctest/generate   [no test files]
...
ok      github.com/hashicorp/terraform-provider-aws/internal/verify     0.490s
ok      github.com/hashicorp/terraform-provider-aws/names       0.645s

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 provider Pertains to the provider itself, rather than any interaction with AWS. needs-triage Waiting for first response or review from a maintainer. labels Oct 31, 2024
@bruceadowns bruceadowns marked this pull request as ready for review October 31, 2024 23:14
@bruceadowns bruceadowns requested a review from a team as a code owner October 31, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Waiting for first response or review from a maintainer. provider Pertains to the provider itself, rather than any interaction with AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant