Skip to content

Commit 2591a0f

Browse files
author
Dmitriy Matrenichev
committed
chore: bump deps
- run rekres - github.com/stretchr/testify to v1.8.4 - github.com/cloudflare/circl to v1.3.3 Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
1 parent 3d5e3ea commit 2591a0f

6 files changed

Lines changed: 51 additions & 46 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 2023-04-04T02:58:59Z by kres latest.
4+
# Generated on 2023-06-05T13:33:56Z by kres latest.
55

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

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

.golangci.yml

Lines changed: 9 additions & 6 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 2023-02-03T11:28:30Z by kres latest.
3+
# Generated on 2023-06-05T13:33:56Z by kres latest.
44

55
# options for analysis running
66
run:
@@ -36,7 +36,7 @@ linters-settings:
3636
lines: 60
3737
statements: 40
3838
gci:
39-
local-prefixes: github.com/cosi-project/runtime
39+
local-prefixes: github.com/cosi-project/runtime/
4040
gocognit:
4141
min-complexity: 30
4242
ireturn:
@@ -65,7 +65,7 @@ linters-settings:
6565
gofmt:
6666
simplify: true
6767
goimports:
68-
local-prefixes: github.com/cosi-project/runtime
68+
local-prefixes: github.com/cosi-project/runtime/
6969
golint:
7070
min-confidence: 0.8
7171
gomnd:
@@ -74,9 +74,6 @@ linters-settings:
7474
govet:
7575
check-shadowing: true
7676
enable-all: true
77-
depguard:
78-
list-type: blacklist
79-
include-go-root: false
8077
lll:
8178
line-length: 200
8279
tab-width: 4
@@ -118,6 +115,10 @@ linters-settings:
118115
cyclop:
119116
# the maximal code complexity to report
120117
max-complexity: 20
118+
# depguard:
119+
# Main:
120+
# deny:
121+
# - github.com/OpenPeeDeeP/depguard # this is just an example
121122

122123
linters:
123124
enable-all: true
@@ -145,6 +146,8 @@ linters:
145146
- typecheck
146147
- varnamelen
147148
- wrapcheck
149+
- depguard # Disabled because starting with golangci-lint 1.53.0 it doesn't allow denylist alone anymore
150+
- tagalign
148151
# abandoned linters for which golangci shows the warning that the repo is archived by the owner
149152
- interfacer
150153
- maligned

Dockerfile

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

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2023-05-17T06:53:41Z by kres latest.
5+
# Generated on 2023-06-05T13:33:56Z by kres latest.
66

77
ARG TOOLCHAIN
88

@@ -37,17 +37,6 @@ ENV GO111MODULE on
3737
ARG CGO_ENABLED
3838
ENV CGO_ENABLED ${CGO_ENABLED}
3939
ENV GOPATH /go
40-
ARG GOLANGCILINT_VERSION
41-
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} \
42-
&& mv /go/bin/golangci-lint /bin/golangci-lint
43-
ARG GOFUMPT_VERSION
44-
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
45-
&& mv /go/bin/gofumpt /bin/gofumpt
46-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
47-
&& mv /go/bin/govulncheck /bin/govulncheck
48-
ARG GOIMPORTS_VERSION
49-
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} \
50-
&& mv /go/bin/goimports /bin/goimports
5140
ARG PROTOBUF_GO_VERSION
5241
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install google.golang.org/protobuf/cmd/protoc-gen-go@v${PROTOBUF_GO_VERSION}
5342
RUN mv /go/bin/protoc-gen-go /bin
@@ -63,12 +52,24 @@ RUN mv /go/bin/protoc-gen-go-vtproto /bin
6352
ARG DEEPCOPY_VERSION
6453
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
6554
&& mv /go/bin/deep-copy /bin/deep-copy
55+
ARG GOLANGCILINT_VERSION
56+
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} \
57+
&& mv /go/bin/golangci-lint /bin/golangci-lint
58+
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
59+
&& mv /go/bin/govulncheck /bin/govulncheck
60+
ARG GOIMPORTS_VERSION
61+
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} \
62+
&& mv /go/bin/goimports /bin/goimports
63+
ARG GOFUMPT_VERSION
64+
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
65+
&& mv /go/bin/gofumpt /bin/gofumpt
6666

6767
# tools and sources
6868
FROM tools AS base
6969
WORKDIR /src
70-
COPY ./go.mod .
71-
COPY ./go.sum .
70+
COPY go.mod go.mod
71+
COPY go.sum go.sum
72+
RUN cd .
7273
RUN --mount=type=cache,target=/go/pkg go mod download
7374
RUN --mount=type=cache,target=/go/pkg go mod verify
7475
COPY ./api ./api
@@ -95,25 +96,29 @@ RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is no
9596

9697
# runs goimports
9798
FROM base AS lint-goimports
98-
RUN FILES="$(goimports -l -local github.com/cosi-project/runtime .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/cosi-project/runtime .':\n${FILES}"; exit 1)
99+
RUN FILES="$(goimports -l -local github.com/cosi-project/runtime/ .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/cosi-project/runtime/ .':\n${FILES}"; exit 1)
99100

100101
# runs golangci-lint
101102
FROM base AS lint-golangci-lint
103+
WORKDIR /src
102104
COPY .golangci.yml .
103105
ENV GOGC 50
104106
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
105107

106108
# runs govulncheck
107109
FROM base AS lint-govulncheck
110+
WORKDIR /src
108111
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg govulncheck ./...
109112

110113
# runs unit-tests with race detector
111114
FROM base AS unit-tests-race
115+
WORKDIR /src
112116
ARG TESTPKGS
113117
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 -p 1 ${TESTPKGS}
114118

115119
# runs unit-tests
116120
FROM base AS unit-tests-run
121+
WORKDIR /src
117122
ARG TESTPKGS
118123
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 -p 1 ${TESTPKGS}
119124

@@ -122,7 +127,7 @@ FROM scratch AS generate
122127
COPY --from=proto-compile /api/ /api/
123128

124129
FROM scratch AS unit-tests
125-
COPY --from=unit-tests-run /src/coverage.txt /coverage.txt
130+
COPY --from=unit-tests-run /src/coverage.txt /coverage-unit-tests.txt
126131

127132
# builds runtime-linux-amd64
128133
FROM base AS runtime-linux-amd64-build

Makefile

Lines changed: 13 additions & 13 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 2023-05-11T13:24:55Z by kres latest.
3+
# Generated on 2023-06-05T13:33:56Z by kres latest.
44

55
# common variables
66

@@ -13,15 +13,15 @@ WITH_RACE ?= false
1313
REGISTRY ?= ghcr.io
1414
USERNAME ?= cosi-project
1515
REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
16-
GOLANGCILINT_VERSION ?= v1.52.2
17-
GOFUMPT_VERSION ?= v0.5.0
18-
GO_VERSION ?= 1.20
19-
GOIMPORTS_VERSION ?= v0.9.1
2016
PROTOBUF_GO_VERSION ?= 1.28.1
2117
GRPC_GO_VERSION ?= 1.3.0
22-
GRPC_GATEWAY_VERSION ?= 2.15.2
18+
GRPC_GATEWAY_VERSION ?= 2.16.0
2319
VTPROTOBUF_VERSION ?= 0.4.0
2420
DEEPCOPY_VERSION ?= v0.5.5
21+
GOLANGCILINT_VERSION ?= v1.53.2
22+
GOFUMPT_VERSION ?= v0.5.0
23+
GO_VERSION ?= 1.20
24+
GOIMPORTS_VERSION ?= v0.9.3
2525
GO_BUILDFLAGS ?=
2626
GO_LDFLAGS ?=
2727
CGO_ENABLED ?= 0
@@ -49,14 +49,14 @@ COMMON_ARGS += --build-arg=TOOLCHAIN="$(TOOLCHAIN)"
4949
COMMON_ARGS += --build-arg=CGO_ENABLED="$(CGO_ENABLED)"
5050
COMMON_ARGS += --build-arg=GO_BUILDFLAGS="$(GO_BUILDFLAGS)"
5151
COMMON_ARGS += --build-arg=GO_LDFLAGS="$(GO_LDFLAGS)"
52-
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
53-
COMMON_ARGS += --build-arg=GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
54-
COMMON_ARGS += --build-arg=GOIMPORTS_VERSION="$(GOIMPORTS_VERSION)"
5552
COMMON_ARGS += --build-arg=PROTOBUF_GO_VERSION="$(PROTOBUF_GO_VERSION)"
5653
COMMON_ARGS += --build-arg=GRPC_GO_VERSION="$(GRPC_GO_VERSION)"
5754
COMMON_ARGS += --build-arg=GRPC_GATEWAY_VERSION="$(GRPC_GATEWAY_VERSION)"
5855
COMMON_ARGS += --build-arg=VTPROTOBUF_VERSION="$(VTPROTOBUF_VERSION)"
5956
COMMON_ARGS += --build-arg=DEEPCOPY_VERSION="$(DEEPCOPY_VERSION)"
57+
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
58+
COMMON_ARGS += --build-arg=GOIMPORTS_VERSION="$(GOIMPORTS_VERSION)"
59+
COMMON_ARGS += --build-arg=GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
6060
COMMON_ARGS += --build-arg=TESTPKGS="$(TESTPKGS)"
6161
TOOLCHAIN ?= docker.io/golang:1.20-alpine
6262

@@ -117,6 +117,9 @@ target-%: ## Builds the specified target defined in the Dockerfile. The build r
117117
local-%: ## Builds the specified target defined in the Dockerfile using the local output type. The build result will be output to the specified local destination.
118118
@$(MAKE) target-$* TARGET_ARGS="--output=type=local,dest=$(DEST) $(TARGET_ARGS)"
119119

120+
generate: ## Generate .proto definitions.
121+
@$(MAKE) local-$@ DEST=./
122+
120123
lint-golangci-lint: ## Runs golangci-lint linter.
121124
@$(MAKE) target-$@
122125

@@ -136,9 +139,6 @@ lint-govulncheck: ## Runs govulncheck linter.
136139
lint-goimports: ## Runs goimports linter.
137140
@$(MAKE) target-$@
138141

139-
generate: ## Generate .proto definitions.
140-
@$(MAKE) local-$@ DEST=./
141-
142142
.PHONY: base
143143
base: ## Prepare base toolchain
144144
@$(MAKE) target-$@
@@ -153,7 +153,7 @@ unit-tests-race: ## Performs unit tests with race detection enabled.
153153

154154
.PHONY: coverage
155155
coverage: ## Upload coverage data to codecov.io.
156-
bash -c "bash <(curl -s https://codecov.io/bash) -f $(ARTIFACTS)/coverage.txt -X fix"
156+
bash -c "bash <(curl -s https://codecov.io/bash) -f $(ARTIFACTS)/coverage-unit-tests.txt -X fix"
157157

158158
.PHONY: $(ARTIFACTS)/runtime-linux-amd64
159159
$(ARTIFACTS)/runtime-linux-amd64:

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ require (
1919
github.com/siderolabs/go-pointer v1.0.0
2020
github.com/siderolabs/go-retry v0.3.2
2121
github.com/siderolabs/protoenc v0.2.0
22-
github.com/stretchr/testify v1.8.2
22+
github.com/stretchr/testify v1.8.4
2323
go.etcd.io/bbolt v1.3.7
2424
go.uber.org/goleak v1.2.1
2525
go.uber.org/zap v1.24.0
@@ -34,7 +34,7 @@ require (
3434
github.com/ProtonMail/go-crypto v0.0.0-20230321155629-9a39f2531310 // indirect
3535
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f // indirect
3636
github.com/benbjohnson/clock v1.1.0 // indirect
37-
github.com/cloudflare/circl v1.1.0 // indirect
37+
github.com/cloudflare/circl v1.3.3 // indirect
3838
github.com/davecgh/go-spew v1.1.1 // indirect
3939
github.com/hashicorp/errwrap v1.0.0 // indirect
4040
github.com/hashicorp/go-immutable-radix v1.3.0 // indirect

go.sum

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ github.com/brianvoe/gofakeit/v6 v6.17.0 h1:obbQTJeHfktJtiZzq0Q1bEpsNUs+yHrYlPVWt
1010
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
1111
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
1212
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
13-
github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY=
1413
github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
14+
github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs=
15+
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
1516
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
1617
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1718
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -58,14 +59,10 @@ github.com/siderolabs/go-retry v0.3.2/go.mod h1:Ac8HIh0nAYDQm04FGZHNofVAXteyd4xR
5859
github.com/siderolabs/protoenc v0.2.0 h1:QFxWIAo//12+/bm27GNYoK/TpQGTYsRrrZCu9jSghvU=
5960
github.com/siderolabs/protoenc v0.2.0/go.mod h1:mu4gc6pJxhdJYpuloacKE4jsJojj87qDXwn8LUvs2bY=
6061
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
61-
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
62-
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
6362
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
6463
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
65-
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
66-
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
67-
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
68-
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
64+
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
65+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
6966
github.com/unix4ever/yaml v0.0.0-20220527175918-f17b0f05cf2c h1:Vn6nVVu9MdOYvXPkJP83iX5jVIfvxFC9v9xIKb+DlaQ=
7067
github.com/unix4ever/yaml v0.0.0-20220527175918-f17b0f05cf2c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
7168
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=

0 commit comments

Comments
 (0)