Skip to content

Commit

Permalink
Merge pull request #347 from cole-miller/v3
Browse files Browse the repository at this point in the history
V3
  • Loading branch information
cole-miller authored Oct 24, 2024
2 parents f44cfcf + addcb6d commit 9ea4322
Show file tree
Hide file tree
Showing 42 changed files with 80 additions and 80 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 &
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 &
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build PPA source packages
on:
push:
branches:
- v2
- v3
jobs:
build:
if: github.repository == 'canonical/go-dqlite'
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
8 changes: 4 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions app/app_go1.18_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion app/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions app/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion app/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion client/constants.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion client/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions client/leader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion client/log.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion client/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions client/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/dqlite-benchmark/dqlite-benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions cmd/dqlite-demo/dqlite-demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions cmd/dqlite/dqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
6 changes: 3 additions & 3 deletions driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
8 changes: 4 additions & 4 deletions driver/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/bindings/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ import "C"

// required dqlite version
var dqliteMajorVersion int = 1
var dqliteMinorVersion int = 17
var dqliteMinorVersion int = 18
2 changes: 1 addition & 1 deletion internal/bindings/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions internal/bindings/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/bindings/sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package bindings

import (
"github.com/canonical/go-dqlite/v2/internal/protocol"
"github.com/canonical/go-dqlite/v3/internal/protocol"
)

/*
Expand Down
2 changes: 1 addition & 1 deletion internal/protocol/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/protocol/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/protocol/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Loading

0 comments on commit 9ea4322

Please sign in to comment.