Handle the upstream change on reconcile.go
@@ -163,9 +163,22 @@ func (g *AzureVirtualMachineExtensionClient) Delete(ctx context.Context, obj run
resourceGroup,
)
if err != nil {
- if !errhelp.IsAsynchronousOperationNotComplete(err) {
- return true, err
+ catch := []string{
+ errhelp.AsyncOpIncompleteError,
+ }
+ gone := []string{
+ errhelp.ResourceGroupNotFoundErrorCode,
+ errhelp.ParentNotFoundErrorCode,
+ errhelp.NotFoundErrorCode,
+ errhelp.ResourceNotFound,
}
+ azerr := errhelp.NewAzureErrorAzureError(err)
+ if helpers.ContainsString(catch, azerr.Type) {
+ return true, nil
+ } else if helpers.ContainsString(gone, azerr.Type) {
+ return false, nil
+ }
+ return true, err
}
if err == nil {
