From 0d45deefbcdd4bd6b6e549433b859083df55fc16 Mon Sep 17 00:00:00 2001 From: Dmitriy Matrenichev Date: Wed, 4 Dec 2024 11:17:01 +0300 Subject: [PATCH] chore: bump deps - run rekres - github.com/stretchr/testify to v1.10.0 Signed-off-by: Dmitriy Matrenichev --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/slack-notify.yaml | 10 +++++----- .golangci.yml | 3 +-- Dockerfile | 8 ++++---- Makefile | 23 +++++++++++++++++------ go.mod | 2 +- go.sum | 4 ++-- x509/x509.go | 14 +++++++------- 8 files changed, 39 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 128da99..db0fc02 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-10-10T15:35:11Z by kres 3919238. +# Generated on 2024-12-04T08:15:33Z by kres 232fe63. name: default concurrency: @@ -77,7 +77,7 @@ jobs: run: | make unit-tests-race - name: coverage - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: files: _out/coverage-unit-tests.txt token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/slack-notify.yaml b/.github/workflows/slack-notify.yaml index d6ebee1..3fce1f3 100644 --- a/.github/workflows/slack-notify.yaml +++ b/.github/workflows/slack-notify.yaml @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-02-16T10:24:06Z by kres latest. +# Generated on 2024-12-04T08:15:33Z by kres 232fe63. name: slack-notify "on": @@ -24,11 +24,12 @@ jobs: run: | echo pull_request_number=$(gh pr view -R ${{ github.repository }} ${{ github.event.workflow_run.head_repository.owner.login }}:${{ github.event.workflow_run.head_branch }} --json number --jq .number) >> $GITHUB_OUTPUT - name: Slack Notify - uses: slackapi/slack-github-action@v1 + uses: slackapi/slack-github-action@v2 with: - channel-id: proj-talos-maintainers + method: chat.postMessage payload: | { + "channel": "proj-talos-maintainers", "attachments": [ { "color": "${{ github.event.workflow_run.conclusion == 'success' && '#2EB886' || github.event.workflow_run.conclusion == 'failure' && '#A30002' || '#FFCC00' }}", @@ -88,5 +89,4 @@ jobs: } ] } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + token: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.golangci.yml b/.golangci.yml index 7d88168..64c88c3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-10-10T15:35:11Z by kres 3919238. +# Generated on 2024-12-04T08:15:33Z by kres 232fe63. # options for analysis running run: @@ -116,7 +116,6 @@ linters: - gochecknoglobals - gochecknoinits - godox - - gomnd - gomoddirectives - gosec - inamedparam diff --git a/Dockerfile b/Dockerfile index b7e8ca0..2611220 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -# syntax = docker/dockerfile-upstream:1.10.0-labs +# syntax = docker/dockerfile-upstream:1.11.1-labs # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-10-10T15:35:11Z by kres 3919238. +# Generated on 2024-12-04T08:15:33Z by kres 232fe63. ARG TOOLCHAIN @@ -10,9 +10,9 @@ ARG TOOLCHAIN FROM scratch AS generate # runs markdownlint -FROM docker.io/oven/bun:1.1.29-alpine AS lint-markdown +FROM docker.io/oven/bun:1.1.36-alpine AS lint-markdown WORKDIR /src -RUN bun i markdownlint-cli@0.41.0 sentences-per-line@0.2.1 +RUN bun i markdownlint-cli@0.43.0 sentences-per-line@0.2.1 COPY .markdownlint.json . COPY ./README.md ./README.md RUN bunx markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js . diff --git a/Makefile b/Makefile index 8043273..99adac1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-10-10T15:35:11Z by kres 3919238. +# Generated on 2024-12-04T08:15:33Z by kres 232fe63. # common variables @@ -17,15 +17,15 @@ WITH_RACE ?= false REGISTRY ?= ghcr.io USERNAME ?= siderolabs REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME) -PROTOBUF_GO_VERSION ?= 1.34.2 +PROTOBUF_GO_VERSION ?= 1.35.2 GRPC_GO_VERSION ?= 1.5.1 -GRPC_GATEWAY_VERSION ?= 2.22.0 +GRPC_GATEWAY_VERSION ?= 2.24.0 VTPROTOBUF_VERSION ?= 0.6.0 -GOIMPORTS_VERSION ?= 0.25.0 +GOIMPORTS_VERSION ?= 0.27.0 DEEPCOPY_VERSION ?= v0.5.6 -GOLANGCILINT_VERSION ?= v1.61.0 +GOLANGCILINT_VERSION ?= v1.62.0 GOFUMPT_VERSION ?= v0.7.0 -GO_VERSION ?= 1.23.2 +GO_VERSION ?= 1.23.3 GO_BUILDFLAGS ?= GO_LDFLAGS ?= CGO_ENABLED ?= 0 @@ -41,11 +41,13 @@ PLATFORM ?= linux/amd64 PROGRESS ?= auto PUSH ?= false CI_ARGS ?= +BUILDKIT_MULTI_PLATFORM ?= 1 COMMON_ARGS = --file=Dockerfile COMMON_ARGS += --provenance=false COMMON_ARGS += --progress=$(PROGRESS) COMMON_ARGS += --platform=$(PLATFORM) COMMON_ARGS += --push=$(PUSH) +COMMON_ARGS += --build-arg=BUILDKIT_MULTI_PLATFORM=$(BUILDKIT_MULTI_PLATFORM) COMMON_ARGS += --build-arg=ARTIFACTS="$(ARTIFACTS)" COMMON_ARGS += --build-arg=SHA="$(SHA)" COMMON_ARGS += --build-arg=TAG="$(TAG)" @@ -145,6 +147,15 @@ target-%: ## Builds the specified target defined in the Dockerfile. The build r 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. @$(MAKE) target-$* TARGET_ARGS="--output=type=local,dest=$(DEST) $(TARGET_ARGS)" + @PLATFORM=$(PLATFORM) DEST=$(DEST) bash -c '\ + for platform in $$(tr "," "\n" <<< "$$PLATFORM"); do \ + echo $$platform; \ + directory="$${platform//\//_}"; \ + if [[ -d "$$DEST/$$directory" ]]; then \ + mv "$$DEST/$$directory/"* $$DEST; \ + rmdir "$$DEST/$$directory/"; \ + fi; \ + done' lint-golangci-lint: ## Runs golangci-lint linter. @$(MAKE) target-$@ diff --git a/go.mod b/go.mod index 54b0142..1bc52da 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/siderolabs/crypto go 1.22.1 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.sum b/go.sum index 60ce688..713a0b4 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/x509/x509.go b/x509/x509.go index fee8428..3f6e4a5 100644 --- a/x509/x509.go +++ b/x509/x509.go @@ -1083,7 +1083,7 @@ func (p *PEMEncodedKey) GetEd25519Key() (*Ed25519Key, error) { return &Ed25519Key{ PrivateKey: ed25519Key, - PublicKey: publicKey.(ed25519.PublicKey), //nolint:forcetypeassert + PublicKey: publicKey.(ed25519.PublicKey), //nolint:forcetypeassert,errcheck PrivateKeyPEM: p.Key, PublicKeyPEM: pubPEM, }, nil @@ -1234,24 +1234,24 @@ func NewCertificateAndKey(crt *x509.Certificate, key interface{}, setters ...Opt return nil, fmt.Errorf("failed to create new RSA key: %w", err) } - priv = k.(*RSAKey).keyRSA //nolint:forcetypeassert - pemBytes = k.(*RSAKey).KeyPEM //nolint:forcetypeassert + priv = k.(*RSAKey).keyRSA //nolint:forcetypeassert,errcheck + pemBytes = k.(*RSAKey).KeyPEM //nolint:forcetypeassert,errcheck case *ecdsa.PrivateKey: k, err = NewECDSAKey() if err != nil { return nil, fmt.Errorf("failed to create new RSA key: %w", err) } - priv = k.(*ECDSAKey).keyEC //nolint:forcetypeassert - pemBytes = k.(*ECDSAKey).KeyPEM //nolint:forcetypeassert + priv = k.(*ECDSAKey).keyEC //nolint:forcetypeassert,errcheck + pemBytes = k.(*ECDSAKey).KeyPEM //nolint:forcetypeassert,errcheck case ed25519.PrivateKey: k, err = NewEd25519Key() if err != nil { return nil, fmt.Errorf("failed to create new Ed25519 key: %w", err) } - priv = k.(*Ed25519Key).PrivateKey //nolint:forcetypeassert - pemBytes = k.(*Ed25519Key).PrivateKeyPEM //nolint:forcetypeassert + priv = k.(*Ed25519Key).PrivateKey //nolint:forcetypeassert,errcheck + pemBytes = k.(*Ed25519Key).PrivateKeyPEM //nolint:forcetypeassert,errcheck } csr, err := NewCertificateSigningRequest(priv, setters...)