mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-03 06:08:42 +00:00
Switch to ULID (#2986)
Closes https://github.com/woodpecker-ci/woodpecker/discussions/2156
This commit is contained in:
parent
619858e0e9
commit
ce4f952b50
3 changed files with 5 additions and 5 deletions
2
go.mod
2
go.mod
|
@ -26,7 +26,6 @@ require (
|
||||||
github.com/golang-jwt/jwt/v5 v5.2.0
|
github.com/golang-jwt/jwt/v5 v5.2.0
|
||||||
github.com/google/go-github/v57 v57.0.0
|
github.com/google/go-github/v57 v57.0.0
|
||||||
github.com/google/tink/go v1.7.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/gorilla/securecookie v1.1.2
|
||||||
github.com/jellydator/ttlcache/v3 v3.1.1
|
github.com/jellydator/ttlcache/v3 v3.1.1
|
||||||
github.com/joho/godotenv v1.5.1
|
github.com/joho/godotenv v1.5.1
|
||||||
|
@ -102,6 +101,7 @@ require (
|
||||||
github.com/google/go-cmp v0.6.0 // indirect
|
github.com/google/go-cmp v0.6.0 // indirect
|
||||||
github.com/google/go-querystring v1.1.0 // indirect
|
github.com/google/go-querystring v1.1.0 // indirect
|
||||||
github.com/google/gofuzz v1.2.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-cleanhttp v0.5.2 // indirect
|
||||||
github.com/hashicorp/go-hclog v1.2.0 // indirect
|
github.com/hashicorp/go-hclog v1.2.0 // indirect
|
||||||
github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
|
github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
|
||||||
|
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/oklog/ulid/v2"
|
||||||
|
|
||||||
backend_types "go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types"
|
backend_types "go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types"
|
||||||
"go.woodpecker-ci.org/woodpecker/v2/pipeline/frontend/metadata"
|
"go.woodpecker-ci.org/woodpecker/v2/pipeline/frontend/metadata"
|
||||||
|
@ -31,7 +31,7 @@ import (
|
||||||
|
|
||||||
func (c *Compiler) createProcess(name string, container *yaml_types.Container, stepType backend_types.StepType) (*backend_types.Step, error) {
|
func (c *Compiler) createProcess(name string, container *yaml_types.Container, stepType backend_types.StepType) (*backend_types.Step, error) {
|
||||||
var (
|
var (
|
||||||
uuid = uuid.New()
|
uuid = ulid.Make()
|
||||||
|
|
||||||
detached bool
|
detached bool
|
||||||
workingdir string
|
workingdir string
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/oklog/ulid/v2"
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
|
@ -74,7 +74,7 @@ func New(spec *backend.Config, opts ...Option) *Runtime {
|
||||||
r.Description = map[string]string{}
|
r.Description = map[string]string{}
|
||||||
r.spec = spec
|
r.spec = spec
|
||||||
r.ctx = context.Background()
|
r.ctx = context.Background()
|
||||||
r.taskUUID = uuid.New().String()
|
r.taskUUID = ulid.Make().String()
|
||||||
for _, opts := range opts {
|
for _, opts := range opts {
|
||||||
opts(r)
|
opts(r)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue