diff --git a/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json index 8710414a8b0..d71230f9e25 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json @@ -470,6 +470,10 @@ "ImportPath": "github.com/google/gofuzz", "Rev": "24818f796faf91cd76ec7bddd72458fbced7a6c1" }, + { + "ImportPath": "github.com/google/uuid", + "Rev": "8c31c18f31ede9fc8eae72290a7e7a8064e9b3e3" + }, { "ImportPath": "github.com/googleapis/gnostic/OpenAPIv2", "Rev": "0c5108395e2debce0d731cf0287ddf7242066aba" diff --git a/staging/src/k8s.io/apimachinery/Godeps/Godeps.json b/staging/src/k8s.io/apimachinery/Godeps/Godeps.json index 2b02732f121..54dd4afe1ea 100644 --- a/staging/src/k8s.io/apimachinery/Godeps/Godeps.json +++ b/staging/src/k8s.io/apimachinery/Godeps/Godeps.json @@ -62,6 +62,10 @@ "ImportPath": "github.com/google/gofuzz", "Rev": "24818f796faf91cd76ec7bddd72458fbced7a6c1" }, + { + "ImportPath": "github.com/google/uuid", + "Rev": "8c31c18f31ede9fc8eae72290a7e7a8064e9b3e3" + }, { "ImportPath": "github.com/googleapis/gnostic/OpenAPIv2", "Rev": "0c5108395e2debce0d731cf0287ddf7242066aba" @@ -98,10 +102,6 @@ "ImportPath": "github.com/mxk/go-flowrate/flowrate", "Rev": "cca7078d478f8520f85629ad7c68962d31ed7682" }, - { - "ImportPath": "github.com/pborman/uuid", - "Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4" - }, { "ImportPath": "github.com/pmezard/go-difflib/difflib", "Rev": "5d4384ee4fb2527b0a1256a821ebfc92f91efefc" diff --git a/staging/src/k8s.io/apimachinery/pkg/util/uuid/BUILD b/staging/src/k8s.io/apimachinery/pkg/util/uuid/BUILD index 662d9f5d709..33dc2c8f1fb 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/uuid/BUILD +++ b/staging/src/k8s.io/apimachinery/pkg/util/uuid/BUILD @@ -12,7 +12,7 @@ go_library( importpath = "k8s.io/apimachinery/pkg/util/uuid", deps = [ "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/github.com/pborman/uuid:go_default_library", + "//vendor/github.com/google/uuid:go_default_library", ], ) diff --git a/staging/src/k8s.io/apimachinery/pkg/util/uuid/uuid.go b/staging/src/k8s.io/apimachinery/pkg/util/uuid/uuid.go index bf478223d99..1fa351aab60 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/uuid/uuid.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/uuid/uuid.go @@ -17,27 +17,11 @@ limitations under the License. package uuid import ( - "sync" - - "github.com/pborman/uuid" + "github.com/google/uuid" "k8s.io/apimachinery/pkg/types" ) -var uuidLock sync.Mutex -var lastUUID uuid.UUID - func NewUUID() types.UID { - uuidLock.Lock() - defer uuidLock.Unlock() - result := uuid.NewUUID() - // The UUID package is naive and can generate identical UUIDs if the - // time interval is quick enough. - // The UUID uses 100 ns increments so it's short enough to actively - // wait for a new value. - for uuid.Equal(lastUUID, result) == true { - result = uuid.NewUUID() - } - lastUUID = result - return types.UID(result.String()) + return types.UID(uuid.New().String()) } diff --git a/staging/src/k8s.io/apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiserver/Godeps/Godeps.json index d289bc14e25..fd63f773dd2 100644 --- a/staging/src/k8s.io/apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiserver/Godeps/Godeps.json @@ -450,6 +450,10 @@ "ImportPath": "github.com/google/gofuzz", "Rev": "24818f796faf91cd76ec7bddd72458fbced7a6c1" }, + { + "ImportPath": "github.com/google/uuid", + "Rev": "8c31c18f31ede9fc8eae72290a7e7a8064e9b3e3" + }, { "ImportPath": "github.com/googleapis/gnostic/OpenAPIv2", "Rev": "0c5108395e2debce0d731cf0287ddf7242066aba" diff --git a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json index be8d8987aef..19887200ad1 100644 --- a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json +++ b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json @@ -142,6 +142,10 @@ "ImportPath": "github.com/google/gofuzz", "Rev": "24818f796faf91cd76ec7bddd72458fbced7a6c1" }, + { + "ImportPath": "github.com/google/uuid", + "Rev": "8c31c18f31ede9fc8eae72290a7e7a8064e9b3e3" + }, { "ImportPath": "github.com/googleapis/gnostic/OpenAPIv2", "Rev": "0c5108395e2debce0d731cf0287ddf7242066aba" diff --git a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json index d6755129da3..80982c3f5c8 100644 --- a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json @@ -134,6 +134,10 @@ "ImportPath": "github.com/google/gofuzz", "Rev": "24818f796faf91cd76ec7bddd72458fbced7a6c1" }, + { + "ImportPath": "github.com/google/uuid", + "Rev": "8c31c18f31ede9fc8eae72290a7e7a8064e9b3e3" + }, { "ImportPath": "github.com/googleapis/gnostic/OpenAPIv2", "Rev": "0c5108395e2debce0d731cf0287ddf7242066aba"