Merge pull request #63014 from fisherxu/removerv

Automatic merge from submit-queue (batch tested with PRs 63046, 62925, 63014). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove repeated get resourceversion in update

**What this PR does / why we need it**:
Obj have no updated, so no need to reGet.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 4344d33772337fe2b54751dd1847f5bc0ac1f7af
This commit is contained in:
Kubernetes Publisher 2018-04-24 00:42:16 -07:00
commit a2264066a6
2 changed files with 87 additions and 91 deletions

168
Godeps/Godeps.json generated
View File

@ -812,339 +812,339 @@
}, },
{ {
"ImportPath": "k8s.io/api/admission/v1beta1", "ImportPath": "k8s.io/api/admission/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1", "ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/admissionregistration/v1beta1", "ImportPath": "k8s.io/api/admissionregistration/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1", "ImportPath": "k8s.io/api/apps/v1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1beta1", "ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1beta2", "ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/authentication/v1", "ImportPath": "k8s.io/api/authentication/v1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/authentication/v1beta1", "ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/authorization/v1", "ImportPath": "k8s.io/api/authorization/v1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/authorization/v1beta1", "ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v1", "ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta1", "ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v1beta1", "ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v2alpha1", "ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/certificates/v1beta1", "ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/core/v1", "ImportPath": "k8s.io/api/core/v1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/events/v1beta1", "ImportPath": "k8s.io/api/events/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/extensions/v1beta1", "ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/networking/v1", "ImportPath": "k8s.io/api/networking/v1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/policy/v1beta1", "ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1", "ImportPath": "k8s.io/api/rbac/v1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1alpha1", "ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1beta1", "ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/scheduling/v1alpha1", "ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/settings/v1alpha1", "ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1", "ImportPath": "k8s.io/api/storage/v1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1alpha1", "ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1beta1", "ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "1c973d529bdf4c4f349357ca665fb8e1d13e2d0d" "Rev": "6ef9db38b7d4d02a221e7af3e7f508ff19706fc6"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/equality", "ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/errors", "ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/meta", "ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/resource", "ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing", "ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip", "ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/validation", "ImportPath": "k8s.io/apimachinery/pkg/api/validation",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/validation/path", "ImportPath": "k8s.io/apimachinery/pkg/api/validation/path",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/validation", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/validation",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion", "ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/fields", "ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/labels", "ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime", "ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/selection", "ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/types", "ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/cache", "ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/clock", "ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/diff", "ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/errors", "ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/framer", "ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr", "ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/json", "ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/net", "ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/rand", "ImportPath": "k8s.io/apimachinery/pkg/util/rand",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime", "ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/sets", "ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/uuid", "ImportPath": "k8s.io/apimachinery/pkg/util/uuid",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation", "ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/wait", "ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/waitgroup", "ImportPath": "k8s.io/apimachinery/pkg/util/waitgroup",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml", "ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/version", "ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/watch", "ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "73aa818bbacf185a03468ddc170fb275763dec3d" "Rev": "f9ee2bbdc5f71288510bc540f02b2a2d7b1bbbe2"
}, },
{ {
"ImportPath": "k8s.io/client-go/discovery", "ImportPath": "k8s.io/client-go/discovery",

View File

@ -586,19 +586,15 @@ func (e *Store) Update(ctx genericapirequest.Context, name string, objInfo rest.
} else { } else {
// Check if the object's resource version matches the latest // Check if the object's resource version matches the latest
// resource version. // resource version.
newVersion, err := e.Storage.Versioner().ObjectResourceVersion(obj) if resourceVersion == 0 {
if err != nil {
return nil, nil, err
}
if newVersion == 0 {
// TODO: The Invalid error should have a field for Resource. // TODO: The Invalid error should have a field for Resource.
// After that field is added, we should fill the Resource and // After that field is added, we should fill the Resource and
// leave the Kind field empty. See the discussion in #18526. // leave the Kind field empty. See the discussion in #18526.
qualifiedKind := schema.GroupKind{Group: qualifiedResource.Group, Kind: qualifiedResource.Resource} qualifiedKind := schema.GroupKind{Group: qualifiedResource.Group, Kind: qualifiedResource.Resource}
fieldErrList := field.ErrorList{field.Invalid(field.NewPath("metadata").Child("resourceVersion"), newVersion, "must be specified for an update")} fieldErrList := field.ErrorList{field.Invalid(field.NewPath("metadata").Child("resourceVersion"), resourceVersion, "must be specified for an update")}
return nil, nil, kubeerr.NewInvalid(qualifiedKind, name, fieldErrList) return nil, nil, kubeerr.NewInvalid(qualifiedKind, name, fieldErrList)
} }
if newVersion != version { if resourceVersion != version {
return nil, nil, kubeerr.NewConflict(qualifiedResource, name, fmt.Errorf(OptimisticLockErrorMsg)) return nil, nil, kubeerr.NewConflict(qualifiedResource, name, fmt.Errorf(OptimisticLockErrorMsg))
} }
} }