client-go, kubectl: Replace deprecated ErrWaitTimeout with recommended method (#132718)
* client-go: Replace depracted ErrWaitTimeout with recommended method * Fix UT and Integration tests * IT test Kubernetes-commit: ffe306d67958297202e9492ea644b42c0e7e694d
This commit is contained in:
parent
3cb662b4be
commit
98b4b33964
2
go.mod
2
go.mod
|
|
@ -32,7 +32,7 @@ require (
|
|||
k8s.io/api v0.0.0-20250724104226-1560b8c850a7
|
||||
k8s.io/apimachinery v0.0.0-20250723005633-58c4eb072ebf
|
||||
k8s.io/cli-runtime v0.0.0-20250717174531-64776d0a280f
|
||||
k8s.io/client-go v0.0.0-20250724144911-764374b3242b
|
||||
k8s.io/client-go v0.0.0-20250724145627-753cfe181182
|
||||
k8s.io/component-base v0.0.0-20250724065244-07ee182722a1
|
||||
k8s.io/component-helpers v0.0.0-20250717172249-5095859f5100
|
||||
k8s.io/klog/v2 v2.130.1
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -206,8 +206,8 @@ k8s.io/apimachinery v0.0.0-20250723005633-58c4eb072ebf h1:R1l0xAevbhH2Bg0iJuabo8
|
|||
k8s.io/apimachinery v0.0.0-20250723005633-58c4eb072ebf/go.mod h1:v1p1Jsze3IHLy5gU17yVqR2qLO7jgYeX6mw3HZy2AEU=
|
||||
k8s.io/cli-runtime v0.0.0-20250717174531-64776d0a280f h1:E/GB1lzzKbz3HPJ6Zu1bJYrey6oDAIAA+RMEozCpPpU=
|
||||
k8s.io/cli-runtime v0.0.0-20250717174531-64776d0a280f/go.mod h1:SybB6wdHGt8FXxaHyNQqsUAhWcZKIDPurWPB5mfFLD0=
|
||||
k8s.io/client-go v0.0.0-20250724144911-764374b3242b h1:7RltffV2NgCQA9jJNMHs2Xnn/vFTNHj+MFY34v6dg7w=
|
||||
k8s.io/client-go v0.0.0-20250724144911-764374b3242b/go.mod h1:cgK+6wG3u4eub4z04TjSa9Y2WD320ZageTzIr5+E5Cg=
|
||||
k8s.io/client-go v0.0.0-20250724145627-753cfe181182 h1:2qG4Yn/+Ac1EXnT3SJdCJchGPHcdFPXsAL6cGSQuoOM=
|
||||
k8s.io/client-go v0.0.0-20250724145627-753cfe181182/go.mod h1:cgK+6wG3u4eub4z04TjSa9Y2WD320ZageTzIr5+E5Cg=
|
||||
k8s.io/component-base v0.0.0-20250724065244-07ee182722a1 h1:OSPZY89+U2JKPaQnluxgzhsbY+L+gG/cxgYVFY5gYA0=
|
||||
k8s.io/component-base v0.0.0-20250724065244-07ee182722a1/go.mod h1:w6VkDvQYhgRcM0VZp+pAMPfhFPflGqAAik6tDGgIyq0=
|
||||
k8s.io/component-helpers v0.0.0-20250717172249-5095859f5100 h1:XEHmjwZgMNRuVgpqaRH/RR+n4BU0evfitU0RpWGPMUM=
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ func getObjAndCheckCondition(ctx context.Context, info *resource.Info, o *WaitOp
|
|||
return err
|
||||
})
|
||||
if err != nil {
|
||||
if errors.Is(err, wait.ErrWaitTimeout) { // nolint:staticcheck // SA1019
|
||||
if wait.Interrupted(err) { // nolint:staticcheck // SA1019
|
||||
return result, false, errWaitTimeoutWithName
|
||||
}
|
||||
return result, false, err
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ func IsDeleted(ctx context.Context, info *resource.Info, o *WaitOptions) (runtim
|
|||
return err
|
||||
})
|
||||
if err != nil {
|
||||
if errors.Is(err, wait.ErrWaitTimeout) { // nolint:staticcheck // SA1019
|
||||
if wait.Interrupted(err) { // nolint:staticcheck // SA1019
|
||||
return gottenObj, false, errWaitTimeoutWithName
|
||||
}
|
||||
return gottenObj, false, err
|
||||
|
|
|
|||
Loading…
Reference in New Issue