Skip to content

Commit

Permalink
go-dqlite v2
Browse files Browse the repository at this point in the history
  • Loading branch information
louiseschmidtgen committed Nov 14, 2024
1 parent c5cd2a0 commit beefaa8
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 470 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ jobs:

benchmarks:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment
contents: read # for actions/checkout to fetch code
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment
name: Run Benchmarks
runs-on: ubuntu-latest

Expand All @@ -97,7 +97,7 @@ jobs:
- name: Install Dqlite
run: |
sudo add-apt-repository -y ppa:dqlite/dev
sudo apt install libdqlite-dev
sudo apt install libdqlite1.17-dev
- name: Run benchmarks
id: bench
Expand Down Expand Up @@ -152,11 +152,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: Benchmarks
message: |
### Benchmark Result
### Benchmark
<details><summary>Results </summary>
```
${{ steps.stats.outputs.diff }}
```
</details>
<details><summary>Current status</summary>
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bin/static/k8s-dqlite: $(DQLITE_BUILD_SCRIPTS_DIR)/.deps/static/lib/libdqlite.a

bin/static/dqlite: $(DQLITE_BUILD_SCRIPTS_DIR)/.deps/static/lib/libdqlite.a
mkdir -p bin/static
GOBIN=$(shell pwd)/bin/static $(DQLITE_BUILD_SCRIPTS_DIR)/static-go-install.sh github.com/canonical/go-dqlite/cmd/dqlite@v1.20.0
GOBIN=$(shell pwd)/bin/static $(DQLITE_BUILD_SCRIPTS_DIR)/static-go-install.sh github.com/canonical/go-dqlite/v2/cmd/dqlite@v2.0.0

## Dynamic Builds
dynamic: bin/dynamic/k8s-dqlite bin/dynamic/dqlite
Expand All @@ -44,7 +44,7 @@ bin/dynamic/k8s-dqlite: bin/dynamic/lib/libdqlite.so $(GO_SOURCES)

bin/dynamic/dqlite: bin/dynamic/lib/libdqlite.so
mkdir -p bin/dynamic
GOBIN=$(shell pwd)/bin/dynamic $(DQLITE_BUILD_SCRIPTS_DIR)/dynamic-go-install.sh github.com/canonical/go-dqlite/cmd/dqlite@v1.20.0
GOBIN=$(shell pwd)/bin/dynamic $(DQLITE_BUILD_SCRIPTS_DIR)/dynamic-go-install.sh github.com/canonical/go-dqlite/v2/cmd/dqlite@v2.0.0

## Cleanup
clean:
Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ module github.com/canonical/k8s-dqlite

go 1.22

toolchain go1.22.8

require (
github.com/canonical/go-dqlite v1.22.0
github.com/canonical/go-dqlite/v2 v2.0.0
github.com/mattn/go-sqlite3 v1.14.22
github.com/onsi/gomega v1.27.10
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.19.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
github.com/spf13/cobra v1.8.1
go.etcd.io/etcd/api/v3 v3.5.12
go.etcd.io/etcd/client/pkg/v3 v3.5.12
go.etcd.io/etcd/client/v3 v3.5.12
Expand Down
461 changes: 7 additions & 454 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/kine/drivers/dqlite/dqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"strings"

"github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/canonical/k8s-dqlite/pkg/kine/drivers/generic"
"github.com/canonical/k8s-dqlite/pkg/kine/drivers/sqlite"
"github.com/canonical/k8s-dqlite/pkg/kine/server"
Expand Down
6 changes: 3 additions & 3 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"path/filepath"
"time"

"github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/app"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/app"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/k8s-dqlite/pkg/kine/drivers/generic"
"github.com/canonical/k8s-dqlite/pkg/kine/endpoint"
"github.com/canonical/k8s-dqlite/pkg/kine/server"
Expand Down
2 changes: 1 addition & 1 deletion test/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

"github.com/canonical/go-dqlite/app"
"github.com/canonical/go-dqlite/v2/app"
"github.com/canonical/k8s-dqlite/pkg/instrument"
"github.com/canonical/k8s-dqlite/pkg/kine/endpoint"
"github.com/canonical/k8s-dqlite/pkg/kine/server"
Expand Down

0 comments on commit beefaa8

Please sign in to comment.