-
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
resource
- fix various tests
#27544
resource
- fix various tests
#27544
Conversation
mbfrahry
commented
Sep 30, 2024
•
edited by rcskosir
Loading
edited by rcskosir
- Bug Fix
- New Feature (ie adding a service, resource, or data source)
- Enhancement
- Breaking Change
@@ -195,6 +195,9 @@ func resourceResourceGroupDelete(d *pluginsdk.ResourceData, meta interface{}) er | |||
err = pluginsdk.Retry(10*time.Minute, func() *pluginsdk.RetryError { | |||
results, err := resourceClient.ListByResourceGroupComplete(ctx, id.ResourceGroup, "", "provisioningState", utils.Int32(500)) | |||
if err != nil { | |||
if strings.Contains(err.Error(), "could not be found") { |
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.
Error messages can change without us knowing, I wonder if we can check the response code of results
using response.WasNotFound(results.HttpResponse)
instead?
@@ -222,6 +226,9 @@ func resourceResourceGroupDelete(d *pluginsdk.ResourceData, meta interface{}) er | |||
|
|||
deleteFuture, err := client.Delete(ctx, id.ResourceGroup, "") | |||
if err != nil { | |||
if strings.Contains(err.Error(), "could not be found") { |
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.
Sorry should have left a comment here as well, could apply the same check on the Response here like we did above?
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.
Thanks @mbfrahry LGTM 🥟
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. |