From 3a1b75cf1e26d86c5a82d7d63c8534a484f9b946 Mon Sep 17 00:00:00 2001 From: "pieter.noordhuis" Date: Tue, 20 Oct 2026 09:21:51 +0000 Subject: [PATCH 1/2] Use stdlib uuid package instead of github.com/google/uuid Go 1.27 adds a uuid package to the standard library. Its New, Parse, String and text/JSON encoding behave the same as google/uuid for the forms the CLI produces and accepts, so existing deployment state and lock files decode unchanged. Parse is stricter than google/uuid: it rejects an upper- or mixed-case "urn:uuid:" prefix and any 38-character form not wrapped in braces (google/uuid accepts e.g. "(...)" or "[...]"). Error text also differs. google/uuid remains an indirect dependency via the SDK and others. Co-authored-by: Isaac --- acceptance/acceptance_test.go | 3 +-- acceptance/dbr_test.go | 2 +- acceptance/internal/prepare_server.go | 4 ++-- acceptance/subset_test.go | 5 ++--- bundle/bundle.go | 2 +- bundle/deploy/state.go | 2 +- bundle/deploy/state_update.go | 4 ++-- bundle/deploy/state_update_test.go | 4 ++-- bundle/direct/dresources/job_run.go | 6 +++--- bundle/direct/dstate/state.go | 2 +- cmd/air/runlaunch.go | 4 ++-- cmd/air/runsubmit.go | 4 ++-- cmd/pipelines/history.go | 2 +- cmd/psql/psql_provisioned.go | 4 ++-- experimental/postgres/cmd/internal/target/provisioned.go | 4 ++-- experimental/ssh/internal/proxy/proxy.go | 4 ++-- go.mod | 2 +- integration/libs/telemetry/telemetry_test.go | 2 +- internal/testutil/helpers.go | 2 +- libs/apps/runlocal/headers.go | 3 ++- libs/auth/storage/keyring.go | 6 +++--- libs/cmdctx/context.go | 3 +-- libs/cmdctx/context_test.go | 5 +++-- libs/iamutil/service_principal.go | 3 ++- libs/locker/locker.go | 2 +- libs/telemetry/logger.go | 2 +- libs/template/helpers.go | 5 ++--- libs/testserver/fake_workspace.go | 5 ++--- 28 files changed, 47 insertions(+), 49 deletions(-) diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index c8c891a1090..b5f7eec71a5 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -25,8 +25,7 @@ import ( "testing" "time" "unicode/utf8" - - "github.com/google/uuid" + "uuid" "github.com/databricks/cli/acceptance/internal" "github.com/databricks/cli/acceptance/internal/selection" diff --git a/acceptance/dbr_test.go b/acceptance/dbr_test.go index 7d182f971a8..28a9ce2aca5 100644 --- a/acceptance/dbr_test.go +++ b/acceptance/dbr_test.go @@ -9,6 +9,7 @@ import ( "path/filepath" "testing" "time" + "uuid" "github.com/databricks/cli/internal/testarchive" "github.com/databricks/cli/libs/filer" @@ -17,7 +18,6 @@ import ( "github.com/databricks/databricks-sdk-go/service/iam" "github.com/databricks/databricks-sdk-go/service/jobs" "github.com/databricks/databricks-sdk-go/service/workspace" - "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/acceptance/internal/prepare_server.go b/acceptance/internal/prepare_server.go index 6d32556bbe0..3890aa52d5a 100644 --- a/acceptance/internal/prepare_server.go +++ b/acceptance/internal/prepare_server.go @@ -18,6 +18,7 @@ import ( "testing" "time" "unicode/utf8" + "uuid" "github.com/databricks/cli/libs/auth" "github.com/databricks/cli/libs/env" @@ -27,7 +28,6 @@ import ( "github.com/databricks/databricks-sdk-go" sdkconfig "github.com/databricks/databricks-sdk-go/config" "github.com/databricks/databricks-sdk-go/service/iam" - "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -99,7 +99,7 @@ func PrepareServerAndClient(t *testing.T, config TestConfig, logRequests bool, o // Use a unique token for each test. This allows us to maintain // separate state for each test in fake workspaces. - tokenSuffix := strings.ReplaceAll(uuid.NewString(), "-", "") + tokenSuffix := strings.ReplaceAll(uuid.New().String(), "-", "") var token string var testUser iam.User diff --git a/acceptance/subset_test.go b/acceptance/subset_test.go index c85adb0b086..b996f87cf13 100644 --- a/acceptance/subset_test.go +++ b/acceptance/subset_test.go @@ -6,8 +6,7 @@ import ( "strconv" "strings" "testing" - - "github.com/google/uuid" + "uuid" "github.com/databricks/cli/acceptance/internal/selection" ) @@ -66,7 +65,7 @@ func newSubsetSelector(t *testing.T, overwrite, forcerun bool) subsetSelector { seed := os.Getenv(SubsetSeedEnvVar) if seed == "" { // Reproduce this run's subset by re-running with the logged seed. - seed = uuid.NewString() + seed = uuid.New().String() t.Logf("%s not set, using random seed %q", SubsetSeedEnvVar, seed) } diff --git a/bundle/bundle.go b/bundle/bundle.go index 68654bead7c..6c80882134a 100644 --- a/bundle/bundle.go +++ b/bundle/bundle.go @@ -13,6 +13,7 @@ import ( "path/filepath" "sync" "time" + "uuid" "github.com/databricks/cli/bundle/config" "github.com/databricks/cli/bundle/config/engine" @@ -31,7 +32,6 @@ import ( "github.com/databricks/cli/libs/telemetry/protos" "github.com/databricks/cli/libs/vfs" "github.com/databricks/databricks-sdk-go" - "github.com/google/uuid" ) const internalFolder = ".internal" diff --git a/bundle/deploy/state.go b/bundle/deploy/state.go index 5d99748fb71..13b04e0dc36 100644 --- a/bundle/deploy/state.go +++ b/bundle/deploy/state.go @@ -9,11 +9,11 @@ import ( "io/fs" "path/filepath" "time" + "uuid" "github.com/databricks/cli/bundle" "github.com/databricks/cli/libs/fileset" "github.com/databricks/cli/libs/vfs" - "github.com/google/uuid" ) const ( diff --git a/bundle/deploy/state_update.go b/bundle/deploy/state_update.go index fe68a6e519b..eeecc7b8cdb 100644 --- a/bundle/deploy/state_update.go +++ b/bundle/deploy/state_update.go @@ -7,13 +7,13 @@ import ( "io/fs" "os" "time" + "uuid" "github.com/databricks/cli/bundle" "github.com/databricks/cli/internal/build" "github.com/databricks/cli/libs/atomicfile" "github.com/databricks/cli/libs/diag" "github.com/databricks/cli/libs/log" - "github.com/google/uuid" ) type stateUpdate struct{} @@ -46,7 +46,7 @@ func (s *stateUpdate) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnost state.Files = fl // Generate a UUID for the deployment, if one does not already exist - if state.ID == uuid.Nil { + if state.ID == uuid.Nil() { state.ID = uuid.New() } b.Metrics.DeploymentId = state.ID diff --git a/bundle/deploy/state_update_test.go b/bundle/deploy/state_update_test.go index d4b24d85b33..c43e547d8bb 100644 --- a/bundle/deploy/state_update_test.go +++ b/bundle/deploy/state_update_test.go @@ -4,6 +4,7 @@ import ( "encoding/json" "os" "testing" + "uuid" "github.com/databricks/cli/bundle" "github.com/databricks/cli/bundle/config" @@ -12,7 +13,6 @@ import ( "github.com/databricks/cli/libs/fileset" "github.com/databricks/cli/libs/vfs" "github.com/databricks/databricks-sdk-go/service/iam" - "github.com/google/uuid" "github.com/stretchr/testify/require" ) @@ -90,7 +90,7 @@ func TestStateUpdate(t *testing.T) { require.Equal(t, build.GetInfo().Version, state.CliVersion) // Valid non-empty UUID is generated. - require.NotEqual(t, uuid.Nil, state.ID) + require.NotEqual(t, uuid.Nil(), state.ID) } func TestStateUpdateWithExistingState(t *testing.T) { diff --git a/bundle/direct/dresources/job_run.go b/bundle/direct/dresources/job_run.go index ae38dcacdbc..74e5a50dfa5 100644 --- a/bundle/direct/dresources/job_run.go +++ b/bundle/direct/dresources/job_run.go @@ -9,6 +9,7 @@ import ( "strconv" "strings" "time" + "uuid" "github.com/databricks/cli/bundle/config/resources" "github.com/databricks/cli/bundle/deployplan" @@ -20,7 +21,6 @@ import ( "github.com/databricks/databricks-sdk-go/marshal" "github.com/databricks/databricks-sdk-go/retries" "github.com/databricks/databricks-sdk-go/service/jobs" - "github.com/google/uuid" ) // jobRunTimeout matches the timeout `bundle run` allows a run (bundle/run/job.go). @@ -98,7 +98,7 @@ func (*ResourceJobRun) PrepareState(input *resources.JobRun) *JobRunState { ts = *input.Lifecycle.TriggersState } if input.HasOnBundleDeploy() { - ts.OnBundleDeploy = uuid.NewString() + ts.OnBundleDeploy = uuid.New().String() } if !ts.IsEmpty() { state.Lifecycle = &JobRunLifecycleState{TriggersState: &ts} @@ -188,7 +188,7 @@ func (r *ResourceJobRun) DoCreate(ctx context.Context, config *JobRunState) (str // Mint a token so an SDK retry of a lost response returns the same run. Set it // on a copy: recording it in state would drift from the empty config and recreate. req := config.RunNow - req.IdempotencyToken = uuid.NewString() + req.IdempotencyToken = uuid.New().String() // RunNow returns only the new run id, so we return a nil remote and let the // framework read it back via DoRead. wait, err := r.client.Jobs.RunNow(ctx, req) diff --git a/bundle/direct/dstate/state.go b/bundle/direct/dstate/state.go index ac8f8226c4b..b117b8543f5 100644 --- a/bundle/direct/dstate/state.go +++ b/bundle/direct/dstate/state.go @@ -14,6 +14,7 @@ import ( "slices" "strings" "sync" + "uuid" "github.com/databricks/cli/bundle/config" "github.com/databricks/cli/bundle/deployplan" @@ -24,7 +25,6 @@ import ( "github.com/databricks/cli/libs/dms" "github.com/databricks/cli/libs/log" "github.com/databricks/databricks-sdk-go/service/bundledeployments" - "github.com/google/uuid" ) const ( diff --git a/cmd/air/runlaunch.go b/cmd/air/runlaunch.go index c914a949216..5566ec98ca5 100644 --- a/cmd/air/runlaunch.go +++ b/cmd/air/runlaunch.go @@ -6,13 +6,13 @@ import ( "fmt" "path" "strings" + "uuid" "github.com/databricks/cli/libs/env" "github.com/databricks/databricks-sdk-go" "github.com/databricks/databricks-sdk-go/apierr" "github.com/databricks/databricks-sdk-go/service/iam" "github.com/databricks/databricks-sdk-go/service/workspace" - "github.com/google/uuid" ) // userWorkspaceDirEnv overrides the per-user workspace directory; mirrors the @@ -53,7 +53,7 @@ func cliLaunchDir(base, experiment, run string) string { if run == "" { run = experiment } - unique := strings.ReplaceAll(uuid.NewString(), "-", "")[:16] + unique := strings.ReplaceAll(uuid.New().String(), "-", "")[:16] return path.Join(base, ".air", "cli_launch", experiment, run+"_"+unique) } diff --git a/cmd/air/runsubmit.go b/cmd/air/runsubmit.go index dfc847fcb52..d1e94e068dc 100644 --- a/cmd/air/runsubmit.go +++ b/cmd/air/runsubmit.go @@ -11,6 +11,7 @@ import ( "strconv" "strings" "time" + "uuid" "github.com/databricks/cli/libs/auth" "github.com/databricks/cli/libs/cmdio" @@ -20,7 +21,6 @@ import ( "github.com/databricks/databricks-sdk-go/client" "github.com/databricks/databricks-sdk-go/service/compute" "github.com/databricks/databricks-sdk-go/service/jobs" - "github.com/google/uuid" "golang.org/x/sync/errgroup" ) @@ -275,7 +275,7 @@ func effectiveIdempotencyToken(flag string, cfg *runConfig) string { token = *cfg.IdempotencyToken } if token == "" { - token = uuid.NewString() + token = uuid.New().String() } return token } diff --git a/cmd/pipelines/history.go b/cmd/pipelines/history.go index a5fc42a4f61..84297cf0fdd 100644 --- a/cmd/pipelines/history.go +++ b/cmd/pipelines/history.go @@ -2,6 +2,7 @@ package pipelines import ( "fmt" + "uuid" "github.com/databricks/cli/cmd/bundle/utils" "github.com/databricks/cli/cmd/root" @@ -10,7 +11,6 @@ import ( "github.com/databricks/cli/libs/cmdio" databricks "github.com/databricks/databricks-sdk-go" "github.com/databricks/databricks-sdk-go/service/pipelines" - "github.com/google/uuid" "github.com/spf13/cobra" ) diff --git a/cmd/psql/psql_provisioned.go b/cmd/psql/psql_provisioned.go index b66f17d1508..272dfd7d687 100644 --- a/cmd/psql/psql_provisioned.go +++ b/cmd/psql/psql_provisioned.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "uuid" "github.com/databricks/cli/libs/cmdctx" "github.com/databricks/cli/libs/cmdio" @@ -11,7 +12,6 @@ import ( "github.com/databricks/databricks-sdk-go" "github.com/databricks/databricks-sdk-go/service/database" "github.com/databricks/databricks-sdk-go/service/iam" - "github.com/google/uuid" ) // provisionedDefaultDatabase is the default database for Lakebase Provisioned instances. @@ -42,7 +42,7 @@ func connectProvisioned(ctx context.Context, instanceName string, retryConfig li cred, err := w.Database.GenerateDatabaseCredential(ctx, database.GenerateDatabaseCredentialRequest{ InstanceNames: []string{instance.Name}, - RequestId: uuid.NewString(), + RequestId: uuid.New().String(), }) if err != nil { return fmt.Errorf("failed to get database credentials: %w", err) diff --git a/experimental/postgres/cmd/internal/target/provisioned.go b/experimental/postgres/cmd/internal/target/provisioned.go index 786e86d2886..788f332337e 100644 --- a/experimental/postgres/cmd/internal/target/provisioned.go +++ b/experimental/postgres/cmd/internal/target/provisioned.go @@ -3,10 +3,10 @@ package target import ( "context" "fmt" + "uuid" "github.com/databricks/databricks-sdk-go" "github.com/databricks/databricks-sdk-go/service/database" - "github.com/google/uuid" ) // GetProvisioned fetches a single provisioned instance by name. @@ -28,7 +28,7 @@ func GetProvisioned(ctx context.Context, w *databricks.WorkspaceClient, name str func ProvisionedCredential(ctx context.Context, w *databricks.WorkspaceClient, instanceName string) (string, error) { cred, err := w.Database.GenerateDatabaseCredential(ctx, database.GenerateDatabaseCredentialRequest{ InstanceNames: []string{instanceName}, - RequestId: uuid.NewString(), + RequestId: uuid.New().String(), }) if err != nil { return "", fmt.Errorf("failed to get database credentials: %w", err) diff --git a/experimental/ssh/internal/proxy/proxy.go b/experimental/ssh/internal/proxy/proxy.go index 88cee6eff3a..91f9e5ae2b5 100644 --- a/experimental/ssh/internal/proxy/proxy.go +++ b/experimental/ssh/internal/proxy/proxy.go @@ -12,9 +12,9 @@ import ( "sync" "sync/atomic" "time" + "uuid" "github.com/databricks/cli/libs/log" - "github.com/google/uuid" "github.com/gorilla/websocket" "golang.org/x/sync/errgroup" ) @@ -247,7 +247,7 @@ type createWebsocketConnectionFunc func(ctx context.Context, req DialRequest) (* func newProxyConnection(createConn createWebsocketConnectionFunc) *proxyConnection { return &proxyConnection{ - connID: uuid.NewString(), + connID: uuid.New().String(), createWebsocketConnection: createConn, ready: make(chan struct{}), } diff --git a/go.mod b/go.mod index cbb4239d981..fbb1d181daf 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,6 @@ require ( github.com/databricks/sdk-go/files v0.1.0 // Apache-2.0 github.com/databricks/sdk-go/options v0.1.0 // Apache-2.0 github.com/google/jsonschema-go v0.4.3 // MIT - github.com/google/uuid v1.6.0 // BSD-3-Clause github.com/gorilla/websocket v1.5.3 // BSD-2-Clause github.com/hexops/gotextdiff v1.0.3 // BSD-3-Clause github.com/jackc/pgx/v5 v5.11.0 // MIT @@ -70,6 +69,7 @@ require ( github.com/godbus/dbus/v5 v5.2.2 // indirect github.com/google/go-querystring v1.2.0 // indirect github.com/google/s2a-go v0.1.9 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.11 // indirect github.com/googleapis/gax-go/v2 v2.17.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect diff --git a/integration/libs/telemetry/telemetry_test.go b/integration/libs/telemetry/telemetry_test.go index d329c238e56..32a0fb8ea6a 100644 --- a/integration/libs/telemetry/telemetry_test.go +++ b/integration/libs/telemetry/telemetry_test.go @@ -4,12 +4,12 @@ import ( "encoding/json" "testing" "time" + "uuid" "github.com/databricks/cli/integration/internal/acc" "github.com/databricks/cli/libs/telemetry" "github.com/databricks/cli/libs/telemetry/protos" "github.com/databricks/databricks-sdk-go/client" - "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/internal/testutil/helpers.go b/internal/testutil/helpers.go index c6e24f8cc4e..e86f4ae15c9 100644 --- a/internal/testutil/helpers.go +++ b/internal/testutil/helpers.go @@ -2,9 +2,9 @@ package testutil import ( "strings" + "uuid" "github.com/databricks/cli/libs/env" - "github.com/google/uuid" ) // GetEnvOrSkipTest proceeds with test only with that env variable. diff --git a/libs/apps/runlocal/headers.go b/libs/apps/runlocal/headers.go index 9655e51ba28..0fd8c99d721 100644 --- a/libs/apps/runlocal/headers.go +++ b/libs/apps/runlocal/headers.go @@ -1,8 +1,9 @@ package runlocal import ( + "uuid" + "github.com/databricks/databricks-sdk-go/service/iam" - "github.com/google/uuid" ) func GetXHeaders(user *iam.User) map[string]string { diff --git a/libs/auth/storage/keyring.go b/libs/auth/storage/keyring.go index bb6ea4bf051..e499c00490c 100644 --- a/libs/auth/storage/keyring.go +++ b/libs/auth/storage/keyring.go @@ -6,8 +6,8 @@ import ( "errors" "fmt" "time" + "uuid" - "github.com/google/uuid" "github.com/zalando/go-keyring" "golang.org/x/oauth2" ) @@ -104,7 +104,7 @@ func probeWithBackend(backend keyringBackend, timeout time.Duration) error { timeout: timeout, keyringSvcName: keyringServiceName, } - account := keyringProbeAccountPrefix + uuid.NewString() + account := keyringProbeAccountPrefix + uuid.New().String() tok := &oauth2.Token{AccessToken: "probe"} if err := c.Put(account, Entry{Token: tok}); err != nil { return fmt.Errorf("write: %w", err) @@ -133,7 +133,7 @@ func probeReadWithBackend(backend keyringBackend, timeout time.Duration) error { timeout: timeout, keyringSvcName: keyringServiceName, } - account := keyringProbeAccountPrefix + uuid.NewString() + account := keyringProbeAccountPrefix + uuid.New().String() err := c.withTimeout("get", func() error { _, gerr := c.backend.Get(c.keyringSvcName, account) return gerr diff --git a/libs/cmdctx/context.go b/libs/cmdctx/context.go index 326623dda62..a795cfd8f1e 100644 --- a/libs/cmdctx/context.go +++ b/libs/cmdctx/context.go @@ -2,8 +2,7 @@ package cmdctx import ( "context" - - "github.com/google/uuid" + "uuid" ) // key is a package-local type to use for context keys. diff --git a/libs/cmdctx/context_test.go b/libs/cmdctx/context_test.go index 58e2d1efdb5..58a3eaee74d 100644 --- a/libs/cmdctx/context_test.go +++ b/libs/cmdctx/context_test.go @@ -2,8 +2,8 @@ package cmdctx import ( "testing" + "uuid" - "github.com/google/uuid" "github.com/stretchr/testify/assert" ) @@ -45,5 +45,6 @@ func TestCommandGenerateExecId(t *testing.T) { assert.Equal(t, v, ExecId(ctx)) // The value should be a valid UUID. - assert.NoError(t, uuid.Validate(v)) + _, err := uuid.Parse(v) + assert.NoError(t, err) } diff --git a/libs/iamutil/service_principal.go b/libs/iamutil/service_principal.go index 0ae578baf19..e72adfeb37c 100644 --- a/libs/iamutil/service_principal.go +++ b/libs/iamutil/service_principal.go @@ -1,8 +1,9 @@ package iamutil import ( + "uuid" + "github.com/databricks/databricks-sdk-go/service/iam" - "github.com/google/uuid" ) // Determines whether a given user is a service principal. diff --git a/libs/locker/locker.go b/libs/locker/locker.go index 0de7fdb4d96..77e1a529b79 100644 --- a/libs/locker/locker.go +++ b/libs/locker/locker.go @@ -10,10 +10,10 @@ import ( "io/fs" "slices" "time" + "uuid" "github.com/databricks/cli/libs/filer" "github.com/databricks/databricks-sdk-go" - "github.com/google/uuid" ) type UnlockOption int diff --git a/libs/telemetry/logger.go b/libs/telemetry/logger.go index 7c57b87f520..509fdf65664 100644 --- a/libs/telemetry/logger.go +++ b/libs/telemetry/logger.go @@ -8,6 +8,7 @@ import ( "net/http" "strconv" "time" + "uuid" "github.com/databricks/cli/libs/auth" "github.com/databricks/cli/libs/cmdctx" @@ -16,7 +17,6 @@ import ( "github.com/databricks/cli/libs/telemetry/protos" "github.com/databricks/databricks-sdk-go/apierr" "github.com/databricks/databricks-sdk-go/client" - "github.com/google/uuid" ) const ( diff --git a/libs/template/helpers.go b/libs/template/helpers.go index acf651beb85..acf257d848c 100644 --- a/libs/template/helpers.go +++ b/libs/template/helpers.go @@ -11,14 +11,13 @@ import ( "slices" "strings" "text/template" + "uuid" "github.com/databricks/cli/libs/cmdctx" "github.com/databricks/cli/libs/env" "github.com/databricks/cli/libs/iamutil" "github.com/databricks/databricks-sdk-go/apierr" "github.com/databricks/databricks-sdk-go/service/iam" - - "github.com/google/uuid" ) type ErrFail struct { @@ -79,7 +78,7 @@ func loadHelpers(ctx context.Context) template.FuncMap { "random_int": func(n int) int { return rand.IntN(n) }, - // Alias for https://pkg.go.dev/github.com/google/uuid#New. Returns, as a string, a UUID which is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC 4122. + // Alias for https://pkg.go.dev/uuid#New. Returns, as a string, a UUID which is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC 9562. "uuid": func() string { return uuid.New().String() }, diff --git a/libs/testserver/fake_workspace.go b/libs/testserver/fake_workspace.go index a51bd231c7d..9d11a4b5d4d 100644 --- a/libs/testserver/fake_workspace.go +++ b/libs/testserver/fake_workspace.go @@ -18,12 +18,12 @@ import ( "sync" "sync/atomic" "time" + "uuid" "github.com/databricks/databricks-sdk-go/service/compute" "github.com/databricks/databricks-sdk-go/service/dashboards" "github.com/databricks/databricks-sdk-go/service/database" "github.com/databricks/databricks-sdk-go/service/postgres" - "github.com/google/uuid" "github.com/databricks/cli/libs/structs/structtag" "github.com/databricks/databricks-sdk-go/service/apps" @@ -158,8 +158,7 @@ func nextUUID() string { var b [16]byte binary.BigEndian.PutUint64(b[0:8], uint64(nextID())) binary.BigEndian.PutUint64(b[8:16], uint64(nextID())) - u := uuid.Must(uuid.FromBytes(b[:])) - return u.String() + return uuid.UUID(b).String() } func nextDashboardID() string { From 88655540fe5b494c2b799f38739d5c08a40fbcf0 Mon Sep 17 00:00:00 2001 From: "pieter.noordhuis" Date: Tue, 20 Oct 2026 11:11:32 +0000 Subject: [PATCH 2/2] Remove google/uuid from NOTICE It is no longer a direct dependency. Co-authored-by: Isaac --- NOTICE | 4 ---- 1 file changed, 4 deletions(-) diff --git a/NOTICE b/NOTICE index 926bf85d368..fb51e5c0914 100644 --- a/NOTICE +++ b/NOTICE @@ -38,10 +38,6 @@ Copyright (c) 2012 Alex Ogier. All rights reserved. Copyright (c) 2012 The Go Authors. All rights reserved. License - https://github.com/spf13/pflag/blob/master/LICENSE -google/uuid - https://github.com/google/uuid -Copyright (c) 2009,2014 Google Inc. All rights reserved. -License - https://github.com/google/uuid/blob/master/LICENSE - hexops/gotextdiff - https://github.com/hexops/gotextdiff Copyright (c) 2009 The Go Authors. All rights reserved. License - https://github.com/hexops/gotextdiff/blob/main/LICENSE