From 9917344043a3a5ad101ac1497cad722ecf68b276 Mon Sep 17 00:00:00 2001 From: Marcin Franczyk Date: Thu, 11 Sep 2025 16:11:33 +0200 Subject: [PATCH 1/2] chore: bump go version to 1.25 Signed-off-by: Marcin Franczyk --- .devcontainer/Dockerfile | 6 +++--- .github/workflows/lint.yaml | 2 +- CONTRIBUTING.md | 2 +- Dockerfile | 2 +- Dockerfile.cli | 2 +- go.mod | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 58cac9dbd..59c5a0bde 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,10 +1,10 @@ -FROM mcr.microsoft.com/devcontainers/go:1.22-bullseye +FROM mcr.microsoft.com/devcontainers/go:1.25-bookworm ARG TARGETOS ARG TARGETARCH RUN curl -L -o devspace "https://github.com/loft-sh/devspace/releases/latest/download/devspace-linux-${TARGETARCH}" && install -c -m 0755 devspace /usr/local/bin RUN curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-${TARGETARCH}" && install -c -m 0755 vcluster /usr/local/bin -RUN curl -L -o kind "https://kind.sigs.k8s.io/dl/v0.17.0/kind-linux-${TARGETARCH}" && install -c -m 0755 kind /usr/local/bin +RUN curl -L -o kind "https://kind.sigs.k8s.io/dl/v0.29.0/kind-linux-${TARGETARCH}" && install -c -m 0755 kind /usr/local/bin RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${TARGETARCH}/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin -RUN bash -c "curl -s https://get.helm.sh/helm-v3.11.1-linux-${TARGETARCH}.tar.gz > helm3.tar.gz" && tar -zxvf helm3.tar.gz linux-${TARGETARCH}/helm && chmod +x linux-${TARGETARCH}/helm && mv linux-${TARGETARCH}/helm /usr/local/bin && rm helm3.tar.gz && rm -R linux-${TARGETARCH} +RUN bash -c "curl -s https://get.helm.sh/helm-v3.18.6-linux-${TARGETARCH}.tar.gz > helm3.tar.gz" && tar -zxvf helm3.tar.gz linux-${TARGETARCH}/helm && chmod +x linux-${TARGETARCH}/helm && mv linux-${TARGETARCH}/helm /usr/local/bin && rm helm3.tar.gz && rm -R linux-${TARGETARCH} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 7089fcdd3..4d0d01126 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -67,4 +67,4 @@ jobs: - name: Run golangci-lint uses: golangci/golangci-lint-action@v8 with: - version: v2.1 + version: v2.4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 56dd8fd1b..28e47b915 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -210,7 +210,7 @@ Test the built CLI tool ### Pre-requisites -- [Golang v1.24](https://go.dev/doc/install) +- [Golang v1.25](https://go.dev/doc/install) - [Goreleaser](https://goreleaser.com/install/) - [Just](https://github.com/casey/just) - [Kind](https://kind.sigs.k8s.io/) diff --git a/Dockerfile b/Dockerfile index 556c6a62e..475559033 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG KINE_VERSION="v0.13.14" FROM rancher/kine:${KINE_VERSION} AS kine # Build program -FROM golang:1.24 AS builder +FROM golang:1.25 AS builder WORKDIR /vcluster-dev ARG TARGETOS diff --git a/Dockerfile.cli b/Dockerfile.cli index b2054c422..2164b215d 100644 --- a/Dockerfile.cli +++ b/Dockerfile.cli @@ -1,4 +1,4 @@ -FROM golang:1.24 as builder +FROM golang:1.25 as builder WORKDIR /vcluster-dev ARG TARGETOS diff --git a/go.mod b/go.mod index 752d24293..badd33047 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/loft-sh/vcluster -go 1.24.0 +go 1.25 require ( github.com/aws/aws-sdk-go-v2 v1.36.3 From 79caceffeafb83c5dc97ae952b14f934bbd57b39 Mon Sep 17 00:00:00 2001 From: Marcin Franczyk Date: Fri, 12 Sep 2025 11:28:25 +0200 Subject: [PATCH 2/2] chore(lint): add revive exception rules for already existing packages Signed-off-by: Marcin Franczyk --- .golangci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 63711bae7..50527124b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -87,6 +87,11 @@ linters: text: 'SA1019: (.+)Secret is deprecated: Use AdditionalSecrets instead.' - path: pkg/config/validation.go text: 'SA1019: (.+)Secret is deprecated: Use AdditionalSecrets instead.' + # The following exceptions apply only to existing packages that need refactoring. + # The rule remains enabled globally. + - path: ^pkg/(cli/util|server/types|snapshot/types|syncer/types|util|plugin/types)/[^/]+\.go$ + linters: [revive] + text: avoid meaningless package names paths: - licenses # Paths below are added by 'golangci-lint migrate' when migrating from v1 to v2. They are the