mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Merge pull request #86354 from p0lyn0mial/improve-watch-and-report-e2e
improves watch and report e2e
This commit is contained in:
commit
810f0c2ae5
@ -64,7 +64,11 @@ var _ = SIGDescribe("client-go should negotiate", func() {
|
|||||||
// this is allowed
|
// this is allowed
|
||||||
case watch.Error:
|
case watch.Error:
|
||||||
err := errors.FromObject(evt.Object)
|
err := errors.FromObject(evt.Object)
|
||||||
if errors.IsGone(err) {
|
// In Kubernetes 1.17 and earlier, the api server returns both apierrs.StatusReasonExpired and
|
||||||
|
// apierrs.StatusReasonGone for HTTP 410 (Gone) status code responses. In 1.18 the kube server is more consistent
|
||||||
|
// and always returns apierrs.StatusReasonExpired. For backward compatibility we can only remove the apierrs.IsGone
|
||||||
|
// check when we fully drop support for Kubernetes 1.17 servers from reflectors.
|
||||||
|
if errors.IsGone(err) || errors.IsResourceExpired(err) {
|
||||||
// this is allowed, since the kubernetes object could be very old
|
// this is allowed, since the kubernetes object could be very old
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user