Skip to content

Commit 02f82db

Browse files
committed
chore: rekres, bump deps
Update go dependencies. Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
1 parent 62b29be commit 02f82db

File tree

9 files changed

+65
-55
lines changed

9 files changed

+65
-55
lines changed

.conform.yaml

Lines changed: 1 addition & 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 2024-05-08T10:57:16Z by kres d15226e.
3+
# Generated on 2024-05-27T14:20:53Z by kres b5844f8.
44

55
policies:
66
- type: commit

.github/workflows/ci.yaml

Lines changed: 27 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 2024-05-08T13:34:33Z by kres 1e986af.
3+
# Generated on 2024-05-27T14:20:35Z by kres b5844f8.
44

55
name: default
66
concurrency:
@@ -29,16 +29,32 @@ jobs:
2929
- self-hosted
3030
- generic
3131
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/'))
32-
services:
33-
buildkitd:
34-
image: moby/buildkit:v0.13.2
35-
options: --privileged
36-
ports:
37-
- 1234:1234
38-
volumes:
39-
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit
40-
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml
4132
steps:
33+
- name: gather-system-info
34+
id: system-info
35+
uses: kenchan0130/actions-system-info@v1.3.0
36+
continue-on-error: true
37+
- name: print-system-info
38+
run: |
39+
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024))
40+
41+
OUTPUTS=(
42+
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
43+
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
44+
"Hostname: ${{ steps.system-info.outputs.hostname }}"
45+
"NodeName: ${NODE_NAME}"
46+
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
47+
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
48+
"Name: ${{ steps.system-info.outputs.name }}"
49+
"Platform: ${{ steps.system-info.outputs.platform }}"
50+
"Release: ${{ steps.system-info.outputs.release }}"
51+
"Total memory: ${MEMORY_GB} GB"
52+
)
53+
54+
for OUTPUT in "${OUTPUTS[@]}";do
55+
echo "${OUTPUT}"
56+
done
57+
continue-on-error: true
4258
- name: checkout
4359
uses: actions/checkout@v4
4460
- name: Unshallow
@@ -49,7 +65,7 @@ jobs:
4965
uses: docker/setup-buildx-action@v3
5066
with:
5167
driver: remote
52-
endpoint: tcp://127.0.0.1:1234
68+
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234
5369
timeout-minutes: 10
5470
- name: base
5571
run: |

.golangci.yml

Lines changed: 3 additions & 4 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 2024-05-08T13:34:33Z by kres 1e986af.
3+
# Generated on 2024-05-27T14:20:35Z by kres b5844f8.
44

55
# options for analysis running
66
run:
@@ -35,7 +35,7 @@ linters-settings:
3535
sections:
3636
- standard # Standard section: captures all standard packages.
3737
- default # Default section: contains all imports that could not be matched to another section type.
38-
- prefix(github.com/siderolabs/grpc-proxy/) # Custom section: groups all imports with the specified Prefix.
38+
- localmodule # Imports from the same module.
3939
gocognit:
4040
min-complexity: 30
4141
nestif:
@@ -51,8 +51,6 @@ linters-settings:
5151
scope: declarations
5252
gofmt:
5353
simplify: true
54-
goimports:
55-
local-prefixes: github.com/siderolabs/grpc-proxy/
5654
gomodguard: { }
5755
govet:
5856
enable-all: true
@@ -145,6 +143,7 @@ linters:
145143
- varcheck
146144
# disabled as it seems to be broken - goes into imported libraries and reports issues there
147145
- musttag
146+
- goimports # same as gci
148147

149148
issues:
150149
exclude: [ ]

Dockerfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2024-05-08T13:34:33Z by kres 1e986af.
5+
# Generated on 2024-05-27T14:20:35Z by kres b5844f8.
66

77
ARG TOOLCHAIN
88

99
# runs markdownlint
10-
FROM docker.io/node:21.7.3-alpine3.19 AS lint-markdown
10+
FROM docker.io/node:22.2.0-alpine3.19 AS lint-markdown
1111
WORKDIR /src
12-
RUN npm i -g markdownlint-cli@0.39.0
12+
RUN npm i -g markdownlint-cli@0.40.0
1313
RUN npm i sentences-per-line@0.2.1
1414
COPY .markdownlint.json .
1515
COPY ./README.md ./README.md
@@ -20,7 +20,7 @@ FROM scratch AS proto-specs
2020
ADD testservice/api/test.proto /testservice/
2121

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

2626
# build tools
@@ -42,6 +42,9 @@ RUN mv /go/bin/protoc-gen-go-grpc /bin
4242
ARG GRPC_GATEWAY_VERSION
4343
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION}
4444
RUN mv /go/bin/protoc-gen-grpc-gateway /bin
45+
ARG GOIMPORTS_VERSION
46+
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/tools/cmd/goimports@v${GOIMPORTS_VERSION}
47+
RUN mv /go/bin/goimports /bin
4548
ARG DEEPCOPY_VERSION
4649
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
4750
&& mv /go/bin/deep-copy /bin/deep-copy
@@ -50,9 +53,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
5053
&& mv /go/bin/golangci-lint /bin/golangci-lint
5154
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
5255
&& mv /go/bin/govulncheck /bin/govulncheck
53-
ARG GOIMPORTS_VERSION
54-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/tools/cmd/goimports@${GOIMPORTS_VERSION} \
55-
&& mv /go/bin/goimports /bin/goimports
5656
ARG GOFUMPT_VERSION
5757
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
5858
&& mv /go/bin/gofumpt /bin/gofumpt
@@ -81,10 +81,6 @@ RUN gofumpt -w /testservice
8181
FROM base AS lint-gofumpt
8282
RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'gofumpt -w .':\n${FILES}"; exit 1)
8383

84-
# runs goimports
85-
FROM base AS lint-goimports
86-
RUN FILES="$(goimports -l -local github.com/siderolabs/grpc-proxy/ .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/grpc-proxy/ .':\n${FILES}"; exit 1)
87-
8884
# runs golangci-lint
8985
FROM base AS lint-golangci-lint
9086
WORKDIR /src

Makefile

Lines changed: 13 additions & 12 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 2024-05-08T13:34:33Z by kres 1e986af.
3+
# Generated on 2024-05-27T14:20:53Z by kres b5844f8.
44

55
# common variables
66

@@ -10,20 +10,22 @@ ABBREV_TAG := $(shell git describe --tags >/dev/null 2>/dev/null && git describe
1010
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
1111
ARTIFACTS := _out
1212
IMAGE_TAG ?= $(TAG)
13+
OPERATING_SYSTEM := $(shell uname -s | tr '[:upper:]' '[:lower:]')
14+
GOARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
1315
WITH_DEBUG ?= false
1416
WITH_RACE ?= false
1517
REGISTRY ?= ghcr.io
1618
USERNAME ?= siderolabs
1719
REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
18-
PROTOBUF_GO_VERSION ?= 1.33.0
20+
PROTOBUF_GO_VERSION ?= 1.34.1
1921
GRPC_GO_VERSION ?= 1.3.0
20-
GRPC_GATEWAY_VERSION ?= 2.19.1
22+
GRPC_GATEWAY_VERSION ?= 2.20.0
2123
VTPROTOBUF_VERSION ?= 0.6.0
24+
GOIMPORTS_VERSION ?= 0.21.0
2225
DEEPCOPY_VERSION ?= v0.5.6
23-
GOLANGCILINT_VERSION ?= v1.58.0
26+
GOLANGCILINT_VERSION ?= v1.58.2
2427
GOFUMPT_VERSION ?= v0.6.0
2528
GO_VERSION ?= 1.22.3
26-
GOIMPORTS_VERSION ?= v0.20.0
2729
GO_BUILDFLAGS ?=
2830
GO_LDFLAGS ?=
2931
CGO_ENABLED ?= 0
@@ -60,9 +62,9 @@ COMMON_ARGS += --build-arg=PROTOBUF_GO_VERSION="$(PROTOBUF_GO_VERSION)"
6062
COMMON_ARGS += --build-arg=GRPC_GO_VERSION="$(GRPC_GO_VERSION)"
6163
COMMON_ARGS += --build-arg=GRPC_GATEWAY_VERSION="$(GRPC_GATEWAY_VERSION)"
6264
COMMON_ARGS += --build-arg=VTPROTOBUF_VERSION="$(VTPROTOBUF_VERSION)"
65+
COMMON_ARGS += --build-arg=GOIMPORTS_VERSION="$(GOIMPORTS_VERSION)"
6366
COMMON_ARGS += --build-arg=DEEPCOPY_VERSION="$(DEEPCOPY_VERSION)"
6467
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
65-
COMMON_ARGS += --build-arg=GOIMPORTS_VERSION="$(GOIMPORTS_VERSION)"
6668
COMMON_ARGS += --build-arg=GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
6769
COMMON_ARGS += --build-arg=TESTPKGS="$(TESTPKGS)"
6870
TOOLCHAIN ?= docker.io/golang:1.22-alpine
@@ -131,6 +133,9 @@ endif
131133

132134
all: unit-tests lint
133135

136+
$(ARTIFACTS): ## Creates artifacts directory.
137+
@mkdir -p $(ARTIFACTS)
138+
134139
.PHONY: clean
135140
clean: ## Cleans up all artifacts.
136141
@rm -rf $(ARTIFACTS)
@@ -161,9 +166,6 @@ fmt: ## Formats the source code
161166
lint-govulncheck: ## Runs govulncheck linter.
162167
@$(MAKE) target-$@
163168

164-
lint-goimports: ## Runs goimports linter.
165-
@$(MAKE) target-$@
166-
167169
.PHONY: base
168170
base: ## Prepare base toolchain
169171
@$(MAKE) target-$@
@@ -181,7 +183,7 @@ lint-markdown: ## Runs markdownlint.
181183
@$(MAKE) target-$@
182184

183185
.PHONY: lint
184-
lint: lint-golangci-lint lint-gofumpt lint-govulncheck lint-goimports lint-markdown ## Run all linters for the project.
186+
lint: lint-golangci-lint lint-gofumpt lint-govulncheck lint-markdown ## Run all linters for the project.
185187

186188
.PHONY: rekres
187189
rekres:
@@ -194,8 +196,7 @@ help: ## This help menu.
194196
@grep -E '^[a-zA-Z%_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
195197

196198
.PHONY: release-notes
197-
release-notes:
198-
mkdir -p $(ARTIFACTS)
199+
release-notes: $(ARTIFACTS)
199200
@ARTIFACTS=$(ARTIFACTS) ./hack/release.sh $@ $(ARTIFACTS)/RELEASE_NOTES.md $(TAG)
200201

201202
.PHONY: conformance

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ require (
66
github.com/golang/protobuf v1.5.4
77
github.com/hashicorp/go-multierror v1.1.1
88
github.com/stretchr/testify v1.9.0
9-
google.golang.org/grpc v1.63.2
9+
google.golang.org/grpc v1.64.0
1010
google.golang.org/protobuf v1.34.1
1111
)
1212

1313
require (
1414
github.com/davecgh/go-spew v1.1.1 // indirect
15-
github.com/hashicorp/errwrap v1.0.0 // indirect
15+
github.com/hashicorp/errwrap v1.1.0 // indirect
1616
github.com/pmezard/go-difflib v1.0.0 // indirect
1717
golang.org/x/net v0.25.0 // indirect
1818
golang.org/x/sys v0.20.0 // indirect
1919
golang.org/x/text v0.15.0 // indirect
20-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
20+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect
2121
gopkg.in/yaml.v3 v3.0.1 // indirect
2222
)

go.sum

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
66
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
77
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
88
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
9+
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
10+
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
911
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
1012
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
1113
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -18,10 +20,12 @@ golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
1820
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
1921
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
2022
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
21-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY=
22-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=
23-
google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM=
24-
google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
23+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc=
24+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
25+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e h1:Elxv5MwEkCI9f5SkoL6afed6NTdxaGoAo39eANBwHL8=
26+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=
27+
google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY=
28+
google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg=
2529
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
2630
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
2731
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=

proxy/handler_one2many_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -654,10 +654,7 @@ func (s *ProxyOne2ManySuite) SetupSuite() {
654654
s.proxy.Serve(s.proxyListener) //nolint: errcheck
655655
}()
656656

657-
ctx, ctxCancel := context.WithTimeout(context.Background(), 1*time.Second)
658-
defer ctxCancel()
659-
660-
clientConn, err := grpc.DialContext(ctx, strings.Replace(s.proxyListener.Addr().String(), "127.0.0.1", "localhost", 1), grpc.WithTransportCredentials(insecure.NewCredentials()))
657+
clientConn, err := grpc.NewClient(strings.Replace(s.proxyListener.Addr().String(), "127.0.0.1", "localhost", 1), grpc.WithTransportCredentials(insecure.NewCredentials()))
661658
require.NoError(s.T(), err, "must not error on deferred client Dial")
662659
s.testClient = pb.NewMultiServiceClient(clientConn)
663660
}

proxy/handler_one2one_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ func (s *ProxyOne2OneSuite) SetupSuite() {
226226
pb.RegisterTestServiceServer(s.server, &assertingService{t: s.T()})
227227

228228
// Setup of the proxy's Director.
229-
s.serverClientConn, err = grpc.Dial(s.serverListener.Addr().String(), grpc.WithInsecure(), grpc.WithCodec(proxy.Codec())) //nolint: staticcheck
229+
s.serverClientConn, err = grpc.NewClient(s.serverListener.Addr().String(), grpc.WithInsecure(), grpc.WithCodec(proxy.Codec())) //nolint: staticcheck
230230
require.NoError(s.T(), err, "must not error on deferred client Dial")
231231

232232
director := func(ctx context.Context, _ string) (proxy.Mode, []proxy.Backend, error) {
@@ -274,10 +274,7 @@ func (s *ProxyOne2OneSuite) SetupSuite() {
274274
s.proxy.Serve(s.proxyListener) //nolint: errcheck
275275
}()
276276

277-
ctx, ctxCancel := context.WithTimeout(context.Background(), 1*time.Second)
278-
defer ctxCancel()
279-
280-
clientConn, err := grpc.DialContext(ctx, strings.Replace(s.proxyListener.Addr().String(), "127.0.0.1", "localhost", 1), grpc.WithTransportCredentials(insecure.NewCredentials()))
277+
clientConn, err := grpc.NewClient(strings.Replace(s.proxyListener.Addr().String(), "127.0.0.1", "localhost", 1), grpc.WithTransportCredentials(insecure.NewCredentials()))
281278
require.NoError(s.T(), err, "must not error on deferred client Dial")
282279
s.testClient = pb.NewTestServiceClient(clientConn)
283280
}

0 commit comments

Comments
 (0)