Skip to content

Commit 40d59e1

Browse files
committed
chore: update dependencies
Rekres, update GHA, update Go dependencies. Fix linting issues. Signed-off-by: Andrey Smirnov <[email protected]>
1 parent 0fa3a47 commit 40d59e1

File tree

18 files changed

+214
-119
lines changed

18 files changed

+214
-119
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2022-11-21T12:24:35Z by kres latest.
3+
# Generated on 2025-09-01T12:59:11Z by kres 784fa1f.
44

55
*
66
!api
@@ -11,3 +11,4 @@
1111
!.golangci.yml
1212
!README.md
1313
!.markdownlint.json
14+
!hack/govulncheck.sh

.drone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
33
#
4-
# Generated on 2025-05-06T13:52:04Z by kres 1a0156b.
4+
# Generated on 2025-09-01T12:59:11Z by kres 784fa1f.
55

66
kind: pipeline
77
type: kubernetes
@@ -270,7 +270,7 @@ steps:
270270

271271
services:
272272
- name: docker
273-
image: docker:28.1-dind
273+
image: docker:28.3-dind
274274
entrypoint:
275275
- dockerd
276276
commands:

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ jobs:
1313
steps:
1414
-
1515
name: Checkout
16-
uses: actions/checkout@v4.2.2
16+
uses: actions/checkout@v5.0.0
1717
-
1818
name: Set up QEMU
1919
uses: docker/[email protected]
2020
-
2121
name: Set up Docker Buildx
22-
uses: docker/setup-buildx-action@v3.10.0
22+
uses: docker/setup-buildx-action@v3.11.1
2323
-
2424
name: Login to GitHub Container Registry
25-
uses: docker/login-action@v3.4.0
25+
uses: docker/login-action@v3.5.0
2626
if: github.ref == 'refs/heads/main'
2727
with:
2828
registry: ghcr.io
@@ -36,7 +36,7 @@ jobs:
3636
run: make unit-tests
3737
-
3838
name: codecov
39-
uses: codecov/codecov-action@v5.4.2
39+
uses: codecov/codecov-action@v5.5.0
4040
with:
4141
files: ./_out/coverage-unit-tests.txt
4242
-

.golangci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-05-06T13:52:04Z by kres 1a0156b.
3+
# Generated on 2025-09-01T12:59:11Z by kres 784fa1f.
44

55
version: "2"
66

@@ -49,6 +49,9 @@ linters:
4949
- perfsprint # complains about us using fmt.Sprintf in non-performance critical code, updating just kres took too long
5050
- musttag # seems to be broken - goes into imported libraries and reports issues there
5151
- nolintlint # gives false positives - disable until https://github.com/golangci/golangci-lint/issues/3228 is resolved
52+
- wsl # replaced by wsl_v5
53+
- noinlineerr
54+
- embeddedstructfieldcheck # fighting in many places with fieldalignment
5255
# all available settings of specific linters
5356
settings:
5457
cyclop:
@@ -90,6 +93,10 @@ linters:
9093
simple: true
9194
range-loops: true # Report preallocation suggestions on range loops, true by default
9295
for-loops: false # Report preallocation suggestions on for loops, false by default
96+
revive:
97+
rules:
98+
- name: var-naming # Complains about package names like "common"
99+
disabled: true
93100
rowserrcheck: { }
94101
testpackage: { }
95102
unparam:

Dockerfile

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# syntax = docker/dockerfile-upstream:1.15.1-labs
1+
# syntax = docker/dockerfile-upstream:1.17.1-labs
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2025-05-13T21:12:38Z by kres 5ad3e5f.
5+
# Generated on 2025-09-01T12:59:11Z by kres 784fa1f.
66

77
ARG TOOLCHAIN
88

9-
FROM ghcr.io/siderolabs/ca-certificates:v1.10.0 AS image-ca-certificates
9+
FROM ghcr.io/siderolabs/ca-certificates:v1.11.0 AS image-ca-certificates
1010

11-
FROM ghcr.io/siderolabs/fhs:v1.10.0 AS image-fhs
11+
FROM ghcr.io/siderolabs/fhs:v1.11.0 AS image-fhs
1212

1313
# runs markdownlint
14-
FROM docker.io/oven/bun:1.2.12-alpine AS lint-markdown
14+
FROM docker.io/oven/bun:1.2.20-alpine AS lint-markdown
1515
WORKDIR /src
16-
RUN bun i markdownlint-cli@0.44.0 [email protected]
16+
RUN bun i markdownlint-cli@0.45.0 [email protected]
1717
COPY .markdownlint.json .
1818
COPY ./README.md ./README.md
1919
RUN bunx markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules sentences-per-line .
@@ -27,7 +27,7 @@ ADD api/key_storage/key_storage.proto /api/key_storage/
2727

2828
# base toolchain image
2929
FROM --platform=${BUILDPLATFORM} ${TOOLCHAIN} AS toolchain
30-
RUN apk --update --no-cache add bash curl build-base protoc protobuf-dev
30+
RUN apk --update --no-cache add bash build-base curl jq protoc protobuf-dev
3131

3232
# build tools
3333
FROM --platform=${BUILDPLATFORM} toolchain AS tools
@@ -105,27 +105,40 @@ COPY .golangci.yml .
105105
ENV GOGC=50
106106
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint,id=runtime/root/.cache/golangci-lint,sharing=locked --mount=type=cache,target=/go/pkg,id=runtime/go/pkg golangci-lint run --config .golangci.yml
107107

108+
# runs golangci-lint fmt
109+
FROM base AS lint-golangci-lint-fmt-run
110+
WORKDIR /src
111+
COPY .golangci.yml .
112+
ENV GOGC=50
113+
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint,id=runtime/root/.cache/golangci-lint,sharing=locked --mount=type=cache,target=/go/pkg,id=runtime/go/pkg golangci-lint fmt --config .golangci.yml
114+
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint,id=runtime/root/.cache/golangci-lint,sharing=locked --mount=type=cache,target=/go/pkg,id=runtime/go/pkg golangci-lint run --fix --issues-exit-code 0 --config .golangci.yml
115+
108116
# runs govulncheck
109117
FROM base AS lint-govulncheck
110118
WORKDIR /src
111-
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=runtime/go/pkg govulncheck ./...
119+
COPY --chmod=0755 hack/govulncheck.sh ./hack/govulncheck.sh
120+
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=runtime/go/pkg ./hack/govulncheck.sh ./...
112121

113122
# runs unit-tests with race detector
114123
FROM base AS unit-tests-race
115124
WORKDIR /src
116125
ARG TESTPKGS
117-
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=runtime/go/pkg --mount=type=cache,target=/tmp,id=runtime/tmp CGO_ENABLED=1 go test -v -race -count 1 -p 1 ${TESTPKGS}
126+
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=runtime/go/pkg --mount=type=cache,target=/tmp,id=runtime/tmp CGO_ENABLED=1 go test -race -p 1 ${TESTPKGS}
118127

119128
# runs unit-tests
120129
FROM base AS unit-tests-run
121130
WORKDIR /src
122131
ARG TESTPKGS
123-
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=runtime/go/pkg --mount=type=cache,target=/tmp,id=runtime/tmp go test -v -covermode=atomic -coverprofile=coverage.txt -coverpkg=${TESTPKGS} -count 1 -p 1 ${TESTPKGS}
132+
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=runtime/go/pkg --mount=type=cache,target=/tmp,id=runtime/tmp go test -covermode=atomic -coverprofile=coverage.txt -coverpkg=${TESTPKGS} -p 1 ${TESTPKGS}
124133

125134
# cleaned up specs and compiled versions
126135
FROM scratch AS generate
127136
COPY --from=proto-compile /api/ /api/
128137

138+
# clean golangci-lint fmt output
139+
FROM scratch AS lint-golangci-lint-fmt
140+
COPY --from=lint-golangci-lint-fmt-run /src .
141+
129142
FROM scratch AS unit-tests
130143
COPY --from=unit-tests-run /src/coverage.txt /coverage-unit-tests.txt
131144

Makefile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-05-13T21:12:38Z by kres 5ad3e5f.
3+
# Generated on 2025-09-01T12:59:11Z by kres 784fa1f.
44

55
# common variables
66

@@ -17,21 +17,21 @@ WITH_RACE ?= false
1717
REGISTRY ?= ghcr.io
1818
USERNAME ?= cosi-project
1919
REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
20-
PROTOBUF_GO_VERSION ?= 1.36.6
20+
PROTOBUF_GO_VERSION ?= 1.36.7
2121
GRPC_GO_VERSION ?= 1.5.1
22-
GRPC_GATEWAY_VERSION ?= 2.26.3
22+
GRPC_GATEWAY_VERSION ?= 2.27.1
2323
VTPROTOBUF_VERSION ?= 0.6.0
24-
GOIMPORTS_VERSION ?= 0.33.0
25-
GOMOCK_VERSION ?= 0.5.2
26-
DEEPCOPY_VERSION ?= v0.5.6
27-
GOLANGCILINT_VERSION ?= v2.1.6
24+
GOIMPORTS_VERSION ?= 0.36.0
25+
GOMOCK_VERSION ?= 0.6.0
26+
DEEPCOPY_VERSION ?= v0.5.8
27+
GOLANGCILINT_VERSION ?= v2.4.0
2828
GOFUMPT_VERSION ?= v0.8.0
29-
GO_VERSION ?= 1.24.3
29+
GO_VERSION ?= 1.25.0
3030
GO_BUILDFLAGS ?=
3131
GO_LDFLAGS ?=
3232
CGO_ENABLED ?= 0
3333
GOTOOLCHAIN ?= local
34-
GOEXPERIMENT ?= synctest
34+
GOEXPERIMENT ?=
3535
TESTPKGS ?= ./...
3636
KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
3737
CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest
@@ -72,7 +72,7 @@ COMMON_ARGS += --build-arg=DEEPCOPY_VERSION="$(DEEPCOPY_VERSION)"
7272
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
7373
COMMON_ARGS += --build-arg=GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
7474
COMMON_ARGS += --build-arg=TESTPKGS="$(TESTPKGS)"
75-
TOOLCHAIN ?= docker.io/golang:1.24-alpine
75+
TOOLCHAIN ?= docker.io/golang:1.25-alpine
7676

7777
# help menu
7878

@@ -169,6 +169,9 @@ generate: ## Generate .proto definitions.
169169
lint-golangci-lint: ## Runs golangci-lint linter.
170170
@$(MAKE) target-$@
171171

172+
lint-golangci-lint-fmt: ## Runs golangci-lint formatter and tries to fix issues automatically.
173+
@$(MAKE) local-$@ DEST=.
174+
172175
lint-gofumpt: ## Runs gofumpt linter.
173176
@$(MAKE) target-$@
174177

cmd/runtime/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func run() error {
7272
}
7373
}
7474

75-
l, err := net.Listen(network, address)
75+
l, err := (&net.ListenConfig{}).Listen(ctx, network, address)
7676
if err != nil {
7777
return fmt.Errorf("failed to listen on network address: %w", err)
7878
}

go.mod

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,30 @@ go 1.24.0
77
replace gopkg.in/yaml.v3 => github.com/unix4ever/yaml v0.0.0-20220527175918-f17b0f05cf2c
88

99
require (
10-
github.com/ProtonMail/gopenpgp/v2 v2.8.3
10+
github.com/ProtonMail/gopenpgp/v2 v2.9.0
1111
github.com/cenkalti/backoff/v4 v4.3.0
1212
github.com/gertd/go-pluralize v0.2.1
13-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3
13+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2
1414
github.com/hashicorp/go-multierror v1.1.1
1515
github.com/klauspost/compress v1.18.0
1616
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10
17-
github.com/siderolabs/gen v0.8.1
17+
github.com/siderolabs/gen v0.8.5
1818
github.com/siderolabs/go-pointer v1.0.1
1919
github.com/siderolabs/go-retry v0.3.3
20-
github.com/siderolabs/protoenc v0.2.2
21-
github.com/stretchr/testify v1.10.0
22-
go.etcd.io/bbolt v1.4.0
20+
github.com/siderolabs/protoenc v0.2.3
21+
github.com/stretchr/testify v1.11.1
22+
go.etcd.io/bbolt v1.4.3
2323
go.uber.org/goleak v1.3.0
2424
go.uber.org/zap v1.27.0
25-
golang.org/x/sync v0.14.0
26-
golang.org/x/time v0.11.0
27-
google.golang.org/grpc v1.72.0
28-
google.golang.org/protobuf v1.36.6
25+
golang.org/x/sync v0.16.0
26+
golang.org/x/time v0.12.0
27+
google.golang.org/grpc v1.75.0
28+
google.golang.org/protobuf v1.36.8
2929
gopkg.in/yaml.v3 v3.0.1
3030
)
3131

3232
require (
33-
github.com/ProtonMail/go-crypto v1.2.0 // indirect
33+
github.com/ProtonMail/go-crypto v1.3.0 // indirect
3434
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f // indirect
3535
github.com/cloudflare/circl v1.6.1 // indirect
3636
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -39,12 +39,12 @@ require (
3939
github.com/pmezard/go-difflib v1.0.0 // indirect
4040
github.com/rogpeppe/go-internal v1.14.1 // indirect
4141
go.uber.org/multierr v1.11.0 // indirect
42-
golang.org/x/crypto v0.38.0 // indirect
43-
golang.org/x/net v0.40.0 // indirect
42+
golang.org/x/crypto v0.39.0 // indirect
43+
golang.org/x/net v0.41.0 // indirect
4444
golang.org/x/sys v0.33.0 // indirect
45-
golang.org/x/text v0.25.0 // indirect
46-
google.golang.org/genproto/googleapis/api v0.0.0-20250512202823-5a2f75b736a9 // indirect
47-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250512202823-5a2f75b736a9 // indirect
45+
golang.org/x/text v0.28.0 // indirect
46+
google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c // indirect
47+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect
4848
)
4949

5050
retract (

0 commit comments

Comments
 (0)