Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
83d467c2
Unverified
Commit
83d467c2
authored
Mar 22, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Mar 22, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #75270 from justincormack/uuid4
Use UUIDv4 not UUIDv1
parents
0118630a
0fb4b81c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
23 deletions
+23
-23
Godeps.json
...ing/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json
+4
-0
Godeps.json
staging/src/k8s.io/apimachinery/Godeps/Godeps.json
+4
-4
BUILD
staging/src/k8s.io/apimachinery/pkg/util/uuid/BUILD
+1
-1
uuid.go
staging/src/k8s.io/apimachinery/pkg/util/uuid/uuid.go
+2
-18
Godeps.json
staging/src/k8s.io/apiserver/Godeps/Godeps.json
+4
-0
Godeps.json
staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json
+4
-0
Godeps.json
staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json
+4
-0
No files found.
staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json
View file @
83d467c2
...
@@ -471,6 +471,10 @@
...
@@ -471,6 +471,10 @@
"Rev"
:
"24818f796faf91cd76ec7bddd72458fbced7a6c1"
"Rev"
:
"24818f796faf91cd76ec7bddd72458fbced7a6c1"
},
},
{
{
"ImportPath"
:
"github.com/google/uuid"
,
"Rev"
:
"8c31c18f31ede9fc8eae72290a7e7a8064e9b3e3"
},
{
"ImportPath"
:
"github.com/googleapis/gnostic/OpenAPIv2"
,
"ImportPath"
:
"github.com/googleapis/gnostic/OpenAPIv2"
,
"Rev"
:
"0c5108395e2debce0d731cf0287ddf7242066aba"
"Rev"
:
"0c5108395e2debce0d731cf0287ddf7242066aba"
},
},
...
...
staging/src/k8s.io/apimachinery/Godeps/Godeps.json
View file @
83d467c2
...
@@ -63,6 +63,10 @@
...
@@ -63,6 +63,10 @@
"Rev"
:
"24818f796faf91cd76ec7bddd72458fbced7a6c1"
"Rev"
:
"24818f796faf91cd76ec7bddd72458fbced7a6c1"
},
},
{
{
"ImportPath"
:
"github.com/google/uuid"
,
"Rev"
:
"8c31c18f31ede9fc8eae72290a7e7a8064e9b3e3"
},
{
"ImportPath"
:
"github.com/googleapis/gnostic/OpenAPIv2"
,
"ImportPath"
:
"github.com/googleapis/gnostic/OpenAPIv2"
,
"Rev"
:
"0c5108395e2debce0d731cf0287ddf7242066aba"
"Rev"
:
"0c5108395e2debce0d731cf0287ddf7242066aba"
},
},
...
@@ -99,10 +103,6 @@
...
@@ -99,10 +103,6 @@
"Rev"
:
"cca7078d478f8520f85629ad7c68962d31ed7682"
"Rev"
:
"cca7078d478f8520f85629ad7c68962d31ed7682"
},
},
{
{
"ImportPath"
:
"github.com/pborman/uuid"
,
"Rev"
:
"ca53cad383cad2479bbba7f7a1a05797ec1386e4"
},
{
"ImportPath"
:
"github.com/pmezard/go-difflib/difflib"
,
"ImportPath"
:
"github.com/pmezard/go-difflib/difflib"
,
"Rev"
:
"5d4384ee4fb2527b0a1256a821ebfc92f91efefc"
"Rev"
:
"5d4384ee4fb2527b0a1256a821ebfc92f91efefc"
},
},
...
...
staging/src/k8s.io/apimachinery/pkg/util/uuid/BUILD
View file @
83d467c2
...
@@ -12,7 +12,7 @@ go_library(
...
@@ -12,7 +12,7 @@ go_library(
importpath = "k8s.io/apimachinery/pkg/util/uuid",
importpath = "k8s.io/apimachinery/pkg/util/uuid",
deps = [
deps = [
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//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",
],
],
)
)
...
...
staging/src/k8s.io/apimachinery/pkg/util/uuid/uuid.go
View file @
83d467c2
...
@@ -17,27 +17,11 @@ limitations under the License.
...
@@ -17,27 +17,11 @@ limitations under the License.
package
uuid
package
uuid
import
(
import
(
"sync"
"github.com/google/uuid"
"github.com/pborman/uuid"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/types"
)
)
var
uuidLock
sync
.
Mutex
var
lastUUID
uuid
.
UUID
func
NewUUID
()
types
.
UID
{
func
NewUUID
()
types
.
UID
{
uuidLock
.
Lock
()
return
types
.
UID
(
uuid
.
New
()
.
String
())
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
())
}
}
staging/src/k8s.io/apiserver/Godeps/Godeps.json
View file @
83d467c2
...
@@ -451,6 +451,10 @@
...
@@ -451,6 +451,10 @@
"Rev"
:
"24818f796faf91cd76ec7bddd72458fbced7a6c1"
"Rev"
:
"24818f796faf91cd76ec7bddd72458fbced7a6c1"
},
},
{
{
"ImportPath"
:
"github.com/google/uuid"
,
"Rev"
:
"8c31c18f31ede9fc8eae72290a7e7a8064e9b3e3"
},
{
"ImportPath"
:
"github.com/googleapis/gnostic/OpenAPIv2"
,
"ImportPath"
:
"github.com/googleapis/gnostic/OpenAPIv2"
,
"Rev"
:
"0c5108395e2debce0d731cf0287ddf7242066aba"
"Rev"
:
"0c5108395e2debce0d731cf0287ddf7242066aba"
},
},
...
...
staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json
View file @
83d467c2
...
@@ -143,6 +143,10 @@
...
@@ -143,6 +143,10 @@
"Rev"
:
"24818f796faf91cd76ec7bddd72458fbced7a6c1"
"Rev"
:
"24818f796faf91cd76ec7bddd72458fbced7a6c1"
},
},
{
{
"ImportPath"
:
"github.com/google/uuid"
,
"Rev"
:
"8c31c18f31ede9fc8eae72290a7e7a8064e9b3e3"
},
{
"ImportPath"
:
"github.com/googleapis/gnostic/OpenAPIv2"
,
"ImportPath"
:
"github.com/googleapis/gnostic/OpenAPIv2"
,
"Rev"
:
"0c5108395e2debce0d731cf0287ddf7242066aba"
"Rev"
:
"0c5108395e2debce0d731cf0287ddf7242066aba"
},
},
...
...
staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json
View file @
83d467c2
...
@@ -135,6 +135,10 @@
...
@@ -135,6 +135,10 @@
"Rev"
:
"24818f796faf91cd76ec7bddd72458fbced7a6c1"
"Rev"
:
"24818f796faf91cd76ec7bddd72458fbced7a6c1"
},
},
{
{
"ImportPath"
:
"github.com/google/uuid"
,
"Rev"
:
"8c31c18f31ede9fc8eae72290a7e7a8064e9b3e3"
},
{
"ImportPath"
:
"github.com/googleapis/gnostic/OpenAPIv2"
,
"ImportPath"
:
"github.com/googleapis/gnostic/OpenAPIv2"
,
"Rev"
:
"0c5108395e2debce0d731cf0287ddf7242066aba"
"Rev"
:
"0c5108395e2debce0d731cf0287ddf7242066aba"
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment