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

Switch to ULID #2986

Merged
merged 1 commit into from
Dec 21, 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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ require (
github.com/golang-jwt/jwt/v5 v5.2.0
github.com/google/go-github/v57 v57.0.0
github.com/google/tink/go v1.7.0
github.com/google/uuid v1.5.0
github.com/gorilla/securecookie v1.1.2
github.com/jellydator/ttlcache/v3 v3.1.1
github.com/joho/godotenv v1.5.1
Expand Down Expand Up @@ -102,6 +101,7 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.2.0 // indirect
github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
Expand Down
4 changes: 2 additions & 2 deletions pipeline/frontend/yaml/compiler/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"path"
"strings"

"github.com/google/uuid"
"github.com/oklog/ulid/v2"

backend_types "go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types"
"go.woodpecker-ci.org/woodpecker/v2/pipeline/frontend/metadata"
Expand All @@ -31,7 +31,7 @@ import (

func (c *Compiler) createProcess(name string, container *yaml_types.Container, stepType backend_types.StepType) (*backend_types.Step, error) {
var (
uuid = uuid.New()
uuid = ulid.Make()

detached bool
workingdir string
Expand Down
4 changes: 2 additions & 2 deletions pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"sync"
"time"

"github.com/google/uuid"
"github.com/oklog/ulid/v2"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -74,7 +74,7 @@
r.Description = map[string]string{}
r.spec = spec
r.ctx = context.Background()
r.taskUUID = uuid.New().String()
r.taskUUID = ulid.Make().String()

Check warning on line 77 in pipeline/pipeline.go

View check run for this annotation

Codecov / codecov/patch

pipeline/pipeline.go#L77

Added line #L77 was not covered by tests
for _, opts := range opts {
opts(r)
}
Expand Down