From d6eb4bea78fd8d8c964b7d91f4c4931c5725f924 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 16 Apr 2024 10:40:53 +0200 Subject: [PATCH 1/4] chore(setup): use go v1.22 --- .github/workflows/debug.yml | 2 +- .github/workflows/govulncheck.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release-umee.yml | 6 +++--- .github/workflows/simulations.yml | 10 +++++----- .github/workflows/tests.yml | 8 ++++---- contrib/images/umee.e2e-static.dockerfile | 4 ++-- contrib/images/umee.e2e.dockerfile | 2 +- contrib/images/umeed.dockerfile | 2 +- contrib/scripts/go-mod-tidy-all.sh | 2 +- go.mod | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index f6d1ce4e27..9fe37bfbc9 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" cache: true - uses: actions/checkout@v4 diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index 51b8a277f8..d02d78055b 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -26,5 +26,5 @@ jobs: id: govulncheck if: env.GIT_DIFF with: - go-version-input: 1.21 + go-version-input: 1.22 go-package: ./... diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 429a1985a6..c4d9e5e71b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/setup-go@v5 if: env.GIT_DIFF with: - go-version: "1.21" + go-version: "1.22" cache: true - name: golangci-lint main diff --git a/.github/workflows/release-umee.yml b/.github/workflows/release-umee.yml index 4025e78c8e..a6e35f04d5 100644 --- a/.github/workflows/release-umee.yml +++ b/.github/workflows/release-umee.yml @@ -22,18 +22,18 @@ jobs: fetch-depth: 0 - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" cache: true - name: Set Env run: echo "TM_VERSION=$(go list -m github.com/cometbft/cometbft | sed 's:.* ::')" >> $GITHUB_ENV # useful to test builds. However will require to add "push" rule to the "on" section - - name: generate and update swagger docs + - name: generate and update swagger docs run: | make proto-swagger-gen make proto-update-swagger-docs - + - name: goreleaser test-build uses: goreleaser/goreleaser-action@v5 if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Enable:ReleaseBuild') diff --git a/.github/workflows/simulations.yml b/.github/workflows/simulations.yml index d7af927852..3670a43900 100644 --- a/.github/workflows/simulations.yml +++ b/.github/workflows/simulations.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - name: Install runsim run: export GO111MODULE="on" && go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -40,7 +40,7 @@ jobs: - uses: actions/setup-go@v5 if: env.GIT_DIFF with: - go-version: "1.21" + go-version: "1.22" cache: true - name: Test application non-determinism if: env.GIT_DIFF @@ -65,7 +65,7 @@ jobs: - uses: actions/setup-go@v5 if: env.GIT_DIFF with: - go-version: "1.21" + go-version: "1.22" cache: true - uses: actions/cache@v4 if: env.GIT_DIFF @@ -95,7 +95,7 @@ jobs: - uses: actions/setup-go@v5 if: env.GIT_DIFF with: - go-version: "1.21" + go-version: "1.22" cache: true - uses: actions/cache@v4 if: env.GIT_DIFF @@ -124,7 +124,7 @@ jobs: - uses: actions/setup-go@v5 if: env.GIT_DIFF with: - go-version: "1.21" + go-version: "1.22" cache: true - uses: actions/cache@v4 if: env.GIT_DIFF diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 917de0653b..92ade0ae7b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/cache@v4 id: cache-go-tparse with: @@ -52,7 +52,7 @@ jobs: if: steps.cache-binaries.outputs.cache-hit != 'true' && env.GIT_DIFF uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" cache: true env: GOOS: ${{ matrix.targetos }} @@ -78,7 +78,7 @@ jobs: - uses: actions/setup-go@v5 if: env.GIT_DIFF with: - go-version: "1.21" + go-version: "1.22" cache: true - name: Test and Create Coverage Report if: env.GIT_DIFF @@ -110,7 +110,7 @@ jobs: - uses: actions/setup-go@v5 if: env.GIT_DIFF with: - go-version: "1.21" + go-version: "1.22" cache: true - name: Test E2E diff --git a/contrib/images/umee.e2e-static.dockerfile b/contrib/images/umee.e2e-static.dockerfile index 3f802960da..7b6259277e 100644 --- a/contrib/images/umee.e2e-static.dockerfile +++ b/contrib/images/umee.e2e-static.dockerfile @@ -2,7 +2,7 @@ # Creates static binaries, by building from the latest version of: # umeed, price-feeder. -FROM golang:1.21-alpine3.18 AS builder +FROM golang:1.22-alpine3.19 AS builder ENV PACKAGES make git gcc linux-headers build-base curl RUN apk add --no-cache $PACKAGES @@ -25,7 +25,7 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make install && \ ## Prepare the final clear binary -FROM alpine:3.18 +FROM alpine:3.19 EXPOSE 26656 26657 1317 9090 7171 ENTRYPOINT ["umeed", "start"] diff --git a/contrib/images/umee.e2e.dockerfile b/contrib/images/umee.e2e.dockerfile index 216a088fd8..4a1bf60c90 100644 --- a/contrib/images/umee.e2e.dockerfile +++ b/contrib/images/umee.e2e.dockerfile @@ -1,7 +1,7 @@ # Docker for e2e testing # Creates dynamic binaries, by building from the latest version of umeed -FROM golang:1.21-bookworm AS builder +FROM golang:1.22-bookworm AS builder ARG EXPERIMENTAL=true ## Download go module dependencies for umeed diff --git a/contrib/images/umeed.dockerfile b/contrib/images/umeed.dockerfile index 3ab525562d..92228b364b 100644 --- a/contrib/images/umeed.dockerfile +++ b/contrib/images/umeed.dockerfile @@ -1,7 +1,7 @@ # Stage-1: build # We use Debian Bullseye rather then Alpine because Alpine has problem building libwasmvm # - requires to download libwasmvm_muslc from external source. Build with glibc is straightforward. -FROM golang:1.21-bookworm AS builder +FROM golang:1.22-bookworm AS builder WORKDIR /src/ # optimization: if go.sum didn't change, docker will use cached image diff --git a/contrib/scripts/go-mod-tidy-all.sh b/contrib/scripts/go-mod-tidy-all.sh index 833e9c7ea6..121b7da0eb 100755 --- a/contrib/scripts/go-mod-tidy-all.sh +++ b/contrib/scripts/go-mod-tidy-all.sh @@ -5,5 +5,5 @@ set -euo pipefail for modfile in $(find . -name go.mod); do echo "Updating $modfile" DIR=$(dirname $modfile) - (cd $DIR; go mod tidy --compat=1.21) + (cd $DIR; go mod tidy --compat=1.22) done diff --git a/go.mod b/go.mod index fd6bbb0b4f..f1c129ed07 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/umee-network/umee/v6 -go 1.21 +go 1.22 require ( cosmossdk.io/api v0.3.1 From ef4085b3f72e1e61771fb002a345e4a16e2ba38d Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 16 Apr 2024 10:50:21 +0200 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- contrib/scripts/go-mod-tidy-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/scripts/go-mod-tidy-all.sh b/contrib/scripts/go-mod-tidy-all.sh index 121b7da0eb..daebdaa1df 100755 --- a/contrib/scripts/go-mod-tidy-all.sh +++ b/contrib/scripts/go-mod-tidy-all.sh @@ -4,6 +4,6 @@ set -euo pipefail for modfile in $(find . -name go.mod); do echo "Updating $modfile" - DIR=$(dirname $modfile) - (cd $DIR; go mod tidy --compat=1.22) + DIR=$(dirname "$modfile") + (cd "$DIR"; go mod tidy --compat=1.22) done From 7d9e14fe1a48bc1c11ade32cb603c2328dd6e0b0 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 16 Apr 2024 11:09:42 +0200 Subject: [PATCH 3/4] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1641b17f4..cbd47fa5a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements - [2474](https://github.com/umee-network/umee/pull/2474) (proto) add `gogo.messagename_all` option to all messages. +- [2494](https://github.com/umee-network/umee/pull/2494) Use go 1.22 + + ### Bug Fixes From 1de6a99c4c1a32979847614df0dfc08bc528b8fc Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 16 Apr 2024 11:11:51 +0200 Subject: [PATCH 4/4] formatting --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbd47fa5a4..65c6857258 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,8 +55,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ - [2474](https://github.com/umee-network/umee/pull/2474) (proto) add `gogo.messagename_all` option to all messages. - [2494](https://github.com/umee-network/umee/pull/2494) Use go 1.22 - - ### Bug Fixes - [2473](https://github.com/umee-network/umee/pull/2473) Correct x/ugov Amino registration for x/ugov messages (they don't have MessageName option).