Skip to content

Commit

Permalink
Switch to go-dqlite/v2 (LTS branch) (stable-4.0) (#14452)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomponline authored Nov 12, 2024
2 parents 97f138b + 2e266a8 commit 4eded33
Show file tree
Hide file tree
Showing 25 changed files with 68 additions and 203 deletions.
16 changes: 10 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/Rican7/retry v0.3.1
github.com/armon/go-proxyproto v0.0.0-20210323213023-7e956b284f0a
github.com/canonical/candid v1.11.0
github.com/canonical/go-dqlite v1.22.0
github.com/canonical/go-dqlite/v2 v2.0.0
github.com/digitalocean/go-qemu v0.0.0-20210326154740-ac9e0b687001
github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0
Expand Down Expand Up @@ -41,7 +41,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/robfig/cron/v3 v3.0.1
github.com/rogpeppe/fastuuid v1.2.0
github.com/spf13/cobra v1.3.0
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.7.0
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
go.etcd.io/bbolt v1.3.6
Expand All @@ -58,15 +58,16 @@ require (
)

require (
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/digitalocean/go-libvirt v0.0.0-20210723161134-761cfeeb5968 // indirect
github.com/go-macaroon-bakery/macaroonpb v1.0.0 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/golang/mock v1.5.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/renameio v1.0.1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jkeiser/iter v0.0.0-20200628201005-c8aa0ae784d1 // indirect
github.com/juju/collections v0.0.0-20200605021417-0d0ec82b7271 // indirect
github.com/juju/errors v0.0.0-20210818161939-5560c4c073ff // indirect
Expand All @@ -80,20 +81,23 @@ require (
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.8.1 // indirect
gitlab.com/golang-commonmark/puny v0.0.0-20191124015043-9f83538fa04f // indirect
golang.org/x/mod v0.5.1 // indirect
golang.org/x/net v0.0.0-20220121210141-e204ce36a2ba // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/tools v0.1.9 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/grpc v1.38.0 // indirect
gopkg.in/errgo.v1 v1.0.1 // indirect
gopkg.in/httprequest.v1 v1.2.1 // indirect
gopkg.in/macaroon.v2 v2.1.0 // indirect
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
gopkg.in/retry.v1 v1.0.3 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
191 changes: 26 additions & 165 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lxd/cluster/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"sync"
"time"

dqlite "github.com/canonical/go-dqlite"
client "github.com/canonical/go-dqlite/client"
dqlite "github.com/canonical/go-dqlite/v2"
client "github.com/canonical/go-dqlite/v2/client"
log "gopkg.in/inconshreveable/log15.v2"

"github.com/canonical/lxd/lxd/db"
Expand Down
2 changes: 1 addition & 1 deletion lxd/cluster/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"path/filepath"
"testing"

"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/canonical/lxd/lxd/cluster"
"github.com/canonical/lxd/lxd/db"
"github.com/canonical/lxd/shared"
Expand Down
2 changes: 1 addition & 1 deletion lxd/cluster/heartbeat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/canonical/lxd/lxd/cluster"
"github.com/canonical/lxd/lxd/db"
"github.com/canonical/lxd/lxd/state"
Expand Down
4 changes: 2 additions & 2 deletions lxd/cluster/membership.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"sync"
"time"

"github.com/canonical/go-dqlite/app"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/app"
"github.com/canonical/go-dqlite/v2/client"
"gopkg.in/inconshreveable/log15.v2"
log "gopkg.in/inconshreveable/log15.v2"

Expand Down
2 changes: 1 addition & 1 deletion lxd/cluster/membership_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/canonical/lxd/lxd/cluster"
"github.com/canonical/lxd/lxd/db"
"github.com/canonical/lxd/lxd/state"
Expand Down
4 changes: 2 additions & 2 deletions lxd/cluster/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"testing"

dqlite "github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/driver"
dqlite "github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/canonical/lxd/lxd/cluster"
"github.com/canonical/lxd/shared"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion lxd/cluster/raft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"

"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/client"
"github.com/stretchr/testify/require"

"github.com/canonical/lxd/lxd/db"
Expand Down
4 changes: 2 additions & 2 deletions lxd/cluster/recover.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"path/filepath"
"time"

dqlite "github.com/canonical/go-dqlite"
client "github.com/canonical/go-dqlite/client"
dqlite "github.com/canonical/go-dqlite/v2"
client "github.com/canonical/go-dqlite/v2/client"

"github.com/canonical/lxd/lxd/db"
"github.com/canonical/lxd/lxd/node"
Expand Down
2 changes: 1 addition & 1 deletion lxd/cluster/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"time"

"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/client"
"gopkg.in/inconshreveable/log15.v2"
log "gopkg.in/inconshreveable/log15.v2"

Expand Down
4 changes: 2 additions & 2 deletions lxd/cluster/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"testing"
"time"

"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down
6 changes: 3 additions & 3 deletions lxd/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import (
"time"

"github.com/canonical/candid/candidclient"
dqliteclient "github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/driver"
dqliteclient "github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/gorilla/mux"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
log "gopkg.in/inconshreveable/log15.v2"
liblxc "gopkg.in/lxc/go-lxc.v2"

client "github.com/canonical/go-dqlite/client"
client "github.com/canonical/go-dqlite/v2/client"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon-bakery.v2/bakery/checkers"
"gopkg.in/macaroon-bakery.v2/bakery/identchecker"
Expand Down
2 changes: 1 addition & 1 deletion lxd/db/cluster/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path/filepath"
"sync/atomic"

driver "github.com/canonical/go-dqlite/driver"
driver "github.com/canonical/go-dqlite/v2/driver"
"github.com/canonical/lxd/lxd/db/query"
"github.com/canonical/lxd/lxd/db/schema"
"github.com/canonical/lxd/lxd/util"
Expand Down
2 changes: 1 addition & 1 deletion lxd/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"sync"
"time"

"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/pkg/errors"
log "gopkg.in/inconshreveable/log15.v2"

Expand Down
2 changes: 1 addition & 1 deletion lxd/db/migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/canonical/lxd/lxd/db"
"github.com/canonical/lxd/lxd/db/query"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion lxd/db/query/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/Rican7/retry/jitter"
"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/mattn/go-sqlite3"
"github.com/pkg/errors"

Expand Down
2 changes: 1 addition & 1 deletion lxd/db/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package db
import (
"fmt"

"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/lxd/lxd/db/query"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lxd/db/raft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package db_test
import (
"testing"

"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down
6 changes: 3 additions & 3 deletions lxd/db/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"testing"
"time"

dqlite "github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/driver"
dqlite "github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lxd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"time"

"github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/v2"
"github.com/spf13/cobra"

"github.com/canonical/lxd/lxd/daemon"
Expand Down
2 changes: 1 addition & 1 deletion lxd/main_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"golang.org/x/sys/unix"
"gopkg.in/yaml.v2"

"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/client"

"github.com/canonical/lxd/client"
"github.com/canonical/lxd/lxc/utils"
Expand Down
2 changes: 1 addition & 1 deletion lxd/node/raft.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package node

import (
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/client"

"github.com/canonical/lxd/lxd/db"
)
Expand Down
2 changes: 1 addition & 1 deletion lxd/node/raft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package node_test
import (
"testing"

"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down
2 changes: 1 addition & 1 deletion lxd/response/smart_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package response
import (
"net/http"

"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/mattn/go-sqlite3"
)

Expand Down

0 comments on commit 4eded33

Please sign in to comment.