Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use google/uuid #1215

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ require (
github.com/docker/go-units v0.5.0
github.com/golang/glog v1.1.1
github.com/golang/protobuf v1.5.3
github.com/google/uuid v1.3.0
github.com/moby/term v0.5.0
github.com/onsi/ginkgo/v2 v2.11.0
github.com/onsi/gomega v1.27.8
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/runc v1.1.7
github.com/opencontainers/selinux v1.11.0
github.com/pborman/uuid v1.2.1
github.com/sirupsen/logrus v1.9.3
github.com/urfave/cli/v2 v2.25.7
golang.org/x/net v0.12.0
Expand Down Expand Up @@ -54,7 +54,6 @@ require (
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand Down
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Expand Down Expand Up @@ -231,8 +230,6 @@ github.com/opencontainers/runc v1.1.7 h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/
github.com/opencontainers/runc v1.1.7/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50=
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw=
github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
Expand Down
22 changes: 2 additions & 20 deletions pkg/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ import (
"os"
"runtime"
"strings"
"sync"
"time"

"github.com/docker/distribution/reference"
"github.com/pborman/uuid"
"github.com/google/uuid"
"gopkg.in/yaml.v3"
internalapi "k8s.io/cri-api/pkg/apis"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
Expand All @@ -37,12 +36,6 @@ import (
)

var (
//lock for uuid
uuidLock sync.Mutex

// lastUUID record last generated uuid from NewUUID()
lastUUID uuid.UUID

// the callbacks to run during BeforeSuite
beforeSuiteCallbacks []func()

Expand Down Expand Up @@ -191,18 +184,7 @@ func ExpectNoError(err error, explain ...interface{}) {

// NewUUID creates a new UUID string.
func NewUUID() string {
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 result.String()
return uuid.New().String()
}

// RunDefaultPodSandbox runs a PodSandbox with default options.
Expand Down
10 changes: 0 additions & 10 deletions vendor/github.com/pborman/uuid/.travis.yml

This file was deleted.

10 changes: 0 additions & 10 deletions vendor/github.com/pborman/uuid/CONTRIBUTING.md

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/pborman/uuid/CONTRIBUTORS

This file was deleted.

27 changes: 0 additions & 27 deletions vendor/github.com/pborman/uuid/LICENSE

This file was deleted.

15 changes: 0 additions & 15 deletions vendor/github.com/pborman/uuid/README.md

This file was deleted.

84 changes: 0 additions & 84 deletions vendor/github.com/pborman/uuid/dce.go

This file was deleted.

13 changes: 0 additions & 13 deletions vendor/github.com/pborman/uuid/doc.go

This file was deleted.

53 changes: 0 additions & 53 deletions vendor/github.com/pborman/uuid/hash.go

This file was deleted.

85 changes: 0 additions & 85 deletions vendor/github.com/pborman/uuid/marshal.go

This file was deleted.

Loading
Loading