diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ca66baf3..ac9e0a85 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -29,7 +29,7 @@ jobs: run: | sudo add-apt-repository ppa:dqlite/dev -y sudo apt update - sudo apt install -y libsqlite3-dev libuv1-dev liblz4-dev libdqlite1.17-dev + sudo apt install -y libsqlite3-dev libuv1-dev liblz4-dev libdqlite-dev - name: Download deps run: | @@ -55,7 +55,7 @@ jobs: env: GO_DQLITE_MULTITHREAD: 1 run: | - go install -tags libsqlite3 github.com/canonical/go-dqlite/v2/cmd/dqlite-benchmark + go install -tags libsqlite3 github.com/canonical/go-dqlite/v3/cmd/dqlite-benchmark dqlite-benchmark --db 127.0.0.1:9001 --driver --cluster 127.0.0.1:9001,127.0.0.1:9002,127.0.0.1:9003 --workload kvreadwrite & masterpid=$! dqlite-benchmark --db 127.0.0.1:9002 --join 127.0.0.1:9001 & diff --git a/.github/workflows/daily-benchmark.yml b/.github/workflows/daily-benchmark.yml index 4eaecbf5..bf2d9937 100644 --- a/.github/workflows/daily-benchmark.yml +++ b/.github/workflows/daily-benchmark.yml @@ -26,7 +26,7 @@ jobs: GO_DQLITE_MULTITHREAD: 1 run: | go get -t -tags libsqlite3 ./... - go install -tags libsqlite3 github.com/canonical/go-dqlite/v2/cmd/dqlite-benchmark + go install -tags libsqlite3 github.com/canonical/go-dqlite/v3/cmd/dqlite-benchmark dqlite-benchmark --db 127.0.0.1:9001 --duration 3600 --driver --cluster 127.0.0.1:9001,127.0.0.1:9002,127.0.0.1:9003 --workload kvreadwrite & masterpid=$! dqlite-benchmark --db 127.0.0.1:9002 --join 127.0.0.1:9001 & diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 2f9c5e16..047b9ecf 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -2,7 +2,7 @@ name: Build PPA source packages on: push: branches: - - v2 + - v3 jobs: build: if: github.repository == 'canonical/go-dqlite' @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 with: repository: canonical/dqlite-ppa - ref: go-dqlite-v2 + ref: go-dqlite-v3 path: dqlite-ppa - name: Setup dependencies @@ -57,7 +57,7 @@ jobs: VERSION="$(git describe --tags | sed -e "s/^v//" -e "s/-/+git/")" dch --create \ --distribution ${TARGET} \ - --package go-dqlite-v2 \ + --package go-dqlite-v3 \ --newversion ${VERSION}~${TARGET}1 \ "Automatic build from Github" debuild -S -sa -d -k${{ vars.PPA_PUBLIC_KEY }} diff --git a/app/app.go b/app/app.go index c3e9ed7b..af2b7f7a 100644 --- a/app/app.go +++ b/app/app.go @@ -13,10 +13,10 @@ import ( "sync/atomic" "time" - "github.com/canonical/go-dqlite/v2" - "github.com/canonical/go-dqlite/v2/client" - "github.com/canonical/go-dqlite/v2/driver" - "github.com/canonical/go-dqlite/v2/internal/protocol" + "github.com/canonical/go-dqlite/v3" + "github.com/canonical/go-dqlite/v3/client" + "github.com/canonical/go-dqlite/v3/driver" + "github.com/canonical/go-dqlite/v3/internal/protocol" "github.com/pkg/errors" "golang.org/x/sync/semaphore" ) diff --git a/app/app_go1.18_test.go b/app/app_go1.18_test.go index 433c7598..05c03e71 100644 --- a/app/app_go1.18_test.go +++ b/app/app_go1.18_test.go @@ -9,8 +9,8 @@ package app_test // "net" // "testing" -// "github.com/canonical/go-dqlite/v2/app" -// "github.com/canonical/go-dqlite/v2/client" +// "github.com/canonical/go-dqlite/v3/app" +// "github.com/canonical/go-dqlite/v3/client" // "github.com/quic-go/quic-go" // "github.com/stretchr/testify/assert" // "github.com/stretchr/testify/require" diff --git a/app/app_test.go b/app/app_test.go index fbea6bfd..6d2ef831 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -18,9 +18,9 @@ import ( "testing" "time" - "github.com/canonical/go-dqlite/v2" - "github.com/canonical/go-dqlite/v2/app" - "github.com/canonical/go-dqlite/v2/client" + "github.com/canonical/go-dqlite/v3" + "github.com/canonical/go-dqlite/v3/app" + "github.com/canonical/go-dqlite/v3/client" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/app/dial.go b/app/dial.go index ade86f93..ef1bb636 100644 --- a/app/dial.go +++ b/app/dial.go @@ -6,7 +6,7 @@ import ( "fmt" "net" - "github.com/canonical/go-dqlite/v2/client" + "github.com/canonical/go-dqlite/v3/client" ) // Like client.DialFuncWithTLS but also starts the proxy, since the raft diff --git a/app/example_test.go b/app/example_test.go index b81f3e4e..af6687ca 100644 --- a/app/example_test.go +++ b/app/example_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "os" - "github.com/canonical/go-dqlite/v2/app" + "github.com/canonical/go-dqlite/v3/app" ) // To start the first node of a dqlite cluster for the first time, its network diff --git a/app/options.go b/app/options.go index 9f3ca89d..98f37bbe 100644 --- a/app/options.go +++ b/app/options.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "github.com/canonical/go-dqlite/v2" - "github.com/canonical/go-dqlite/v2/client" - "github.com/canonical/go-dqlite/v2/internal/protocol" + "github.com/canonical/go-dqlite/v3" + "github.com/canonical/go-dqlite/v3/client" + "github.com/canonical/go-dqlite/v3/internal/protocol" ) // Option can be used to tweak app parameters. diff --git a/app/roles.go b/app/roles.go index 20e53073..b8c27400 100644 --- a/app/roles.go +++ b/app/roles.go @@ -3,7 +3,7 @@ package app import ( "sort" - "github.com/canonical/go-dqlite/v2/client" + "github.com/canonical/go-dqlite/v3/client" ) const minVoters = 3 diff --git a/benchmark/benchmark.go b/benchmark/benchmark.go index 0e07d6fb..fcd3c10a 100644 --- a/benchmark/benchmark.go +++ b/benchmark/benchmark.go @@ -9,8 +9,8 @@ import ( "path" "time" - "github.com/canonical/go-dqlite/v2/app" - "github.com/canonical/go-dqlite/v2/client" + "github.com/canonical/go-dqlite/v3/app" + "github.com/canonical/go-dqlite/v3/client" ) const ( diff --git a/benchmark/benchmark_test.go b/benchmark/benchmark_test.go index 5a49c60b..eb099c38 100644 --- a/benchmark/benchmark_test.go +++ b/benchmark/benchmark_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "github.com/canonical/go-dqlite/v2/app" - "github.com/canonical/go-dqlite/v2/benchmark" + "github.com/canonical/go-dqlite/v3/app" + "github.com/canonical/go-dqlite/v3/benchmark" "github.com/stretchr/testify/require" ) diff --git a/client/client.go b/client/client.go index cc95a8e0..05615acc 100644 --- a/client/client.go +++ b/client/client.go @@ -3,7 +3,7 @@ package client import ( "context" - "github.com/canonical/go-dqlite/v2/internal/protocol" + "github.com/canonical/go-dqlite/v3/internal/protocol" "github.com/pkg/errors" ) diff --git a/client/client_test.go b/client/client_test.go index 868b9ce4..bdcf5c21 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - dqlite "github.com/canonical/go-dqlite/v2" - "github.com/canonical/go-dqlite/v2/client" + dqlite "github.com/canonical/go-dqlite/v3" + "github.com/canonical/go-dqlite/v3/client" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/client/constants.go b/client/constants.go index c046f3a3..d0ee73fc 100644 --- a/client/constants.go +++ b/client/constants.go @@ -1,7 +1,7 @@ package client import ( - "github.com/canonical/go-dqlite/v2/internal/protocol" + "github.com/canonical/go-dqlite/v3/internal/protocol" ) // Node roles diff --git a/client/dial.go b/client/dial.go index e528fc51..3ae86f10 100644 --- a/client/dial.go +++ b/client/dial.go @@ -5,7 +5,7 @@ import ( "crypto/tls" "net" - "github.com/canonical/go-dqlite/v2/internal/protocol" + "github.com/canonical/go-dqlite/v3/internal/protocol" ) // DefaultDialFunc is the default dial function, which can handle plain TCP and diff --git a/client/leader_test.go b/client/leader_test.go index 476aea3d..1a75a51b 100644 --- a/client/leader_test.go +++ b/client/leader_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - dqlite "github.com/canonical/go-dqlite/v2" - "github.com/canonical/go-dqlite/v2/client" + dqlite "github.com/canonical/go-dqlite/v3" + "github.com/canonical/go-dqlite/v3/client" "github.com/stretchr/testify/require" ) diff --git a/client/log.go b/client/log.go index 41ef7e68..03088ca6 100644 --- a/client/log.go +++ b/client/log.go @@ -1,7 +1,7 @@ package client import ( - "github.com/canonical/go-dqlite/v2/logging" + "github.com/canonical/go-dqlite/v3/logging" ) // LogFunc is a function that can be used for logging. diff --git a/client/store.go b/client/store.go index 82255b32..9a88bf32 100644 --- a/client/store.go +++ b/client/store.go @@ -9,7 +9,7 @@ import ( "github.com/google/renameio" "gopkg.in/yaml.v2" - "github.com/canonical/go-dqlite/v2/internal/protocol" + "github.com/canonical/go-dqlite/v3/internal/protocol" ) // NodeStore is used by a dqlite client to get an initial list of candidate diff --git a/client/store_test.go b/client/store_test.go index 5684e325..f6d6c575 100644 --- a/client/store_test.go +++ b/client/store_test.go @@ -7,9 +7,9 @@ import ( "database/sql" "testing" - dqlite "github.com/canonical/go-dqlite/v2" - "github.com/canonical/go-dqlite/v2/client" - "github.com/canonical/go-dqlite/v2/driver" + dqlite "github.com/canonical/go-dqlite/v3" + "github.com/canonical/go-dqlite/v3/client" + "github.com/canonical/go-dqlite/v3/driver" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/dqlite-benchmark/dqlite-benchmark.go b/cmd/dqlite-benchmark/dqlite-benchmark.go index d1043177..910db98f 100644 --- a/cmd/dqlite-benchmark/dqlite-benchmark.go +++ b/cmd/dqlite-benchmark/dqlite-benchmark.go @@ -8,8 +8,8 @@ import ( "path/filepath" "time" - "github.com/canonical/go-dqlite/v2/app" - "github.com/canonical/go-dqlite/v2/benchmark" + "github.com/canonical/go-dqlite/v3/app" + "github.com/canonical/go-dqlite/v3/benchmark" "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/sys/unix" diff --git a/cmd/dqlite-demo/dqlite-demo.go b/cmd/dqlite-demo/dqlite-demo.go index 6dff9285..ee69d8c4 100644 --- a/cmd/dqlite-demo/dqlite-demo.go +++ b/cmd/dqlite-demo/dqlite-demo.go @@ -14,8 +14,8 @@ import ( "path/filepath" "strings" - "github.com/canonical/go-dqlite/v2/app" - "github.com/canonical/go-dqlite/v2/client" + "github.com/canonical/go-dqlite/v3/app" + "github.com/canonical/go-dqlite/v3/client" "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/sys/unix" diff --git a/cmd/dqlite/dqlite.go b/cmd/dqlite/dqlite.go index 10018cdc..5bb74e01 100644 --- a/cmd/dqlite/dqlite.go +++ b/cmd/dqlite/dqlite.go @@ -14,9 +14,9 @@ import ( "github.com/peterh/liner" "github.com/spf13/cobra" - "github.com/canonical/go-dqlite/v2/app" - "github.com/canonical/go-dqlite/v2/client" - "github.com/canonical/go-dqlite/v2/internal/shell" + "github.com/canonical/go-dqlite/v3/app" + "github.com/canonical/go-dqlite/v3/client" + "github.com/canonical/go-dqlite/v3/internal/shell" ) func main() { diff --git a/config.go b/config.go index c6fa7245..af640366 100644 --- a/config.go +++ b/config.go @@ -6,8 +6,8 @@ import ( "fmt" "os" - "github.com/canonical/go-dqlite/v2/internal/bindings" - "github.com/canonical/go-dqlite/v2/internal/protocol" + "github.com/canonical/go-dqlite/v3/internal/bindings" + "github.com/canonical/go-dqlite/v3/internal/protocol" "github.com/pkg/errors" ) diff --git a/driver/driver.go b/driver/driver.go index 20c9a14e..abd3bb9e 100644 --- a/driver/driver.go +++ b/driver/driver.go @@ -27,9 +27,9 @@ import ( "github.com/pkg/errors" - "github.com/canonical/go-dqlite/v2/client" - "github.com/canonical/go-dqlite/v2/internal/protocol" - "github.com/canonical/go-dqlite/v2/tracing" + "github.com/canonical/go-dqlite/v3/client" + "github.com/canonical/go-dqlite/v3/internal/protocol" + "github.com/canonical/go-dqlite/v3/tracing" ) // Driver perform queries against a dqlite server. diff --git a/driver/driver_test.go b/driver/driver_test.go index d0c54fc5..deb66689 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -24,10 +24,10 @@ import ( "testing" "time" - dqlite "github.com/canonical/go-dqlite/v2" - "github.com/canonical/go-dqlite/v2/client" - dqlitedriver "github.com/canonical/go-dqlite/v2/driver" - "github.com/canonical/go-dqlite/v2/logging" + dqlite "github.com/canonical/go-dqlite/v3" + "github.com/canonical/go-dqlite/v3/client" + dqlitedriver "github.com/canonical/go-dqlite/v3/driver" + "github.com/canonical/go-dqlite/v3/logging" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/driver/integration_test.go b/driver/integration_test.go index e4ac5cff..e18467e0 100644 --- a/driver/integration_test.go +++ b/driver/integration_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" - dqlite "github.com/canonical/go-dqlite/v2" - "github.com/canonical/go-dqlite/v2/client" - "github.com/canonical/go-dqlite/v2/driver" - "github.com/canonical/go-dqlite/v2/logging" + dqlite "github.com/canonical/go-dqlite/v3" + "github.com/canonical/go-dqlite/v3/client" + "github.com/canonical/go-dqlite/v3/driver" + "github.com/canonical/go-dqlite/v3/logging" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/go.mod b/go.mod index dedd324f..e6ac1397 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/canonical/go-dqlite/v2 +module github.com/canonical/go-dqlite/v3 // This is to maintain the ppa package on focal go 1.13 diff --git a/internal/bindings/build.go b/internal/bindings/build.go index edb631da..3ee4ecb3 100644 --- a/internal/bindings/build.go +++ b/internal/bindings/build.go @@ -7,4 +7,4 @@ import "C" // required dqlite version var dqliteMajorVersion int = 1 -var dqliteMinorVersion int = 17 +var dqliteMinorVersion int = 18 diff --git a/internal/bindings/server.go b/internal/bindings/server.go index 35ed3456..4b7d50ac 100644 --- a/internal/bindings/server.go +++ b/internal/bindings/server.go @@ -83,7 +83,7 @@ import ( "time" "unsafe" - "github.com/canonical/go-dqlite/v2/internal/protocol" + "github.com/canonical/go-dqlite/v3/internal/protocol" ) type Node struct { diff --git a/internal/bindings/server_test.go b/internal/bindings/server_test.go index 18d47262..87f07a4d 100644 --- a/internal/bindings/server_test.go +++ b/internal/bindings/server_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - "github.com/canonical/go-dqlite/v2/internal/bindings" - "github.com/canonical/go-dqlite/v2/internal/protocol" + "github.com/canonical/go-dqlite/v3/internal/bindings" + "github.com/canonical/go-dqlite/v3/internal/protocol" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/internal/bindings/sqlite3.go b/internal/bindings/sqlite3.go index 6cdbe9fc..c0b65234 100644 --- a/internal/bindings/sqlite3.go +++ b/internal/bindings/sqlite3.go @@ -3,7 +3,7 @@ package bindings import ( - "github.com/canonical/go-dqlite/v2/internal/protocol" + "github.com/canonical/go-dqlite/v3/internal/protocol" ) /* diff --git a/internal/protocol/connector.go b/internal/protocol/connector.go index a5246e43..76d9c0ac 100644 --- a/internal/protocol/connector.go +++ b/internal/protocol/connector.go @@ -11,7 +11,7 @@ import ( "time" "github.com/Rican7/retry" - "github.com/canonical/go-dqlite/v2/logging" + "github.com/canonical/go-dqlite/v3/logging" "github.com/pkg/errors" "golang.org/x/sync/semaphore" ) diff --git a/internal/protocol/connector_test.go b/internal/protocol/connector_test.go index 81ced3f7..c327c09e 100644 --- a/internal/protocol/connector_test.go +++ b/internal/protocol/connector_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/canonical/go-dqlite/v2/internal/bindings" - "github.com/canonical/go-dqlite/v2/internal/protocol" - "github.com/canonical/go-dqlite/v2/logging" + "github.com/canonical/go-dqlite/v3/internal/bindings" + "github.com/canonical/go-dqlite/v3/internal/protocol" + "github.com/canonical/go-dqlite/v3/logging" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/internal/protocol/protocol_test.go b/internal/protocol/protocol_test.go index 60833c82..6a1ccb8d 100644 --- a/internal/protocol/protocol_test.go +++ b/internal/protocol/protocol_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/canonical/go-dqlite/v2/internal/protocol" - "github.com/canonical/go-dqlite/v2/logging" + "github.com/canonical/go-dqlite/v3/internal/protocol" + "github.com/canonical/go-dqlite/v3/logging" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/internal/shell/options.go b/internal/shell/options.go index 4d8b9e59..cce398dc 100644 --- a/internal/shell/options.go +++ b/internal/shell/options.go @@ -1,6 +1,6 @@ package shell -import "github.com/canonical/go-dqlite/v2/client" +import "github.com/canonical/go-dqlite/v3/client" // Option that can be used to tweak shell parameters. type Option func(*options) diff --git a/internal/shell/shell.go b/internal/shell/shell.go index 6ee38128..457a7c3e 100644 --- a/internal/shell/shell.go +++ b/internal/shell/shell.go @@ -13,9 +13,9 @@ import ( "strings" "text/tabwriter" - "github.com/canonical/go-dqlite/v2" - "github.com/canonical/go-dqlite/v2/client" - "github.com/canonical/go-dqlite/v2/driver" + "github.com/canonical/go-dqlite/v3" + "github.com/canonical/go-dqlite/v3/client" + "github.com/canonical/go-dqlite/v3/driver" ) // Shell can be used to implement interactive prompts for inspecting a dqlite diff --git a/logging/func_test.go b/logging/func_test.go index 58735c8f..d87d3c2d 100644 --- a/logging/func_test.go +++ b/logging/func_test.go @@ -3,7 +3,7 @@ package logging_test import ( "testing" - "github.com/canonical/go-dqlite/v2/logging" + "github.com/canonical/go-dqlite/v3/logging" ) func Test_TestFunc(t *testing.T) { diff --git a/logging/level_test.go b/logging/level_test.go index 349ea284..21fd5eb5 100644 --- a/logging/level_test.go +++ b/logging/level_test.go @@ -3,7 +3,7 @@ package logging_test import ( "testing" - "github.com/canonical/go-dqlite/v2/logging" + "github.com/canonical/go-dqlite/v3/logging" "github.com/stretchr/testify/assert" ) diff --git a/node.go b/node.go index fed4fcca..ad9ba715 100644 --- a/node.go +++ b/node.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/canonical/go-dqlite/v2/client" - "github.com/canonical/go-dqlite/v2/internal/bindings" + "github.com/canonical/go-dqlite/v3/client" + "github.com/canonical/go-dqlite/v3/internal/bindings" "github.com/pkg/errors" ) diff --git a/node_test.go b/node_test.go index ddd8b914..f7abbd22 100644 --- a/node_test.go +++ b/node_test.go @@ -4,7 +4,7 @@ import ( "fmt" "sort" - dqlite "github.com/canonical/go-dqlite/v2" + dqlite "github.com/canonical/go-dqlite/v3" ) type infoSorter []dqlite.LastEntryInfo diff --git a/test/roles.sh b/test/roles.sh index 905d9824..dc47a2fd 100755 --- a/test/roles.sh +++ b/test/roles.sh @@ -26,8 +26,8 @@ import ( "time" "path/filepath" "strconv" - "github.com/canonical/go-dqlite/v2/client" - "github.com/canonical/go-dqlite/v2/app" + "github.com/canonical/go-dqlite/v3/client" + "github.com/canonical/go-dqlite/v3/app" "golang.org/x/sys/unix" )