-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Update Go SDK to v55.3.0 #12263
Update Go SDK to v55.3.0 #12263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for this @magodo
response, err := client.Delete(ctx, targetId.ResourceGroup, targetId.Provider, targetId.ResourceType, targetId.Name) | ||
future, err := client.Delete(ctx, targetId.ResourceGroup, targetId.Provider, targetId.ResourceType, targetId.Name) | ||
if err != nil { | ||
// https://github.com/Azure/azure-rest-api-specs/issues/12308 the API report error even if delete was successful | ||
if utils.ResponseWasStatusCode(response, 202) { | ||
return nil | ||
} else { | ||
return fmt.Errorf("removing Server Vulnerability Assessment for %q: %+v\n", targetId.Id, err) | ||
} | ||
} else { | ||
return nil | ||
return fmt.Errorf("deleting Server Vulnerability Assessment %s: %v", targetId.Id, err) | ||
} | ||
if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { | ||
return fmt.Errorf("waiting for deletion of Server Vulnerability Assessment %s: %v", targetId.Id, err) | ||
} | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this future doesn't destroy correctly?
------- Stdout: -------
=== RUN TestAccServerVulnerabilityAssessment_basic
=== PAUSE TestAccServerVulnerabilityAssessment_basic
=== CONT TestAccServerVulnerabilityAssessment_basic
testing_new.go:21: WARNING: destroy failed, so remote objects may still exist and be subject to billing
testing_new.go:21: failed to destroy: exit status 1
Error: waiting for deletion of Server Vulnerability Assessment /subscriptions/*******/resourceGroups/acctestRG-sva-210618065036249376/providers/Microsoft.Compute/virtualMachines/acctestVM-210618065036249376: Future#WaitForCompletion: context has been cancelled: StatusCode=202 -- Original Error: context deadline exceeded
--- FAIL: TestAccServerVulnerabilityAssessment_basic (508.09s)
FAIL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out needs to extend the timeout value from 5min -> 10min (local run it takes ~7min).
Test
💤 TF_ACC=1 go test -timeout=3h -v ./azurerm/internal/services/securitycenter -run="TestAccServerVulnerabilityAssessment_basic"
2021/06/18 15:41:17 [DEBUG] not using binary driver name, it's no longer needed
2021/06/18 15:41:17 [DEBUG] not using binary driver name, it's no longer needed
=== RUN TestAccServerVulnerabilityAssessment_basic
=== PAUSE TestAccServerVulnerabilityAssessment_basic
=== CONT TestAccServerVulnerabilityAssessment_basic
--- PASS: TestAccServerVulnerabilityAssessment_basic (859.07s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/securitycenter 859.265s
@tombuildsstuff I've resolve the timeout issue above, please take another look. |
This functionality has been released in v2.65.0 of the Terraform 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! |
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. |
Update Go SDK to v55.3.0. Mainly in order to support trafficmanager 2018-08-01 new introduced resources.