Skip to content

Commit

Permalink
Upgrade to golang 1.21, misc cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottGarman committed Oct 18, 2023
1 parent da07904 commit 880ec4a
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/container-scan-trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'

- name: Build go binary
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
-
name: install cosign
uses: sigstore/cosign-installer@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'

- name: Install cockroach binary
run: curl https://binaries.cockroachdb.com/cockroach-v21.1.7.linux-amd64.tgz | tar -xz && sudo cp -i cockroach-v21.1.7.linux-amd64/cockroach /usr/local/bin/
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.1
version: v1.54.2
args: --timeout=5m
skip-pkg-cache: true

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20 as builder
FROM golang:1.21 as builder

# Create and change to the app directory.
WORKDIR /app
Expand All @@ -11,7 +11,7 @@ RUN go mod download
# Copy local code to the container image.
COPY . ./

RUN go mod tidy -go=1.20
RUN go mod tidy -go=1.21

# Build the binary.
# -mod=readonly ensures immutable go.mod and go.sum in container builds.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ clean: docker-clean

vendor:
@go mod download
@go mod tidy -go=1.20
@go mod tidy -go=1.21

docker-up:
@docker-compose -f quickstart.yml up -d crdb
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.hollow.sh/metadataservice

go 1.20
go 1.21

require (
github.com/cockroachdb/cockroach-go/v2 v2.3.5
Expand Down
25 changes: 25 additions & 0 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.9"

services:
metadataservice:
image: ghcr.io/metal-toolbox/hollow-metadaaservice:v0.0.26
image: ghcr.io/metal-toolbox/hollow-metadaaservice:v0.0.27
depends_on:
crdb:
condition: service_healthy
Expand All @@ -18,7 +18,7 @@ services:
- metadataservice

metadataservice-migrate:
image: ghcr.io/metal-toolbox/hollow-metadataservice:v0.0.26
image: ghcr.io/metal-toolbox/hollow-metadataservice:v0.0.27
command:
migrate up
depends_on:
Expand All @@ -31,7 +31,7 @@ services:
- metadataservice

crdb:
image: cockroachdb/cockroach:latest-v22.2
image: cockroachdb/cockroach:latest-v23.1
volumes:
- db:/cockroach/cockroach-data
command: start-single-node --insecure
Expand Down

0 comments on commit 880ec4a

Please sign in to comment.