Skip to content

Commit d888b32

Browse files
committed
chore: update dependencies for Talos 1.8
Use new Talos, new CAPI base, etc. Signed-off-by: Andrey Smirnov <[email protected]>
1 parent 8470421 commit d888b32

File tree

8 files changed

+393
-348
lines changed

8 files changed

+393
-348
lines changed

.github/workflows/ci.yaml

Lines changed: 31 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 2024-04-17T13:11:59Z by kres 92eef68.
3+
# Generated on 2024-09-10T13:25:06Z by kres 8be5fa7.
44

55
name: default
66
concurrency:
@@ -29,26 +29,43 @@ 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.1
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/[email protected]
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
4561
run: |
4662
git fetch --prune --unshallow
4763
- name: Set up Docker Buildx
64+
id: setup-buildx
4865
uses: docker/setup-buildx-action@v3
4966
with:
5067
driver: remote
51-
endpoint: tcp://127.0.0.1:1234
68+
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234
5269
timeout-minutes: 10
5370
- name: base
5471
run: |
@@ -90,8 +107,9 @@ jobs:
90107
- name: Generate Checksums
91108
if: startsWith(github.ref, 'refs/tags/')
92109
run: |
93-
sha256sum _out/capi-* > _out/sha256sum.txt
94-
sha512sum _out/capi-* > _out/sha512sum.txt
110+
cd _out
111+
sha256sum capi-* > sha256sum.txt
112+
sha512sum capi-* > sha512sum.txt
95113
- name: release-notes
96114
if: startsWith(github.ref, 'refs/tags/')
97115
run: |

.golangci.yml

Lines changed: 17 additions & 27 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-04-17T13:11:59Z by kres 92eef68.
3+
# Generated on 2024-09-10T13:25:06Z by kres 8be5fa7.
44

55
# options for analysis running
66
run:
@@ -13,8 +13,8 @@ run:
1313
# output configuration options
1414
output:
1515
formats:
16-
- format: colored-line-number
17-
path: stdout
16+
- format: colored-line-number
17+
path: stdout
1818
print-issued-lines: true
1919
print-linter-name: true
2020
uniq-by-line: true
@@ -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/capi-utils/) # 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,10 +51,7 @@ linters-settings:
5151
scope: declarations
5252
gofmt:
5353
simplify: true
54-
goimports:
55-
local-prefixes: github.com/siderolabs/capi-utils/
5654
gomodguard: { }
57-
gomnd: { }
5855
govet:
5956
enable-all: true
6057
lll:
@@ -97,54 +94,47 @@ linters-settings:
9794
cyclop:
9895
# the maximal code complexity to report
9996
max-complexity: 20
100-
# depguard:
101-
# Main:
102-
# deny:
103-
# - github.com/OpenPeeDeeP/depguard # this is just an example
97+
depguard:
98+
rules:
99+
prevent_unmaintained_packages:
100+
list-mode: lax # allow unless explicitly denied
101+
files:
102+
- $all
103+
deny:
104+
- pkg: io/ioutil
105+
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
104106

105107
linters:
106108
enable-all: true
107109
disable-all: false
108110
fast: false
109111
disable:
110-
- exhaustivestruct
111112
- exhaustruct
113+
- err113
112114
- forbidigo
113115
- funlen
114116
- gochecknoglobals
115117
- gochecknoinits
116118
- godox
117-
- goerr113
118119
- gomnd
119120
- gomoddirectives
120121
- gosec
121122
- inamedparam
122123
- ireturn
124+
- mnd
123125
- nestif
124126
- nonamedreturns
125-
- nosnakecase
126127
- paralleltest
127128
- tagalign
128129
- tagliatelle
129130
- thelper
130-
- typecheck
131131
- varnamelen
132132
- wrapcheck
133-
- depguard # Disabled because starting with golangci-lint 1.53.0 it doesn't allow denylist alone anymore
134133
- testifylint # complains about our assert recorder and has a number of false positives for assert.Greater(t, thing, 1)
135134
- protogetter # complains about us using Value field on typed spec, instead of GetValue which has a different signature
136135
- perfsprint # complains about us using fmt.Sprintf in non-performance critical code, updating just kres took too long
137-
# abandoned linters for which golangci shows the warning that the repo is archived by the owner
138-
- deadcode
139-
- golint
140-
- ifshort
141-
- interfacer
142-
- maligned
143-
- scopelint
144-
- structcheck
145-
- varcheck
146-
# disabled as it seems to be broken - goes into imported libraries and reports issues there
147-
- musttag
136+
- goimports # same as gci
137+
- musttag # seems to be broken - goes into imported libraries and reports issues there
148138

149139
issues:
150140
exclude: [ ]

Dockerfile

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
1-
# syntax = docker/dockerfile-upstream:1.7.0-labs
1+
# syntax = docker/dockerfile-upstream:1.9.0-labs
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2024-04-17T13:11:59Z by kres 92eef68.
5+
# Generated on 2024-09-10T13:25:06Z by kres 8be5fa7.
66

77
ARG TOOLCHAIN
88

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

12-
FROM ghcr.io/siderolabs/ca-certificates:v1.6.0 AS image-ca-certificates
12+
FROM ghcr.io/siderolabs/ca-certificates:v1.7.0 AS image-ca-certificates
1313

14-
FROM ghcr.io/siderolabs/fhs:v1.6.0 AS image-fhs
14+
FROM ghcr.io/siderolabs/fhs:v1.7.0 AS image-fhs
1515

1616
# runs markdownlint
17-
FROM docker.io/node:21.7.1-alpine3.19 AS lint-markdown
17+
FROM docker.io/oven/bun:1.1.26-alpine AS lint-markdown
1818
WORKDIR /src
19-
RUN npm i -g [email protected]
20-
19+
2120
COPY .markdownlint.json .
2221
COPY ./README.md ./README.md
23-
RUN markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js .
22+
RUN bunx markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js .
2423

2524
# base toolchain image
26-
FROM ${TOOLCHAIN} AS toolchain
25+
FROM --platform=${BUILDPLATFORM} ${TOOLCHAIN} AS toolchain
2726
RUN apk --update --no-cache add bash curl build-base protoc protobuf-dev
2827

2928
# build tools
3029
FROM --platform=${BUILDPLATFORM} toolchain AS tools
31-
ENV GO111MODULE on
30+
ENV GO111MODULE=on
3231
ARG CGO_ENABLED
33-
ENV CGO_ENABLED ${CGO_ENABLED}
32+
ENV CGO_ENABLED=${CGO_ENABLED}
3433
ARG GOTOOLCHAIN
35-
ENV GOTOOLCHAIN ${GOTOOLCHAIN}
34+
ENV GOTOOLCHAIN=${GOTOOLCHAIN}
3635
ARG GOEXPERIMENT
37-
ENV GOEXPERIMENT ${GOEXPERIMENT}
38-
ENV GOPATH /go
36+
ENV GOEXPERIMENT=${GOEXPERIMENT}
37+
ENV GOPATH=/go
3938
ARG DEEPCOPY_VERSION
4039
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
4140
&& mv /go/bin/deep-copy /bin/deep-copy
@@ -44,9 +43,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
4443
&& mv /go/bin/golangci-lint /bin/golangci-lint
4544
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
4645
&& mv /go/bin/govulncheck /bin/govulncheck
47-
ARG GOIMPORTS_VERSION
48-
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} \
49-
&& mv /go/bin/goimports /bin/goimports
5046
ARG GOFUMPT_VERSION
5147
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
5248
&& mv /go/bin/gofumpt /bin/gofumpt
@@ -115,15 +111,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
115111
FROM base AS lint-gofumpt
116112
RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'gofumpt -w .':\n${FILES}"; exit 1)
117113

118-
# runs goimports
119-
FROM base AS lint-goimports
120-
RUN FILES="$(goimports -l -local github.com/siderolabs/capi-utils/ .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/capi-utils/ .':\n${FILES}"; exit 1)
121-
122114
# runs golangci-lint
123115
FROM base AS lint-golangci-lint
124116
WORKDIR /src
125117
COPY .golangci.yml .
126-
ENV GOGC 50
118+
ENV GOGC=50
127119
RUN golangci-lint config verify --config .golangci.yml
128120
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
129121

@@ -180,6 +172,6 @@ ARG TARGETARCH
180172
COPY --from=capi capi-linux-${TARGETARCH} /capi
181173
COPY --from=image-fhs / /
182174
COPY --from=image-ca-certificates / /
183-
LABEL org.opencontainers.image.source https://github.com/siderolabs/capi-utils
175+
LABEL org.opencontainers.image.source=https://github.com/siderolabs/capi-utils
184176
ENTRYPOINT ["/capi"]
185177

Makefile

Lines changed: 17 additions & 16 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-04-17T13:11:59Z by kres 92eef68.
3+
# Generated on 2024-09-10T13:25:06Z by kres 8be5fa7.
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
19-
GRPC_GO_VERSION ?= 1.3.0
20-
GRPC_GATEWAY_VERSION ?= 2.19.1
20+
PROTOBUF_GO_VERSION ?= 1.34.2
21+
GRPC_GO_VERSION ?= 1.5.1
22+
GRPC_GATEWAY_VERSION ?= 2.22.0
2123
VTPROTOBUF_VERSION ?= 0.6.0
24+
GOIMPORTS_VERSION ?= 0.24.0
2225
DEEPCOPY_VERSION ?= v0.5.6
23-
GOLANGCILINT_VERSION ?= v1.57.2
24-
GOFUMPT_VERSION ?= v0.6.0
25-
GO_VERSION ?= 1.22.2
26-
GOIMPORTS_VERSION ?= v0.20.0
26+
GOLANGCILINT_VERSION ?= v1.60.3
27+
GOFUMPT_VERSION ?= v0.7.0
28+
GO_VERSION ?= 1.23.0
2729
GO_BUILDFLAGS ?=
2830
GO_LDFLAGS ?=
2931
CGO_ENABLED ?= 0
@@ -60,12 +62,12 @@ 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)"
68-
TOOLCHAIN ?= docker.io/golang:1.22-alpine
70+
TOOLCHAIN ?= docker.io/golang:1.23-alpine
6971

7072
# help menu
7173

@@ -131,6 +133,9 @@ endif
131133

132134
all: unit-tests capi image-capi 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)
@@ -158,9 +163,6 @@ fmt: ## Formats the source code
158163
lint-govulncheck: ## Runs govulncheck linter.
159164
@$(MAKE) target-$@
160165

161-
lint-goimports: ## Runs goimports linter.
162-
@$(MAKE) target-$@
163-
164166
.PHONY: base
165167
base: ## Prepare base toolchain
166168
@$(MAKE) target-$@
@@ -223,7 +225,7 @@ lint-markdown: ## Runs markdownlint.
223225
@$(MAKE) target-$@
224226

225227
.PHONY: lint
226-
lint: lint-golangci-lint lint-gofumpt lint-govulncheck lint-goimports lint-markdown ## Run all linters for the project.
228+
lint: lint-golangci-lint lint-gofumpt lint-govulncheck lint-markdown ## Run all linters for the project.
227229

228230
.PHONY: image-capi
229231
image-capi: ## Builds image for capi.
@@ -240,8 +242,7 @@ help: ## This help menu.
240242
@grep -E '^[a-zA-Z%_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
241243

242244
.PHONY: release-notes
243-
release-notes:
244-
mkdir -p $(ARTIFACTS)
245+
release-notes: $(ARTIFACTS)
245246
@ARTIFACTS=$(ARTIFACTS) ./hack/release.sh $@ $(ARTIFACTS)/RELEASE_NOTES.md $(TAG)
246247

247248
.PHONY: conformance

0 commit comments

Comments
 (0)