Skip to content

Commit 184f94d

Browse files
committed
chore: rekres and bump go to 1.25.2
Rekres and bump go See groups.google.com/g/golang-nuts/c/Gxn25BP4MXk/m/3KrM-XBOBAAJ Signed-off-by: Oguz Kilcan <oguz.kilcan@siderolabs.com>
1 parent 68478e2 commit 184f94d

File tree

9 files changed

+130
-35
lines changed

9 files changed

+130
-35
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 2023-04-07T17:34:58Z by kres latest.
3+
# Generated on 2025-10-08T09:12:43Z by kres 063080a.
44

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

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 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-09-22T15:45:31Z by kres fdbc9fc.
3+
# Generated on 2025-10-08T09:12:43Z by kres 063080a.
44

55
concurrency:
66
group: ${{ github.head_ref || github.run_id }}
@@ -75,7 +75,7 @@ jobs:
7575
make release-notes
7676
- name: Release
7777
if: startsWith(github.ref, 'refs/tags/')
78-
uses: crazy-max/ghaction-github-release@v2
78+
uses: softprops/action-gh-release@v2
7979
with:
8080
body_path: _out/RELEASE_NOTES.md
8181
draft: "true"

.github/workflows/stale.yml

Lines changed: 2 additions & 2 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-09-22T15:45:31Z by kres fdbc9fc.
3+
# Generated on 2025-10-08T09:12:43Z by kres 063080a.
44

55
"on":
66
schedule:
@@ -15,7 +15,7 @@ jobs:
1515
- ubuntu-latest
1616
steps:
1717
- name: Close stale issues and PRs
18-
uses: actions/stale@v10.0.0
18+
uses: actions/stale@v10.1.0
1919
with:
2020
close-issue-message: This issue was closed because it has been stalled for 7 days with no activity.
2121
days-before-issue-close: "5"

Dockerfile

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# syntax = docker/dockerfile-upstream:1.17.1-labs
1+
# syntax = docker/dockerfile-upstream:1.19.0-labs
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2025-08-06T15:03:09Z by kres 7f1d58a.
5+
# Generated on 2025-10-08T09:12:43Z by kres 063080a.
66

77
ARG TOOLCHAIN
88

99
# runs markdownlint
10-
FROM docker.io/oven/bun:1.2.18-alpine AS lint-markdown
10+
FROM docker.io/oven/bun:1.2.23-alpine AS lint-markdown
1111
WORKDIR /src
1212
RUN bun i markdownlint-cli@0.45.0 sentences-per-line@0.3.0
1313
COPY .markdownlint.json .
@@ -20,7 +20,7 @@ ADD api/auth/auth.proto /api/auth/
2020

2121
# base toolchain image
2222
FROM --platform=${BUILDPLATFORM} ${TOOLCHAIN} AS toolchain
23-
RUN apk --update --no-cache add bash curl build-base protoc protobuf-dev
23+
RUN apk --update --no-cache add bash build-base curl jq protoc protobuf-dev
2424

2525
# build tools
2626
FROM --platform=${BUILDPLATFORM} toolchain AS tools
@@ -100,10 +100,19 @@ COPY .golangci.yml .
100100
ENV GOGC=50
101101
RUN --mount=type=cache,target=/root/.cache/go-build,id=go-api-signature/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint,id=go-api-signature/root/.cache/golangci-lint,sharing=locked --mount=type=cache,target=/go/pkg,id=go-api-signature/go/pkg golangci-lint run --config .golangci.yml
102102

103+
# runs golangci-lint fmt
104+
FROM base AS lint-golangci-lint-fmt-run
105+
WORKDIR /src
106+
COPY .golangci.yml .
107+
ENV GOGC=50
108+
RUN --mount=type=cache,target=/root/.cache/go-build,id=go-api-signature/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint,id=go-api-signature/root/.cache/golangci-lint,sharing=locked --mount=type=cache,target=/go/pkg,id=go-api-signature/go/pkg golangci-lint fmt --config .golangci.yml
109+
RUN --mount=type=cache,target=/root/.cache/go-build,id=go-api-signature/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint,id=go-api-signature/root/.cache/golangci-lint,sharing=locked --mount=type=cache,target=/go/pkg,id=go-api-signature/go/pkg golangci-lint run --fix --issues-exit-code 0 --config .golangci.yml
110+
103111
# runs govulncheck
104112
FROM base AS lint-govulncheck
105113
WORKDIR /src
106-
RUN --mount=type=cache,target=/root/.cache/go-build,id=go-api-signature/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=go-api-signature/go/pkg govulncheck ./...
114+
COPY --chmod=0755 hack/govulncheck.sh ./hack/govulncheck.sh
115+
RUN --mount=type=cache,target=/root/.cache/go-build,id=go-api-signature/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=go-api-signature/go/pkg ./hack/govulncheck.sh ./...
107116

108117
# runs unit-tests with race detector
109118
FROM base AS unit-tests-race
@@ -121,6 +130,10 @@ RUN --mount=type=cache,target=/root/.cache/go-build,id=go-api-signature/root/.ca
121130
FROM scratch AS generate
122131
COPY --from=proto-compile /api/ /api/
123132

133+
# clean golangci-lint fmt output
134+
FROM scratch AS lint-golangci-lint-fmt
135+
COPY --from=lint-golangci-lint-fmt-run /src .
136+
124137
FROM scratch AS unit-tests
125138
COPY --from=unit-tests-run /src/coverage.txt /coverage-unit-tests.txt
126139

Makefile

Lines changed: 17 additions & 11 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-08-06T15:03:09Z by kres 7f1d58a.
3+
# Generated on 2025-10-08T09:12:43Z by kres 063080a.
44

55
# common variables
66

@@ -17,21 +17,21 @@ WITH_RACE ?= false
1717
REGISTRY ?= ghcr.io
1818
USERNAME ?= siderolabs
1919
REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
20-
PROTOBUF_GO_VERSION ?= 1.36.6
20+
PROTOBUF_GO_VERSION ?= 1.36.10
2121
GRPC_GO_VERSION ?= 1.5.1
22-
GRPC_GATEWAY_VERSION ?= 2.27.1
22+
GRPC_GATEWAY_VERSION ?= 2.27.3
2323
VTPROTOBUF_VERSION ?= 0.6.0
24-
GOIMPORTS_VERSION ?= 0.34.0
25-
GOMOCK_VERSION ?= 0.5.2
26-
DEEPCOPY_VERSION ?= v0.5.6
27-
GOLANGCILINT_VERSION ?= v2.2.2
28-
GOFUMPT_VERSION ?= v0.8.0
29-
GO_VERSION ?= 1.24.5
24+
GOIMPORTS_VERSION ?= 0.37.0
25+
GOMOCK_VERSION ?= 0.6.0
26+
DEEPCOPY_VERSION ?= v0.5.8
27+
GOLANGCILINT_VERSION ?= v2.5.0
28+
GOFUMPT_VERSION ?= v0.9.1
29+
GO_VERSION ?= 1.25.2
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

@@ -202,6 +205,9 @@ lint-markdown: ## Runs markdownlint.
202205
.PHONY: lint
203206
lint: lint-golangci-lint lint-gofumpt lint-govulncheck lint-markdown ## Run all linters for the project.
204207

208+
.PHONY: lint-fmt
209+
lint-fmt: lint-golangci-lint-fmt ## Run all linter formatters and fix up the source tree.
210+
205211
.PHONY: rekres
206212
rekres:
207213
@docker pull $(KRES_IMAGE)

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/siderolabs/go-api-signature
22

3-
go 1.22.0
3+
go 1.25.2
44

55
require (
66
github.com/ProtonMail/go-crypto v1.1.0-alpha.5.0.20240827111422-b5837fa4476e
@@ -9,6 +9,7 @@ require (
99
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0
1010
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
1111
github.com/stretchr/testify v1.9.0
12+
golang.org/x/sys v0.24.0
1213
google.golang.org/grpc v1.66.0
1314
google.golang.org/protobuf v1.34.2
1415
)
@@ -23,7 +24,6 @@ require (
2324
github.com/rogpeppe/go-internal v1.12.0 // indirect
2425
golang.org/x/crypto v0.26.0 // indirect
2526
golang.org/x/net v0.28.0 // indirect
26-
golang.org/x/sys v0.24.0 // indirect
2727
golang.org/x/text v0.17.0 // indirect
2828
google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect
2929
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect

go.sum

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@ github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f h1:tCbYj7/299ek
55
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f/go.mod h1:gcr0kNtGBqin9zDW9GOHcVntrwnjrK+qdJ06mWYBybw=
66
github.com/ProtonMail/gopenpgp/v2 v2.7.5 h1:STOY3vgES59gNgoOt2w0nyHBjKViB/qSg7NjbQWPJkA=
77
github.com/ProtonMail/gopenpgp/v2 v2.7.5/go.mod h1:IhkNEDaxec6NyzSI0PlxapinnwPVIESk8/76da3Ct3g=
8-
github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls=
9-
github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E=
108
github.com/adrg/xdg v0.5.0 h1:dDaZvhMXatArP1NPHhnfaQUqWBLBsmx1h1HXQdMoFCY=
119
github.com/adrg/xdg v0.5.0/go.mod h1:dDdY4M4DF9Rjy4kHPeNL+ilVF+p2lK8IdM9/rTSGcI4=
1210
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
1311
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
14-
github.com/cloudflare/circl v1.3.9 h1:QFrlgFYf2Qpi8bSpVPK1HBvWpx16v/1TZivyo7pGuBE=
15-
github.com/cloudflare/circl v1.3.9/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU=
1612
github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
1713
github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
1814
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -21,8 +17,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
2117
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2218
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
2319
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
24-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0=
25-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k=
2620
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys=
2721
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I=
2822
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
@@ -64,7 +58,6 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
6458
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
6559
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
6660
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
67-
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
6861
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
6962
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
7063
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -94,12 +87,8 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
9487
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
9588
google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0=
9689
google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
97-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c h1:Kqjm4WpoWvwhMPcrAczoTyMySQmYa9Wy2iL6Con4zn8=
98-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
9990
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed h1:J6izYgfBXAI3xTKLgxzTmUltdYaLsuBxFCgDHWJ/eXg=
10091
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
101-
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
102-
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
10392
google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c=
10493
google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
10594
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=

hack/govulncheck.sh

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#!/bin/bash
2+
# Source: https://github.com/tianon/gosu/blob/e157efb/govulncheck-with-excludes.sh
3+
# Licensed under the Apache License, Version 2.0
4+
# Copyright Tianon Gravi
5+
set -Eeuo pipefail
6+
7+
exclude_arg=""
8+
pass_args=()
9+
10+
while [[ $# -gt 0 ]]; do
11+
case "$1" in
12+
-exclude)
13+
exclude_arg="$2"
14+
shift 2
15+
;;
16+
*)
17+
pass_args+=("$1")
18+
shift
19+
;;
20+
esac
21+
done
22+
23+
if [[ -n "$exclude_arg" ]]; then
24+
excludeVulns="$(jq -nc --arg list "$exclude_arg" '$list | split(",")')"
25+
else
26+
excludeVulns="[]"
27+
fi
28+
29+
export excludeVulns
30+
31+
# Debug print
32+
echo "excludeVulns = $excludeVulns"
33+
echo "Passing args: ${pass_args[*]}"
34+
35+
if ! command -v govulncheck > /dev/null; then
36+
printf "govulncheck not installed"
37+
exit 1
38+
fi
39+
40+
if out="$(govulncheck "${pass_args[@]}")"; then
41+
printf '%s\n' "$out"
42+
exit 0
43+
fi
44+
45+
json="$(govulncheck -json "${pass_args[@]}")"
46+
47+
vulns="$(jq <<<"$json" -cs '
48+
(
49+
map(
50+
.osv // empty
51+
| { key: .id, value: . }
52+
)
53+
| from_entries
54+
) as $meta
55+
# https://github.com/tianon/gosu/issues/144
56+
| map(
57+
.finding // empty
58+
# https://github.com/golang/vuln/blob/3740f5cb12a3f93b18dbe200c4bcb6256f8586e2/internal/scan/template.go#L97-L104
59+
| select((.trace[0].function // "") != "")
60+
| .osv
61+
)
62+
| unique
63+
| map($meta[.])
64+
')"
65+
if [ "$(jq <<<"$vulns" -r 'length')" -le 0 ]; then
66+
printf '%s\n' "$out"
67+
exit 1
68+
fi
69+
70+
filtered="$(jq <<<"$vulns" -c '
71+
(env.excludeVulns | fromjson) as $exclude
72+
| map(select(
73+
.id as $id
74+
| $exclude | index($id) | not
75+
))
76+
')"
77+
78+
text="$(jq <<<"$filtered" -r 'map("- \(.id) (aka \(.aliases | join(", ")))\n\n\t\(.details | gsub("\n"; "\n\t"))") | join("\n\n")')"
79+
80+
if [ -z "$text" ]; then
81+
printf 'No vulnerabilities found.\n'
82+
exit 0
83+
else
84+
printf '%s\n' "$text"
85+
exit 1
86+
fi

pkg/client/interceptor/suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type GRPCSuite struct {
2828
func (suite *GRPCSuite) InitServer(opts ...grpc.ServerOption) {
2929
var err error
3030

31-
suite.listener, err = net.Listen("tcp", "localhost:0")
31+
suite.listener, err = (&net.ListenConfig{}).Listen(suite.T().Context(), "tcp", "localhost:0")
3232
suite.Require().NoError(err)
3333

3434
suite.Server = grpc.NewServer(opts...)

0 commit comments

Comments
 (0)