Skip to content

Commit

Permalink
Merge pull request #200 from fnordahl/bug/2075184
Browse files Browse the repository at this point in the history
Pin LXD dependency and add check for untracked changes in dependencies.
  • Loading branch information
mkalcok authored Nov 7, 2024
2 parents 0d5d663 + ae6057c commit c0e0362
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 555 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,35 @@ jobs:
run: |
make check-lint
- name: Ensure go.mod is up to date
run: |
set -euxo pipefail
# The Launchpad build pipeline will run `go mod tidy`.
#
# Consequently a rebuild could produce a `-dirty` version string if
# any of our dependencies have changed.
#
# While annoying, it is actually a nice feature, because we do want
# to make concious choices about updates to our dependencies.
#
# Check whether a `go mod tidy` would cause go.mod to change and fail
# if it does.
assert_git_status() {
local files="go.mod go.sum"
if [ -n "$(git status --porcelain=v2 $files)" ]; then
echo "files NOT in sync with git: $files"
git status $files
exit 1
else
echo "files in sync with git: $files"
fi
}
cd microovn
assert_git_status
go mod tidy -v -x
assert_git_status
build:
name: build
needs:
Expand Down
1 change: 1 addition & 0 deletions microovn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ usage:
.PHONY: update-gomod
update-gomod:
go get -u ./...
go get github.com/canonical/[email protected]
go mod tidy

# Update lxd-generate generated database helpers.
Expand Down
9 changes: 4 additions & 5 deletions microovn/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.22.7
toolchain go1.22.8

require (
github.com/canonical/lxd v0.0.0-20241030172432-dee0d04b56ee
github.com/canonical/microcluster/v2 v2.0.4
github.com/canonical/lxd v0.0.0-20241106165613-4aab50ec18c3
github.com/canonical/microcluster/v2 v2.0.5
github.com/gorilla/mux v1.8.1
github.com/olekukonko/tablewriter v0.0.5
github.com/pkg/errors v0.9.1
Expand All @@ -16,10 +16,9 @@ require (
require (
github.com/Rican7/retry v0.3.1 // indirect
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/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 @@ -43,7 +42,7 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/zitadel/logging v0.6.1 // indirect
github.com/zitadel/oidc/v3 v3.32.0 // 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 c0e0362

Please sign in to comment.