Skip to content

Commit

Permalink
chore: bump deps
Browse files Browse the repository at this point in the history
Rekres.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
  • Loading branch information
Unix4ever committed Jun 20, 2024
1 parent aab4671 commit 0639758
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 147 deletions.
46 changes: 33 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-13T11:38:11Z by kres latest.
# Generated on 2024-06-20T11:03:04Z by kres 4c9f215.

name: default
concurrency:
Expand Down Expand Up @@ -29,26 +29,43 @@ jobs:
- self-hosted
- generic
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/'))
services:
buildkitd:
image: moby/buildkit:v0.12.5
options: --privileged
ports:
- 1234:1234
volumes:
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml
steps:
- name: gather-system-info
id: system-info
uses: kenchan0130/actions-system-info@v1.3.0
continue-on-error: true
- name: print-system-info
run: |
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024))
OUTPUTS=(
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
"Hostname: ${{ steps.system-info.outputs.hostname }}"
"NodeName: ${NODE_NAME}"
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
"Name: ${{ steps.system-info.outputs.name }}"
"Platform: ${{ steps.system-info.outputs.platform }}"
"Release: ${{ steps.system-info.outputs.release }}"
"Total memory: ${MEMORY_GB} GB"
)
for OUTPUT in "${OUTPUTS[@]}";do
echo "${OUTPUT}"
done
continue-on-error: true
- name: checkout
uses: actions/checkout@v4
- name: Unshallow
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
id: setup-buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://127.0.0.1:1234
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234
timeout-minutes: 10
- name: base
run: |
Expand All @@ -60,8 +77,11 @@ jobs:
run: |
make unit-tests-race
- name: coverage
run: |
make coverage
uses: codecov/codecov-action@v4
with:
files: _out/coverage-unit-tests.txt
token: ${{ secrets.CODECOV_TOKEN }}
timeout-minutes: 3
- name: lint
run: |
make lint
Expand Down
102 changes: 37 additions & 65 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-13T11:38:11Z by kres latest.
# Generated on 2024-06-20T11:03:04Z by kres 4c9f215.

# options for analysis running
run:
timeout: 10m
issues-exit-code: 1
tests: true
build-tags: []
skip-dirs: []
skip-dirs-use-default: true
skip-files: []
build-tags: [ ]
modules-download-mode: readonly

# output configuration options
output:
format: colored-line-number
formats:
- format: colored-line-number
path: stdout
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
Expand All @@ -32,54 +31,35 @@ linters-settings:
check-blank: true
exhaustive:
default-signifies-exhaustive: false
funlen:
lines: 60
statements: 40
gci:
local-prefixes: github.com/siderolabs/go-loadbalancer/
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- localmodule # Imports from the same module.
gocognit:
min-complexity: 30
ireturn:
allow:
- anon
- error
- empty
- stdlib
- github.com\/talos-systems\/kres\/internal\/dag.Node
nestif:
min-complexity: 5
goconst:
min-len: 3
min-occurrences: 3
gocritic:
disabled-checks: []
disabled-checks: [ ]
gocyclo:
min-complexity: 20
godot:
check-all: false
godox:
keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting
- NOTE
- OPTIMIZE # marks code that should be optimized before merging
- HACK # marks hack-arounds that should be removed before merging
scope: declarations
gofmt:
simplify: true
goimports:
local-prefixes: github.com/siderolabs/go-loadbalancer/
golint:
min-confidence: 0.8
gomnd:
settings: {}
gomodguard: {}
gomodguard: { }
govet:
check-shadowing: true
enable-all: true
lll:
line-length: 200
tab-width: 4
misspell:
locale: US
ignore-words: []
ignore-words: [ ]
nakedret:
max-func-lines: 30
prealloc:
Expand All @@ -88,16 +68,15 @@ linters-settings:
for-loops: false # Report preallocation suggestions on for loops, false by default
nolintlint:
allow-unused: false
allow-leading-space: false
allow-no-explanation: []
allow-no-explanation: [ ]
require-explanation: false
require-specific: true
rowserrcheck: {}
testpackage: {}
rowserrcheck: { }
testpackage: { }
unparam:
check-exported: false
unused:
check-exported: false
local-variables-are-used: false
whitespace:
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
Expand All @@ -113,60 +92,53 @@ linters-settings:
gofumpt:
extra-rules: false
cyclop:
# the maximal code complexity to report
max-complexity: 20
# depguard:
# Main:
# deny:
# - github.com/OpenPeeDeeP/depguard # this is just an example
# the maximal code complexity to report
max-complexity: 20
depguard:
rules:
prevent_unmaintained_packages:
list-mode: lax # allow unless explicitly denied
files:
- $all
deny:
- pkg: io/ioutil
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"

linters:
enable-all: true
disable-all: false
fast: false
disable:
- exhaustruct
- exhaustivestruct
- err113
- forbidigo
- funlen
- gas
- gochecknoglobals
- gochecknoinits
- godox
- goerr113
- gomnd
- gomoddirectives
- gosec
- inamedparam
- ireturn
- mnd
- nestif
- nonamedreturns
- nosnakecase
- paralleltest
- tagalign
- tagliatelle
- thelper
- typecheck
- varnamelen
- wrapcheck
- depguard # Disabled because starting with golangci-lint 1.53.0 it doesn't allow denylist alone anymore
- tagalign
- inamedparam
- testifylint # complains about our assert recorder and has a number of false positives for assert.Greater(t, thing, 1)
- protogetter # complains about us using Value field on typed spec, instead of GetValue which has a different signature
- perfsprint # complains about us using fmt.Sprintf in non-performance critical code, updating just kres took too long
# abandoned linters for which golangci shows the warning that the repo is archived by the owner
- interfacer
- maligned
- golint
- scopelint
- varcheck
- deadcode
- structcheck
- ifshort
# disabled as it seems to be broken - goes into imported libraries and reports issues there
- musttag
- goimports # same as gci
- musttag # seems to be broken - goes into imported libraries and reports issues there

issues:
exclude: []
exclude-rules: []
exclude: [ ]
exclude-rules: [ ]
exclude-use-default: false
exclude-case-sensitive: false
max-issues-per-linter: 10
Expand Down
33 changes: 13 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
# syntax = docker/dockerfile-upstream:1.7.0-labs
# syntax = docker/dockerfile-upstream:1.8.0-labs

# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-13T11:38:11Z by kres latest.
# Generated on 2024-06-20T11:03:04Z by kres 4c9f215.

ARG TOOLCHAIN

# cleaned up specs and compiled versions
FROM scratch AS generate

# runs markdownlint
FROM docker.io/node:21.7.1-alpine3.19 AS lint-markdown
FROM docker.io/oven/bun:1.1.13-alpine AS lint-markdown
WORKDIR /src
RUN npm i -g markdownlint-cli@0.39.0
RUN npm i sentences-per-line@0.2.1
RUN bun i markdownlint-cli@0.41.0 sentences-per-line@0.2.1
COPY .markdownlint.json .
COPY ./README.md ./README.md
RUN markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js .
RUN bunx markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js .

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

# build tools
FROM --platform=${BUILDPLATFORM} toolchain AS tools
ENV GO111MODULE on
ENV GO111MODULE=on
ARG CGO_ENABLED
ENV CGO_ENABLED ${CGO_ENABLED}
ENV CGO_ENABLED=${CGO_ENABLED}
ARG GOTOOLCHAIN
ENV GOTOOLCHAIN ${GOTOOLCHAIN}
ENV GOTOOLCHAIN=${GOTOOLCHAIN}
ARG GOEXPERIMENT
ENV GOEXPERIMENT ${GOEXPERIMENT}
ENV GOPATH /go
ENV GOEXPERIMENT=${GOEXPERIMENT}
ENV GOPATH=/go
ARG DEEPCOPY_VERSION
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
&& mv /go/bin/deep-copy /bin/deep-copy
Expand All @@ -40,9 +39,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
&& mv /go/bin/golangci-lint /bin/golangci-lint
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
&& mv /go/bin/govulncheck /bin/govulncheck
ARG GOIMPORTS_VERSION
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} \
&& mv /go/bin/goimports /bin/goimports
ARG GOFUMPT_VERSION
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
&& mv /go/bin/gofumpt /bin/gofumpt
Expand All @@ -64,15 +60,12 @@ RUN --mount=type=cache,target=/go/pkg go list -mod=readonly all >/dev/null
FROM base AS lint-gofumpt
RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'gofumpt -w .':\n${FILES}"; exit 1)

# runs goimports
FROM base AS lint-goimports
RUN FILES="$(goimports -l -local github.com/siderolabs/go-loadbalancer/ .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/go-loadbalancer/ .':\n${FILES}"; exit 1)

# runs golangci-lint
FROM base AS lint-golangci-lint
WORKDIR /src
COPY .golangci.yml .
ENV GOGC 50
ENV GOGC=50
RUN golangci-lint config verify --config .golangci.yml
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

# runs govulncheck
Expand Down
Loading

0 comments on commit 0639758

Please sign in to comment.