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

Update Go SDK to v55.3.0 #12263

Merged
merged 2 commits into from
Jun 18, 2021
Merged

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented Jun 18, 2021

Update Go SDK to v55.3.0. Mainly in order to support trafficmanager 2018-08-01 new introduced resources.

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a 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

@tombuildsstuff tombuildsstuff added this to the v2.65.0 milestone Jun 18, 2021
Comment on lines -150 to +157
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
Copy link
Contributor

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

Copy link
Collaborator Author

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

@magodo
Copy link
Collaborator Author

magodo commented Jun 18, 2021

@tombuildsstuff I've resolve the timeout issue above, please take another look.

@tombuildsstuff tombuildsstuff merged commit f36a701 into hashicorp:master Jun 18, 2021
tombuildsstuff added a commit that referenced this pull request Jun 18, 2021
@github-actions
Copy link

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!

@github-actions
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 Jul 26, 2021
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.

2 participants