Skip to content

Commit 9e34547

Browse files
committed
feat: bump dependencies
Update etcd to 3.5.22. Rekres, fix linting issues. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
1 parent 0b45191 commit 9e34547

10 files changed

Lines changed: 234 additions & 226 deletions

File tree

.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-01-16T18:10:29Z by kres 3b3f992.
4+
# Generated on 2025-04-22T10:59:51Z by kres fd5cab0.
55

66
kind: pipeline
77
type: kubernetes
@@ -174,7 +174,7 @@ steps:
174174

175175
services:
176176
- name: docker
177-
image: docker:27.5-dind
177+
image: docker:28.0-dind
178178
entrypoint:
179179
- dockerd
180180
commands:

.golangci.yml

Lines changed: 111 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,32 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-01-16T18:10:29Z by kres 3b3f992.
3+
# Generated on 2025-04-22T10:59:51Z by kres fd5cab0.
4+
5+
version: "2"
46

57
# options for analysis running
68
run:
7-
timeout: 10m
9+
modules-download-mode: readonly
810
issues-exit-code: 1
911
tests: true
10-
build-tags: [ ]
11-
modules-download-mode: readonly
1212

1313
# output configuration options
1414
output:
1515
formats:
16-
- format: colored-line-number
16+
text:
1717
path: stdout
18-
print-issued-lines: true
19-
print-linter-name: true
18+
print-issued-lines: true
19+
print-linter-name: true
2020
path-prefix: ""
2121

22-
# all available settings of specific linters
23-
linters-settings:
24-
dogsled:
25-
max-blank-identifiers: 2
26-
dupl:
27-
threshold: 150
28-
errcheck:
29-
check-type-assertions: true
30-
check-blank: true
31-
exhaustive:
32-
default-signifies-exhaustive: false
33-
gci:
34-
sections:
35-
- standard # Standard section: captures all standard packages.
36-
- default # Default section: contains all imports that could not be matched to another section type.
37-
- localmodule # Imports from the same module.
38-
gocognit:
39-
min-complexity: 30
40-
nestif:
41-
min-complexity: 5
42-
goconst:
43-
min-len: 3
44-
min-occurrences: 3
45-
gocritic:
46-
disabled-checks: [ ]
47-
gocyclo:
48-
min-complexity: 20
49-
godot:
50-
scope: declarations
51-
gofmt:
52-
simplify: true
53-
gomodguard: { }
54-
govet:
55-
enable-all: true
56-
lll:
57-
line-length: 200
58-
tab-width: 4
59-
misspell:
60-
locale: US
61-
ignore-words: [ ]
62-
nakedret:
63-
max-func-lines: 30
64-
prealloc:
65-
simple: true
66-
range-loops: true # Report preallocation suggestions on range loops, true by default
67-
for-loops: false # Report preallocation suggestions on for loops, false by default
68-
nolintlint:
69-
allow-unused: false
70-
allow-no-explanation: [ ]
71-
require-explanation: false
72-
require-specific: true
73-
rowserrcheck: { }
74-
testpackage: { }
75-
unparam:
76-
check-exported: false
77-
unused:
78-
local-variables-are-used: false
79-
whitespace:
80-
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
81-
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
82-
wsl:
83-
strict-append: true
84-
allow-assign-and-call: true
85-
allow-multiline-assign: true
86-
allow-cuddle-declarations: false
87-
allow-trailing-comment: false
88-
force-case-trailing-whitespace: 0
89-
force-err-cuddling: false
90-
allow-separated-leading-comment: false
91-
gofumpt:
92-
extra-rules: false
93-
cyclop:
94-
# the maximal code complexity to report
95-
max-complexity: 20
96-
depguard:
97-
rules:
98-
prevent_unmaintained_packages:
99-
list-mode: lax # allow unless explicitly denied
100-
files:
101-
- $all
102-
deny:
103-
- pkg: io/ioutil
104-
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
10522

10623
linters:
107-
enable-all: true
108-
disable-all: false
109-
fast: false
24+
default: all
11025
disable:
11126
- exhaustruct
11227
- err113
11328
- forbidigo
29+
- funcorder
11430
- funlen
11531
- gochecknoglobals
11632
- gochecknoinits
@@ -131,20 +47,113 @@ linters:
13147
- testifylint # complains about our assert recorder and has a number of false positives for assert.Greater(t, thing, 1)
13248
- protogetter # complains about us using Value field on typed spec, instead of GetValue which has a different signature
13349
- perfsprint # complains about us using fmt.Sprintf in non-performance critical code, updating just kres took too long
134-
- goimports # same as gci
13550
- musttag # seems to be broken - goes into imported libraries and reports issues there
136-
- exportloopref # WARN The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar.
51+
# all available settings of specific linters
52+
settings:
53+
cyclop:
54+
# the maximal code complexity to report
55+
max-complexity: 20
56+
dogsled:
57+
max-blank-identifiers: 2
58+
dupl:
59+
threshold: 150
60+
errcheck:
61+
check-type-assertions: true
62+
check-blank: true
63+
exhaustive:
64+
default-signifies-exhaustive: false
65+
gocognit:
66+
min-complexity: 30
67+
nestif:
68+
min-complexity: 5
69+
goconst:
70+
min-len: 3
71+
min-occurrences: 3
72+
gocritic:
73+
disabled-checks: [ ]
74+
gocyclo:
75+
min-complexity: 20
76+
godot:
77+
scope: declarations
78+
gomodguard: { }
79+
govet:
80+
enable-all: true
81+
lll:
82+
line-length: 200
83+
tab-width: 4
84+
misspell:
85+
locale: US
86+
nakedret:
87+
max-func-lines: 30
88+
prealloc:
89+
simple: true
90+
range-loops: true # Report preallocation suggestions on range loops, true by default
91+
for-loops: false # Report preallocation suggestions on for loops, false by default
92+
nolintlint:
93+
allow-unused: false
94+
allow-no-explanation: [ ]
95+
require-explanation: false
96+
require-specific: true
97+
rowserrcheck: { }
98+
testpackage: { }
99+
unparam:
100+
check-exported: false
101+
unused:
102+
local-variables-are-used: false
103+
whitespace:
104+
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
105+
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
106+
wsl:
107+
strict-append: true
108+
allow-assign-and-call: true
109+
allow-multiline-assign: true
110+
allow-trailing-comment: false
111+
force-case-trailing-whitespace: 0
112+
allow-separated-leading-comment: false
113+
allow-cuddle-declarations: false
114+
force-err-cuddling: false
115+
depguard:
116+
rules:
117+
prevent_unmaintained_packages:
118+
list-mode: lax # allow unless explicitly denied
119+
files:
120+
- $all
121+
deny:
122+
- pkg: io/ioutil
123+
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
137124

125+
exclusions:
126+
generated: lax
127+
paths:
128+
- third_party$
129+
- builtin$
130+
- examples$
138131
issues:
139-
exclude: [ ]
140-
exclude-rules: [ ]
141-
exclude-use-default: false
142-
exclude-case-sensitive: false
143132
max-issues-per-linter: 10
144133
max-same-issues: 3
145-
new: false
146134
uniq-by-line: true
135+
new: false
147136

148137
severity:
149-
default-severity: error
150-
case-sensitive: false
138+
default: error
139+
formatters:
140+
enable:
141+
- gci
142+
- gofmt
143+
- gofumpt
144+
settings:
145+
gci:
146+
sections:
147+
- standard
148+
- default
149+
- localmodule
150+
gofmt:
151+
simplify: true
152+
gofumpt:
153+
extra-rules: false
154+
exclusions:
155+
generated: lax
156+
paths:
157+
- third_party$
158+
- builtin$
159+
- examples$

Dockerfile

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# syntax = docker/dockerfile-upstream:1.12.1-labs
1+
# syntax = docker/dockerfile-upstream:1.14.1-labs
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2025-01-16T18:10:29Z by kres 3b3f992.
5+
# Generated on 2025-04-22T10:59:51Z by kres fd5cab0.
66

77
ARG TOOLCHAIN
88

99
# cleaned up specs and compiled versions
1010
FROM scratch AS generate
1111

1212
# runs markdownlint
13-
FROM docker.io/oven/bun:1.1.43-alpine AS lint-markdown
13+
FROM docker.io/oven/bun:1.2.9-alpine AS lint-markdown
1414
WORKDIR /src
15-
RUN bun i markdownlint-cli@0.43.0 sentences-per-line@0.3.0
15+
RUN bun i markdownlint-cli@0.44.0 sentences-per-line@0.3.0
1616
COPY .markdownlint.json .
1717
COPY ./README.md ./README.md
1818
RUN bunx markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules sentences-per-line .
@@ -32,12 +32,12 @@ ARG GOEXPERIMENT
3232
ENV GOEXPERIMENT=${GOEXPERIMENT}
3333
ENV GOPATH=/go
3434
ARG DEEPCOPY_VERSION
35-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
35+
RUN --mount=type=cache,target=/root/.cache/go-build,id=state-etcd/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=state-etcd/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
3636
&& mv /go/bin/deep-copy /bin/deep-copy
3737
ARG GOLANGCILINT_VERSION
38-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCILINT_VERSION} \
38+
RUN --mount=type=cache,target=/root/.cache/go-build,id=state-etcd/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=state-etcd/go/pkg go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${GOLANGCILINT_VERSION} \
3939
&& mv /go/bin/golangci-lint /bin/golangci-lint
40-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
40+
RUN --mount=type=cache,target=/root/.cache/go-build,id=state-etcd/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=state-etcd/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
4141
&& mv /go/bin/govulncheck /bin/govulncheck
4242
ARG GOFUMPT_VERSION
4343
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
@@ -49,10 +49,10 @@ WORKDIR /src
4949
COPY go.mod go.mod
5050
COPY go.sum go.sum
5151
RUN cd .
52-
RUN --mount=type=cache,target=/go/pkg go mod download
53-
RUN --mount=type=cache,target=/go/pkg go mod verify
52+
RUN --mount=type=cache,target=/go/pkg,id=state-etcd/go/pkg go mod download
53+
RUN --mount=type=cache,target=/go/pkg,id=state-etcd/go/pkg go mod verify
5454
COPY ./pkg ./pkg
55-
RUN --mount=type=cache,target=/go/pkg go list -mod=readonly all >/dev/null
55+
RUN --mount=type=cache,target=/go/pkg,id=state-etcd/go/pkg go list -mod=readonly all >/dev/null
5656

5757
# runs gofumpt
5858
FROM base AS lint-gofumpt
@@ -63,25 +63,24 @@ FROM base AS lint-golangci-lint
6363
WORKDIR /src
6464
COPY .golangci.yml .
6565
ENV GOGC=50
66-
RUN golangci-lint config verify --config .golangci.yml
67-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint --mount=type=cache,target=/go/pkg golangci-lint run --config .golangci.yml
66+
RUN --mount=type=cache,target=/root/.cache/go-build,id=state-etcd/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint,id=state-etcd/root/.cache/golangci-lint,sharing=locked --mount=type=cache,target=/go/pkg,id=state-etcd/go/pkg golangci-lint run --config .golangci.yml
6867

6968
# runs govulncheck
7069
FROM base AS lint-govulncheck
7170
WORKDIR /src
72-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg govulncheck ./...
71+
RUN --mount=type=cache,target=/root/.cache/go-build,id=state-etcd/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=state-etcd/go/pkg govulncheck ./...
7372

7473
# runs unit-tests with race detector
7574
FROM base AS unit-tests-race
7675
WORKDIR /src
7776
ARG TESTPKGS
78-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg --mount=type=cache,target=/tmp CGO_ENABLED=1 go test -v -race -count 1 ${TESTPKGS}
77+
RUN --mount=type=cache,target=/root/.cache/go-build,id=state-etcd/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=state-etcd/go/pkg --mount=type=cache,target=/tmp,id=state-etcd/tmp CGO_ENABLED=1 go test -v -race -count 1 ${TESTPKGS}
7978

8079
# runs unit-tests
8180
FROM base AS unit-tests-run
8281
WORKDIR /src
8382
ARG TESTPKGS
84-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg --mount=type=cache,target=/tmp go test -v -covermode=atomic -coverprofile=coverage.txt -coverpkg=${TESTPKGS} -count 1 ${TESTPKGS}
83+
RUN --mount=type=cache,target=/root/.cache/go-build,id=state-etcd/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=state-etcd/go/pkg --mount=type=cache,target=/tmp,id=state-etcd/tmp go test -v -covermode=atomic -coverprofile=coverage.txt -coverpkg=${TESTPKGS} -count 1 ${TESTPKGS}
8584

8685
FROM scratch AS unit-tests
8786
COPY --from=unit-tests-run /src/coverage.txt /coverage-unit-tests.txt

Makefile

Lines changed: 11 additions & 8 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-02-04T17:17:43Z by kres 987bf4d.
3+
# Generated on 2025-04-22T10:59:51Z by kres fd5cab0.
44

55
# common variables
66

@@ -17,19 +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.2
20+
PROTOBUF_GO_VERSION ?= 1.36.6
2121
GRPC_GO_VERSION ?= 1.5.1
22-
GRPC_GATEWAY_VERSION ?= 2.25.1
22+
GRPC_GATEWAY_VERSION ?= 2.26.3
2323
VTPROTOBUF_VERSION ?= 0.6.0
24-
GOIMPORTS_VERSION ?= 0.29.0
24+
GOIMPORTS_VERSION ?= 0.32.0
25+
GOMOCK_VERSION ?= 0.5.1
2526
DEEPCOPY_VERSION ?= v0.5.6
26-
GOLANGCILINT_VERSION ?= v1.63.4
27-
GOFUMPT_VERSION ?= v0.7.0
28-
GO_VERSION ?= 1.23.5
27+
GOLANGCILINT_VERSION ?= v2.1.1
28+
GOFUMPT_VERSION ?= v0.8.0
29+
GO_VERSION ?= 1.24.2
2930
GO_BUILDFLAGS ?=
3031
GO_LDFLAGS ?=
3132
CGO_ENABLED ?= 0
3233
GOTOOLCHAIN ?= local
34+
GOEXPERIMENT ?= synctest
3335
TESTPKGS ?= ./...
3436
KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
3537
CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest
@@ -65,11 +67,12 @@ COMMON_ARGS += --build-arg=GRPC_GO_VERSION="$(GRPC_GO_VERSION)"
6567
COMMON_ARGS += --build-arg=GRPC_GATEWAY_VERSION="$(GRPC_GATEWAY_VERSION)"
6668
COMMON_ARGS += --build-arg=VTPROTOBUF_VERSION="$(VTPROTOBUF_VERSION)"
6769
COMMON_ARGS += --build-arg=GOIMPORTS_VERSION="$(GOIMPORTS_VERSION)"
70+
COMMON_ARGS += --build-arg=GOMOCK_VERSION="$(GOMOCK_VERSION)"
6871
COMMON_ARGS += --build-arg=DEEPCOPY_VERSION="$(DEEPCOPY_VERSION)"
6972
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
7073
COMMON_ARGS += --build-arg=GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
7174
COMMON_ARGS += --build-arg=TESTPKGS="$(TESTPKGS)"
72-
TOOLCHAIN ?= docker.io/golang:1.23-alpine
75+
TOOLCHAIN ?= docker.io/golang:1.24-alpine
7376

7477
# help menu
7578

0 commit comments

Comments
 (0)