[bugfix] Fix aci_physical_domain resource deletion when the object is referenced by another object (DCNE-677)#1458
Conversation
001894d to
b3384ee
Compare
internal/provider/utils.go
Outdated
| } | ||
|
|
||
| if restResponse != nil && cont.Data() != nil && restResponse.StatusCode != 200 { | ||
| if restResponse != nil && cont.Data() != nil && restResponse.StatusCode >= 400 { |
There was a problem hiding this comment.
I think we should keep the != 200 here compared to go client to avoid changing something we are not aware of. This should not be the case but just in case. @samiib what is your take on this? In go client is was completely new code and here code is changed
There was a problem hiding this comment.
It is a little suspicious that we have already been treating any non-200 even other 2xx code as errors.
However, this is an existing check instead of a completely new conditional branch like before.
We can leave it as is and only add the errCode 107 check to fix the bug to be safe.
There was a problem hiding this comment.
Reverted the condition to original state.
internal/provider/utils.go
Outdated
| } | ||
|
|
||
| if restResponse != nil && cont.Data() != nil && restResponse.StatusCode != 200 { | ||
| if restResponse != nil && cont.Data() != nil && restResponse.StatusCode >= 400 { |
There was a problem hiding this comment.
It is a little suspicious that we have already been treating any non-200 even other 2xx code as errors.
However, this is an existing check instead of a completely new conditional branch like before.
We can leave it as is and only add the errCode 107 check to fix the bug to be safe.
| go 1.25.0 | ||
|
|
||
| toolchain go1.24.5 | ||
| toolchain go1.25.8 |
There was a problem hiding this comment.
Should the go version be modified as part of this PR?
There was a problem hiding this comment.
Resolved by the latest master.
b3384ee to
dcbd2e9
Compare
No description provided.