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

azurerm_app_configuration - retry checkNameAvailability to make sure delete is finished, add stateWait to confirm key/feature is created #21750

Merged
merged 12 commits into from
Jun 1, 2023

Conversation

teowa
Copy link
Contributor

@teowa teowa commented May 11, 2023

resolves #21939

TF_ACC=1 go test -v ./internal/services/appconfiguration -parallel 50 -test.run=TestAccAppConfiguration_softDeletePurgeThenRecreate -timeout 1440m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAppConfiguration_softDeletePurgeThenRecreate
=== PAUSE TestAccAppConfiguration_softDeletePurgeThenRecreate
=== CONT  TestAccAppConfiguration_softDeletePurgeThenRecreate
--- PASS: TestAccAppConfiguration_softDeletePurgeThenRecreate (556.89s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/appconfiguration      558.142s

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

------- Stdout: -------
=== RUN   TestAccAppConfiguration_softDeleteRecovery
=== PAUSE TestAccAppConfiguration_softDeleteRecovery
=== CONT  TestAccAppConfiguration_softDeleteRecovery
testcase.go:110: Step 4/5 error: Error running apply: exit status 1
Error: waiting for the Configuration Store Configuration Store (Subscription: "*******"
Resource Group Name: "acctestRG-appconfig-230511054705781851"
Configuration Store Name: "testaccappconf230511054705781851") Name Available: timeout while waiting for state to become 'Available' (last state: 'Unavailable', timeout: 29m59.517047832s)
with azurerm_app_configuration.test,
on terraform_plugin_test.tf line 22, in resource "azurerm_app_configuration" "test":
22: resource "azurerm_app_configuration" "test" {
--- FAIL: TestAccAppConfiguration_softDeleteRecovery (1892.83s)
FAIL

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

I'm getting a test failure:

------- Stdout: -------
=== RUN   TestAccAppConfigurationKey_basicVault
=== PAUSE TestAccAppConfigurationKey_basicVault
=== CONT  TestAccAppConfigurationKey_basicVault
    testcase.go:110: Step 1/2 error: Error running apply: exit status 1
        
        Error: Provider produced inconsistent result after apply
        
        When applying changes to azurerm_app_configuration_key.test, provider
        "provider[\"registry.terraform.io/hashicorp/azurerm\"]" produced an
        unexpected new value: Root resource was present, but now absent.
        
        This is a bug in the provider, which should be reported in the provider's own
        issue tracker.
--- FAIL: TestAccAppConfigurationKey_basicVault (409.06s)
FAIL

@katbyte
Copy link
Collaborator

katbyte commented May 24, 2023

still seeing test failures
image

@teowa teowa marked this pull request as draft May 24, 2023 08:54
@teowa
Copy link
Contributor Author

teowa commented May 24, 2023

Need to fix tests

@teowa teowa marked this pull request as ready for review May 29, 2023 06:14
@teowa
Copy link
Contributor Author

teowa commented May 29, 2023

image

@teowa teowa changed the title azurerm_app_configuration - retry checkNameAvailability to fix TestAccAppConfiguration_softDeletePurgeThenRecreate azurerm_app_configuration - retry checkNameAvailability to make sure delete is finished, add stateWait to confirm key/feature is created May 29, 2023
Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Can you please add a test for azurerm_app_configuration_feature and azurerm_app_configuration_key to validate that the wait functions after creation is actually needed?

@teowa
Copy link
Contributor Author

teowa commented May 31, 2023

Hi @stephybun, thanks for reviewing this. I think it is hard to validate wait function is needed, for the produced an unexpected new value: Root resource was present, but now absent error is not 100% reproducible. The wait function is added based on the error from test subscription and customer provided error message in #21939. I have also report the error to service team through Azure/AppConfiguration#763

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks @teowa LGTM 🌻

@stephybun stephybun merged commit fc43277 into hashicorp:main Jun 1, 2023
@github-actions github-actions bot added this to the v3.59.0 milestone Jun 1, 2023
stephybun added a commit that referenced this pull request Jun 1, 2023
Copy link

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 contributions.
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 May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azurerm_app_configuration_key - Error: Provider produced inconsistent result after apply
3 participants