Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gomod updates #548

Merged
merged 9 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
goreleaser:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version-file: 'go.mod'

- name: Import GPG key
id: import_gpg
Expand Down
50 changes: 17 additions & 33 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version:
- "1.22"
channel:
- 5.0/stable
- 5.0/edge
Expand All @@ -38,14 +36,14 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version-file: 'go.mod'

- name: Setup LXD from ${{ matrix.channel }} channel
run: |
sudo snap refresh lxd --channel=${{ matrix.channel }}
sudo snap install lxd --channel=${{ matrix.channel }}
sudo lxd waitready --timeout 60
sudo lxd init --auto --network-port=8443 --network-address=localhost
sudo chmod 777 /var/snap/lxd/common/lxd/unix.socket
Expand All @@ -57,24 +55,22 @@ jobs:
if snap info lxd --verbose | grep -qxE 'base:\s+core20'; then
echo "WARN: Using external lvm command to workaround bug in core20" >&2
sudo snap set lxd lvm.external=true
sudo snap restart --reload lxd
sudo systemctl restart snap.lxd.daemon.service
fi

# Add HTTPS remote.
lxc remote add localhost "$(lxc config trust add --name lxd-terraform-provider --quiet)"

- name: Download minio/mc
uses: canonical/lxd/.github/actions/download-minio@main
if: ${{ matrix.channel != '5.0/stable' && matrix.test != '5.0/edge' }}

- name: Configure MinIO
if: ${{ matrix.channel != '5.0/stable' && matrix.test != '5.0/edge' }}
run: |
arch=$(dpkg --print-architecture)
mkdir -p /opt/minio

# Download the minio server.
curl -sSfL "https://dl.min.io/server/minio/release/linux-${arch}/minio" --output "/opt/minio/minio"
chmod +x "/opt/minio/minio"

# Download the minio client.
curl -sSfL "https://dl.min.io/client/mc/release/linux-${arch}/mc" --output "/opt/minio/mc"
chmod +x "/opt/minio/mc"
mv "$(go env GOPATH)/bin/minio" /opt/minio/
mv "$(go env GOPATH)/bin/mc" /opt/minio/

# Set the snap config key for minio and reload LXD to have it take effect.
sudo snap set lxd minio.path=/opt/minio
Expand Down Expand Up @@ -104,39 +100,27 @@ jobs:
- run: make test

build-platforms:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
go-version:
- "1.22"

runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version-file: 'go.mod'

- name: Run GoReleaser in build mode to test all release platforms
uses: goreleaser/goreleaser-action@v6
with:
args: build --snapshot

check-lint:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
go-version:
- "1.22"

runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version-file: 'go.mod'

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ static-analysis:

.PHONY: update-gomod
update-gomod:
$(GO) get -t -v -d -u ./...
$(GO) mod tidy --go=1.22.3
$(GO) get -t -v -u ./...
$(GO) mod tidy --go=1.23.3
Copy link
Member

@MusicDin MusicDin Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that flag to enforce specific go version? Do we need that flag, considering go version is set in go.mod file? Just asking, as maybe we can have go version only in a single place

$(GO) get toolchain@none
@echo "Dependencies updated"

Expand Down
54 changes: 27 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/terraform-lxd/terraform-provider-lxd

go 1.22.4
go 1.23.3

require (
github.com/canonical/lxd v0.0.0-20240625120043-9728e825ad0f
github.com/canonical/lxd v0.0.0-20241210113941-76ed93147048
github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0
github.com/hashicorp/go-version v1.7.0
github.com/hashicorp/terraform-plugin-framework v1.13.0
Expand All @@ -18,14 +18,14 @@ require (
)

require (
github.com/ProtonMail/go-crypto v1.1.0-alpha.3-proton // indirect
github.com/ProtonMail/go-crypto v1.1.3 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/cloudflare/circl v1.3.9 // indirect
github.com/cloudflare/circl v1.5.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 // indirect
github.com/go-jose/go-jose/v4 v4.0.2 // indirect
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
Expand All @@ -49,7 +49,7 @@ require (
github.com/hashicorp/terraform-json v0.23.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand All @@ -61,33 +61,33 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/muhlemmer/gu v0.3.1 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/pkg/sftp v1.13.6 // indirect
github.com/pkg/xattr v0.4.9 // 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/sirupsen/logrus v1.9.3 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.15.0 // indirect
github.com/zitadel/logging v0.6.0 // indirect
github.com/zitadel/oidc/v3 v3.25.1 // indirect
github.com/zclconf/go-cty v1.15.1 // indirect
github.com/zitadel/logging v0.6.1 // indirect
github.com/zitadel/oidc/v3 v3.33.1 // indirect
github.com/zitadel/schema v1.3.0 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/term v0.26.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/tools v0.22.0 // indirect
go.opentelemetry.io/otel v1.32.0 // indirect
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.32.0 // indirect
golang.org/x/crypto v0.30.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.28.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect
google.golang.org/grpc v1.68.1 // indirect
google.golang.org/protobuf v1.35.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading