From bd864307c1fafce37b47c2948fc7659c4387e4ac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Oct 2025 07:35:43 +0000 Subject: [PATCH 2/7] Add Helm v4.0.0-beta.1 support to CI and update version constants Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> --- .github/workflows/Makefile | 2 +- .github/workflows/ci.yaml | 6 ++++++ Dockerfile | 6 +++--- pkg/app/init.go | 2 +- pkg/exectest/helm.go | 2 +- pkg/helmexec/exec.go | 2 +- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/Makefile b/.github/workflows/Makefile index 299e5e2f..7d291a86 100644 --- a/.github/workflows/Makefile +++ b/.github/workflows/Makefile @@ -1,4 +1,4 @@ -HELM_VERSION ?= v3.7.2 +HELM_VERSION ?= v4.0.0-beta.1 KUSTOMIZE_VERSION ?= v5.4.3 K8S_VERSION ?= v1.32.1 MINIKUBE_VERSION ?= v1.31.1 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 92f29ea8..982ae526 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,6 +86,12 @@ jobs: plugin-secrets-version: 4.6.5 plugin-diff-version: 3.12.5 extra-helmfile-flags: '--enable-live-output' + # Test with Helm v4 beta + - helm-version: v4.0.0-beta.1 + kustomize-version: v5.4.3 + plugin-secrets-version: 4.6.5 + plugin-diff-version: 3.12.5 + extra-helmfile-flags: '' steps: - uses: actions/checkout@v5 - uses: actions/setup-go@v6 diff --git a/Dockerfile b/Dockerfile index 2872032e..546d3ed1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ ENV HELM_CONFIG_HOME="${HELM_CONFIG_HOME}" ARG HELM_DATA_HOME="${HOME}/.local/share/helm" ENV HELM_DATA_HOME="${HELM_DATA_HOME}" -ARG HELM_VERSION="v3.19.0" +ARG HELM_VERSION="v4.0.0-beta.1" ENV HELM_VERSION="${HELM_VERSION}" ARG HELM_LOCATION="https://get.helm.sh" ARG HELM_FILENAME="helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz" @@ -38,8 +38,8 @@ RUN set -x && \ curl --retry 5 --retry-connrefused -LO "${HELM_LOCATION}/${HELM_FILENAME}" && \ echo Verifying ${HELM_FILENAME}... && \ case ${TARGETPLATFORM} in \ - "linux/amd64") HELM_SHA256="a7f81ce08007091b86d8bd696eb4d86b8d0f2e1b9f6c714be62f82f96a594496" ;; \ - "linux/arm64") HELM_SHA256="440cf7add0aee27ebc93fada965523c1dc2e0ab340d4348da2215737fc0d76ad" ;; \ + "linux/amd64") HELM_SHA256="7be0196d374ff121409d092d014b7759bc5e9419cda9ada7283dfbe4ff01fce8" ;; \ + "linux/arm64") HELM_SHA256="48c0cfa5107bae86b733eab9150d3422944ff6638db63637e0a7ce6b69060088" ;; \ esac && \ echo "${HELM_SHA256} ${HELM_FILENAME}" | sha256sum -c && \ echo Extracting ${HELM_FILENAME}... && \ diff --git a/pkg/app/init.go b/pkg/app/init.go index 54fbb57b..21609d4d 100644 --- a/pkg/app/init.go +++ b/pkg/app/init.go @@ -19,7 +19,7 @@ import ( const ( HelmRequiredVersion = "v3.18.6" HelmDiffRecommendedVersion = "v3.13.0" - HelmRecommendedVersion = "v3.19.0" + HelmRecommendedVersion = "v4.0.0-beta.1" HelmSecretsRecommendedVersion = "v4.6.5" HelmGitRecommendedVersion = "v1.3.0" HelmS3RecommendedVersion = "v0.16.3" diff --git a/pkg/exectest/helm.go b/pkg/exectest/helm.go index 9daaf0ec..5857d398 100644 --- a/pkg/exectest/helm.go +++ b/pkg/exectest/helm.go @@ -210,7 +210,7 @@ func (helm *Helm) IsHelm3() bool { if helm.Version == nil { return helm.Helm3 } - return helm.Version.Major() == 3 + return helm.Version.Major() >= 3 } func (helm *Helm) GetVersion() helmexec.Version { diff --git a/pkg/helmexec/exec.go b/pkg/helmexec/exec.go index fd185b71..37b5c3ae 100644 --- a/pkg/helmexec/exec.go +++ b/pkg/helmexec/exec.go @@ -647,7 +647,7 @@ func (helm *execer) write(w io.Writer, out []byte) { } func (helm *execer) IsHelm3() bool { - return helm.version.Major() == 3 + return helm.version.Major() >= 3 } func (helm *execer) GetVersion() Version { From 43e40b2191ccd3ead2df6e6b7511893caf178751 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Oct 2025 09:13:59 +0000 Subject: [PATCH 3/7] Revert beta version from defaults - only test v4 in CI matrix Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> --- .github/workflows/Makefile | 2 +- Dockerfile | 6 +++--- pkg/app/init.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Makefile b/.github/workflows/Makefile index 7d291a86..299e5e2f 100644 --- a/.github/workflows/Makefile +++ b/.github/workflows/Makefile @@ -1,4 +1,4 @@ -HELM_VERSION ?= v4.0.0-beta.1 +HELM_VERSION ?= v3.7.2 KUSTOMIZE_VERSION ?= v5.4.3 K8S_VERSION ?= v1.32.1 MINIKUBE_VERSION ?= v1.31.1 diff --git a/Dockerfile b/Dockerfile index 546d3ed1..2872032e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ ENV HELM_CONFIG_HOME="${HELM_CONFIG_HOME}" ARG HELM_DATA_HOME="${HOME}/.local/share/helm" ENV HELM_DATA_HOME="${HELM_DATA_HOME}" -ARG HELM_VERSION="v4.0.0-beta.1" +ARG HELM_VERSION="v3.19.0" ENV HELM_VERSION="${HELM_VERSION}" ARG HELM_LOCATION="https://get.helm.sh" ARG HELM_FILENAME="helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz" @@ -38,8 +38,8 @@ RUN set -x && \ curl --retry 5 --retry-connrefused -LO "${HELM_LOCATION}/${HELM_FILENAME}" && \ echo Verifying ${HELM_FILENAME}... && \ case ${TARGETPLATFORM} in \ - "linux/amd64") HELM_SHA256="7be0196d374ff121409d092d014b7759bc5e9419cda9ada7283dfbe4ff01fce8" ;; \ - "linux/arm64") HELM_SHA256="48c0cfa5107bae86b733eab9150d3422944ff6638db63637e0a7ce6b69060088" ;; \ + "linux/amd64") HELM_SHA256="a7f81ce08007091b86d8bd696eb4d86b8d0f2e1b9f6c714be62f82f96a594496" ;; \ + "linux/arm64") HELM_SHA256="440cf7add0aee27ebc93fada965523c1dc2e0ab340d4348da2215737fc0d76ad" ;; \ esac && \ echo "${HELM_SHA256} ${HELM_FILENAME}" | sha256sum -c && \ echo Extracting ${HELM_FILENAME}... && \ diff --git a/pkg/app/init.go b/pkg/app/init.go index 21609d4d..54fbb57b 100644 --- a/pkg/app/init.go +++ b/pkg/app/init.go @@ -19,7 +19,7 @@ import ( const ( HelmRequiredVersion = "v3.18.6" HelmDiffRecommendedVersion = "v3.13.0" - HelmRecommendedVersion = "v4.0.0-beta.1" + HelmRecommendedVersion = "v3.19.0" HelmSecretsRecommendedVersion = "v4.6.5" HelmGitRecommendedVersion = "v1.3.0" HelmS3RecommendedVersion = "v0.16.3" From b75ce16e3d3fd2f5a4c879a977173d96d471d154 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Oct 2025 09:17:41 +0000 Subject: [PATCH 4/7] Update Helm to v4.0.0-beta.1 in variant Dockerfiles Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> --- Dockerfile.debian-stable-slim | 6 +++--- Dockerfile.ubuntu | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile.debian-stable-slim b/Dockerfile.debian-stable-slim index e80dc89f..0cd5a519 100644 --- a/Dockerfile.debian-stable-slim +++ b/Dockerfile.debian-stable-slim @@ -38,7 +38,7 @@ ENV HELM_CONFIG_HOME="${HELM_CONFIG_HOME}" ARG HELM_DATA_HOME="${HOME}/.local/share/helm" ENV HELM_DATA_HOME="${HELM_DATA_HOME}" -ARG HELM_VERSION="v3.19.0" +ARG HELM_VERSION="v4.0.0-beta.1" ENV HELM_VERSION="${HELM_VERSION}" ARG HELM_LOCATION="https://get.helm.sh" ARG HELM_FILENAME="helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz" @@ -46,8 +46,8 @@ RUN set -x && \ curl --retry 5 --retry-connrefused -LO "${HELM_LOCATION}/${HELM_FILENAME}" && \ echo Verifying ${HELM_FILENAME}... && \ case ${TARGETPLATFORM} in \ - "linux/amd64") HELM_SHA256="a7f81ce08007091b86d8bd696eb4d86b8d0f2e1b9f6c714be62f82f96a594496" ;; \ - "linux/arm64") HELM_SHA256="440cf7add0aee27ebc93fada965523c1dc2e0ab340d4348da2215737fc0d76ad" ;; \ + "linux/amd64") HELM_SHA256="7be0196d374ff121409d092d014b7759bc5e9419cda9ada7283dfbe4ff01fce8" ;; \ + "linux/arm64") HELM_SHA256="48c0cfa5107bae86b733eab9150d3422944ff6638db63637e0a7ce6b69060088" ;; \ esac && \ echo "${HELM_SHA256} ${HELM_FILENAME}" | sha256sum -c && \ echo Extracting ${HELM_FILENAME}... && \ diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 11490b0d..77e2e0bf 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -38,7 +38,7 @@ ENV HELM_CONFIG_HOME="${HELM_CONFIG_HOME}" ARG HELM_DATA_HOME="${HOME}/.local/share/helm" ENV HELM_DATA_HOME="${HELM_DATA_HOME}" -ARG HELM_VERSION="v3.19.0" +ARG HELM_VERSION="v4.0.0-beta.1" ENV HELM_VERSION="${HELM_VERSION}" ARG HELM_LOCATION="https://get.helm.sh" ARG HELM_FILENAME="helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz" @@ -46,8 +46,8 @@ RUN set -x && \ curl --retry 5 --retry-connrefused -LO "${HELM_LOCATION}/${HELM_FILENAME}" && \ echo Verifying ${HELM_FILENAME}... && \ case ${TARGETPLATFORM} in \ - "linux/amd64") HELM_SHA256="a7f81ce08007091b86d8bd696eb4d86b8d0f2e1b9f6c714be62f82f96a594496" ;; \ - "linux/arm64") HELM_SHA256="440cf7add0aee27ebc93fada965523c1dc2e0ab340d4348da2215737fc0d76ad" ;; \ + "linux/amd64") HELM_SHA256="7be0196d374ff121409d092d014b7759bc5e9419cda9ada7283dfbe4ff01fce8" ;; \ + "linux/arm64") HELM_SHA256="48c0cfa5107bae86b733eab9150d3422944ff6638db63637e0a7ce6b69060088" ;; \ esac && \ echo "${HELM_SHA256} ${HELM_FILENAME}" | sha256sum -c && \ echo Extracting ${HELM_FILENAME}... && \ From 0f14c46dbccd2795e28c68d2aba48b29a662795e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Oct 2025 10:01:49 +0000 Subject: [PATCH 5/7] Revert Dockerfile.debian-stable-slim and Dockerfile.ubuntu to v3.19.0 Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> --- Dockerfile.debian-stable-slim | 6 +++--- Dockerfile.ubuntu | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile.debian-stable-slim b/Dockerfile.debian-stable-slim index 0cd5a519..e80dc89f 100644 --- a/Dockerfile.debian-stable-slim +++ b/Dockerfile.debian-stable-slim @@ -38,7 +38,7 @@ ENV HELM_CONFIG_HOME="${HELM_CONFIG_HOME}" ARG HELM_DATA_HOME="${HOME}/.local/share/helm" ENV HELM_DATA_HOME="${HELM_DATA_HOME}" -ARG HELM_VERSION="v4.0.0-beta.1" +ARG HELM_VERSION="v3.19.0" ENV HELM_VERSION="${HELM_VERSION}" ARG HELM_LOCATION="https://get.helm.sh" ARG HELM_FILENAME="helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz" @@ -46,8 +46,8 @@ RUN set -x && \ curl --retry 5 --retry-connrefused -LO "${HELM_LOCATION}/${HELM_FILENAME}" && \ echo Verifying ${HELM_FILENAME}... && \ case ${TARGETPLATFORM} in \ - "linux/amd64") HELM_SHA256="7be0196d374ff121409d092d014b7759bc5e9419cda9ada7283dfbe4ff01fce8" ;; \ - "linux/arm64") HELM_SHA256="48c0cfa5107bae86b733eab9150d3422944ff6638db63637e0a7ce6b69060088" ;; \ + "linux/amd64") HELM_SHA256="a7f81ce08007091b86d8bd696eb4d86b8d0f2e1b9f6c714be62f82f96a594496" ;; \ + "linux/arm64") HELM_SHA256="440cf7add0aee27ebc93fada965523c1dc2e0ab340d4348da2215737fc0d76ad" ;; \ esac && \ echo "${HELM_SHA256} ${HELM_FILENAME}" | sha256sum -c && \ echo Extracting ${HELM_FILENAME}... && \ diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 77e2e0bf..11490b0d 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -38,7 +38,7 @@ ENV HELM_CONFIG_HOME="${HELM_CONFIG_HOME}" ARG HELM_DATA_HOME="${HOME}/.local/share/helm" ENV HELM_DATA_HOME="${HELM_DATA_HOME}" -ARG HELM_VERSION="v4.0.0-beta.1" +ARG HELM_VERSION="v3.19.0" ENV HELM_VERSION="${HELM_VERSION}" ARG HELM_LOCATION="https://get.helm.sh" ARG HELM_FILENAME="helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz" @@ -46,8 +46,8 @@ RUN set -x && \ curl --retry 5 --retry-connrefused -LO "${HELM_LOCATION}/${HELM_FILENAME}" && \ echo Verifying ${HELM_FILENAME}... && \ case ${TARGETPLATFORM} in \ - "linux/amd64") HELM_SHA256="7be0196d374ff121409d092d014b7759bc5e9419cda9ada7283dfbe4ff01fce8" ;; \ - "linux/arm64") HELM_SHA256="48c0cfa5107bae86b733eab9150d3422944ff6638db63637e0a7ce6b69060088" ;; \ + "linux/amd64") HELM_SHA256="a7f81ce08007091b86d8bd696eb4d86b8d0f2e1b9f6c714be62f82f96a594496" ;; \ + "linux/arm64") HELM_SHA256="440cf7add0aee27ebc93fada965523c1dc2e0ab340d4348da2215737fc0d76ad" ;; \ esac && \ echo "${HELM_SHA256} ${HELM_FILENAME}" | sha256sum -c && \ echo Extracting ${HELM_FILENAME}... && \ From 83ad412b322d8ff8909a1bc2931c688c56f4829e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Oct 2025 23:55:01 +0000 Subject: [PATCH 6/7] Mark Helm v4 CI test as experimental with continue-on-error Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 982ae526..4b0c8753 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,12 +86,13 @@ jobs: plugin-secrets-version: 4.6.5 plugin-diff-version: 3.12.5 extra-helmfile-flags: '--enable-live-output' - # Test with Helm v4 beta + # Test with Helm v4 beta (allowed to fail as it's in beta) - helm-version: v4.0.0-beta.1 kustomize-version: v5.4.3 plugin-secrets-version: 4.6.5 plugin-diff-version: 3.12.5 extra-helmfile-flags: '' + experimental: true steps: - uses: actions/checkout@v5 - uses: actions/setup-go@v6 @@ -119,6 +120,7 @@ jobs: kubernetes-version: v1.33.1 - name: Execute integration tests run: make integration + continue-on-error: ${{ matrix.experimental == true }} env: HELM_SECRETS_VERSION: ${{ matrix.plugin-secrets-version }} HELM_DIFF_VERSION: ${{ matrix.plugin-diff-version }} From c2cf9cb989765bcac3eb9ee2c05f75009cde2f99 Mon Sep 17 00:00:00 2001 From: yxxhero Date: Tue, 21 Oct 2025 09:14:59 +0800 Subject: [PATCH 7/7] fix more issue Signed-off-by: yxxhero --- .github/workflows/ci.yaml | 3 --- test/integration/run.sh | 13 ++++++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4b0c8753..4b7fbc4e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,13 +86,11 @@ jobs: plugin-secrets-version: 4.6.5 plugin-diff-version: 3.12.5 extra-helmfile-flags: '--enable-live-output' - # Test with Helm v4 beta (allowed to fail as it's in beta) - helm-version: v4.0.0-beta.1 kustomize-version: v5.4.3 plugin-secrets-version: 4.6.5 plugin-diff-version: 3.12.5 extra-helmfile-flags: '' - experimental: true steps: - uses: actions/checkout@v5 - uses: actions/setup-go@v6 @@ -120,7 +118,6 @@ jobs: kubernetes-version: v1.33.1 - name: Execute integration tests run: make integration - continue-on-error: ${{ matrix.experimental == true }} env: HELM_SECRETS_VERSION: ${{ matrix.plugin-secrets-version }} HELM_DIFF_VERSION: ${{ matrix.plugin-diff-version }} diff --git a/test/integration/run.sh b/test/integration/run.sh index d0abedfb..41548fc6 100755 --- a/test/integration/run.sh +++ b/test/integration/run.sh @@ -30,6 +30,7 @@ export HELM_CONFIG_HOME="${helm_dir}/config" HELM_DIFF_VERSION="${HELM_DIFF_VERSION:-3.12.5}" HELM_GIT_VERSION="${HELM_GIT_VERSION:-1.3.0}" HELM_SECRETS_VERSION="${HELM_SECRETS_VERSION:-3.15.0}" +HELM_CURRENT_VERSION="$(${helm} version --short | grep -o 'v[0-9.]\+')" export GNUPGHOME="${PWD}/${dir}/.gnupg" export SOPS_PGP_FP="B2D6D7BBEC03B2E66571C8C00AD18E16CFDEF700" @@ -70,9 +71,15 @@ function cleanup() { set -e trap cleanup EXIT info "Using namespace: ${test_ns}" -info "Using Helm version:" $(${helm} version --short | grep -o 'v[0-9.]\+') -${helm} plugin ls | grep "^diff" || ${helm} plugin install https://github.com/databus23/helm-diff --version v${HELM_DIFF_VERSION} -${helm} plugin ls | grep "^helm-git" || ${helm} plugin install https://github.com/aslafy-z/helm-git --version v${HELM_GIT_VERSION} +info "Using Helm version:" ${HELM_CURRENT_VERSION} + +# if helm version is bigger or equal than v4.0.0, we need to set HELM_PLUGIN_INSTALL_EXTRA_ARGS to --verify=false +if [[ "${HELM_CURRENT_VERSION}" == v4* ]]; then + HELM_PLUGIN_INSTALL_EXTRA_ARGS="--verify=false" +fi + +${helm} plugin ls | grep "^diff" || ${helm} plugin install https://github.com/databus23/helm-diff --version v${HELM_DIFF_VERSION} ${HELM_PLUGIN_INSTALL_EXTRA_ARGS} +${helm} plugin ls | grep "^helm-git" || ${helm} plugin install https://github.com/aslafy-z/helm-git --version v${HELM_GIT_VERSION} ${HELM_PLUGIN_INSTALL_EXTRA_ARGS} info "Using Kustomize version: $(kustomize version --short | grep -o 'v[0-9.]\+')" ${kubectl} get namespace ${test_ns} &> /dev/null && warn "Namespace ${test_ns} exists, from a previous test run?" ${kubectl} create namespace ${test_ns} || fail "Could not create namespace ${test_ns}"