Skip to content

Commit

Permalink
Pin LXD and use microcluster with dqlite LTS (canonical#454)
Browse files Browse the repository at this point in the history
### Pin LXD

When defining the microcluster API handlers you have to import from
`"github.com/canonical/lxd/lxd/response"` for the handlers return value.
As this dependency can diverge from the same import that microcluster
users internally, you might end up with build issues if you don't use
the same version as microcluster.

We have already [filed an
improvement](canonical/microcluster#282) in
microcluster to address this in future releases.
But for now pinning down the version is a good measure to prevent build
errors in the future during maintenance of the LTS.
The same measure is [applied in
microcluster](https://github.com/canonical/microcluster/blob/v2/Makefile#L51)
to ensure every downstream can stay on track with the used version of
LXD.

See [this PR](canonical/microcloud#464) for the
same change in MicroCloud and [this
PR](canonical/microovn#202) for MicroOVN.

### Dqlite LTS

In addition microcluster is updated to `v2.0.5` which uses dqlite `v2`
LTS.

---------

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
  • Loading branch information
roosterfish authored Nov 7, 2024
1 parent 2dd856d commit c148cea
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 566 deletions.
4 changes: 4 additions & 0 deletions microceph/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ endif
.PHONY: update-gomod
update-gomod:
go get -u ./...

# Static pins
go get github.com/canonical/lxd@stable-5.21 # Stay on v2 dqlite and LXD LTS client

go mod tidy
go get toolchain@none

Expand Down
14 changes: 7 additions & 7 deletions microceph/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ go 1.22.7

require (
github.com/Rican7/retry v0.3.1
github.com/canonical/lxd v0.0.0-20241018070926-214b65e55241
github.com/canonical/microcluster/v2 v2.0.3
github.com/canonical/lxd v0.0.0-20241106165613-4aab50ec18c3
github.com/canonical/microcluster/v2 v2.0.5
github.com/djherbis/times v1.6.0
github.com/google/go-cmp v0.6.0
github.com/gorilla/mux v1.8.1
github.com/jedib0t/go-pretty/v6 v6.6.0
github.com/jedib0t/go-pretty/v6 v6.6.1
github.com/olekukonko/tablewriter v0.0.5
github.com/pborman/uuid v1.2.1
github.com/qmuntal/stateless v1.7.1
Expand All @@ -23,11 +23,11 @@ require (

require (
github.com/armon/go-proxyproto v0.1.0 // indirect
github.com/canonical/go-dqlite v1.22.0 // indirect
github.com/canonical/go-dqlite/v2 v2.0.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e // indirect
github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/fvbommel/sortorder v1.1.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
Expand All @@ -47,7 +47,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/muhlemmer/gu v0.3.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.6 // indirect
github.com/pkg/sftp v1.13.7 // indirect
github.com/pkg/xattr v0.4.10 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
Expand All @@ -57,7 +57,7 @@ require (
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/zitadel/logging v0.6.1 // indirect
github.com/zitadel/oidc/v3 v3.30.1 // indirect
github.com/zitadel/oidc/v3 v3.32.1 // indirect
github.com/zitadel/schema v1.3.0 // indirect
go.opentelemetry.io/otel v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.31.0 // indirect
Expand Down
Loading

0 comments on commit c148cea

Please sign in to comment.