k3s/test/integration/client
Jordan Liggitt fbd6f38084
collapse patch conflict retry onto GuaranteedUpdate
builds on #62868

1. When the incoming patch specified a resourceVersion that failed as a precondition,
the patch handler would retry uselessly 5 times. This PR collapses onto GuaranteedUpdate,
which immediately stops retrying in that case.

2. When the incoming patch did not specify a resourceVersion, and persisting to etcd
contended with other etcd updates, the retry would try to detect patch conflicts with
deltas from the first 'current object' retrieved from etcd and fail with a conflict error
in that case. Given that the user did not provide any information about the starting version
they expected their patch to apply to, this does not make sense, and results in arbitrary
conflict errors, depending on when the patch was submitted relative to other changes made
to the resource. This PR changes the patch application to be performed on the object retrieved
from etcd identically on every attempt.

fixes #58017
SMP is no longer computed for CRD objects

fixes #42644
No special state is retained on the first attempt, so the patch handler correctly handles
the cached storage optimistically trying with a cached object first
2018-04-25 21:55:13 -04:00
..
BUILD collapse patch conflict retry onto GuaranteedUpdate 2018-04-25 21:55:13 -04:00
client_test.go collapse patch conflict retry onto GuaranteedUpdate 2018-04-25 21:55:13 -04:00
dynamic_client_test.go add easy to use dynamic client 2018-04-25 08:55:26 -04:00
main_test.go use testmain in integration tests 2017-07-12 17:34:55 -07:00