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

service/workspaces: acctests/sweepers return error when resource not found #15190

Closed
gdavison opened this issue Sep 16, 2020 · 3 comments · Fixed by #15705
Closed

service/workspaces: acctests/sweepers return error when resource not found #15190

gdavison opened this issue Sep 16, 2020 · 3 comments · Fixed by #15705
Assignees
Labels
service/workspaces Issues and PRs that pertain to the workspaces service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@gdavison
Copy link
Contributor

gdavison commented Sep 16, 2020

Affected AccTests:

  • TestAccAwsWorkspacesWorkspace_basic
  • TestAccAwsWorkspacesWorkspace_tags

Affected Sweepers

  • aws_workspaces_workspace
  • aws_workspaces_directory

Expected Behavior

The acctests/sweepers should not return an error, since we are waiting for the absence of the resource.

Actual Behavior

The acctest/sweeper returns the error workspace "ws-g7mcyy6c6" was not terminated: couldn't find resource (21 retries).

How to Fix

When waiting for a resource to be removed, WaitForState() should have an empty Target, and the state function should return nil, "", nil

@ghost ghost added the service/workspaces Issues and PRs that pertain to the workspaces service. label Sep 16, 2020
@gdavison gdavison self-assigned this Sep 16, 2020
@gdavison gdavison added technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Sep 16, 2020
@bflad
Copy link
Contributor

bflad commented Sep 16, 2020

FYI this effects the testing as well:

=== CONT  TestAccAwsWorkspacesWorkspace_basic
TestAccAwsWorkspacesWorkspace_basic: testing_new.go:22: WARNING: destroy failed, so remote objects may still exist and be subject to billing
TestAccAwsWorkspacesWorkspace_basic: testing_new.go:22: failed to destroy: terraform failed: exit status 1
stderr:
Error: workspace "ws-g28127fnr" was not terminated: couldn't find resource (21 retries)
--- FAIL: TestAccAwsWorkspacesWorkspace_basic (1544.62s)

=== CONT  TestAccAwsWorkspacesWorkspace_tags
TestAccAwsWorkspacesWorkspace_tags: testing_new.go:22: WARNING: destroy failed, so remote objects may still exist and be subject to billing
TestAccAwsWorkspacesWorkspace_tags: testing_new.go:22: failed to destroy: terraform failed: exit status 1
stderr:
Error: workspace "ws-bzvj5njdh" was not terminated: couldn't find resource (21 retries)
--- FAIL: TestAccAwsWorkspacesWorkspace_tags (1672.55s)

@anGie44 anGie44 changed the title Sweepers: aws_workspaces_* sweepers return error when resource not found tests/service/aws_workspaces: acctests/sweepers return error when resource not found Sep 24, 2020
@anGie44 anGie44 added this to the Roadmap milestone Sep 24, 2020
@anGie44 anGie44 changed the title tests/service/aws_workspaces: acctests/sweepers return error when resource not found service/workspaces: acctests/sweepers return error when resource not found Sep 24, 2020
@breathingdust breathingdust modified the milestones: Roadmap, v3.12.0 Oct 22, 2020
@ghost
Copy link

ghost commented Oct 22, 2020

This has been released in version 3.12.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 Nov 21, 2020

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 Nov 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/workspaces Issues and PRs that pertain to the workspaces service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
4 participants