From 33c082d8fdc3bf41e977595d24d0533a9535c3b3 Mon Sep 17 00:00:00 2001 From: Petri Kero Date: Sat, 15 Nov 2025 11:37:32 +0200 Subject: [PATCH 1/3] Initial stab at migrating to Helm v4. --- cmd/deploy_botclient.go | 4 +- cmd/deploy_server.go | 6 +- cmd/get_server_info.go | 8 +-- go.mod | 33 +++++----- go.sum | 90 ++++++++++++++++------------ pkg/envapi/wait_server_ready.go | 11 +++- pkg/helmutil/client_config.go | 5 +- pkg/helmutil/get_existing_release.go | 6 +- pkg/helmutil/list_releases.go | 27 ++++++--- pkg/helmutil/uninstall_release.go | 9 +-- pkg/helmutil/upgrade_or_install.go | 73 +++++++++++++++------- 11 files changed, 167 insertions(+), 105 deletions(-) diff --git a/cmd/deploy_botclient.go b/cmd/deploy_botclient.go index c53559f2..33cea4a3 100644 --- a/cmd/deploy_botclient.go +++ b/cmd/deploy_botclient.go @@ -19,7 +19,7 @@ import ( "github.com/metaplay/cli/pkg/styles" "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "helm.sh/helm/v3/pkg/release" + rcommon "helm.sh/helm/v4/pkg/release/common" ) const metaplayLoadTestChartName = "metaplay-loadtest" @@ -261,7 +261,7 @@ func (o *deployBotClientOpts) Run(cmd *cobra.Command) error { if existingRelease != nil { releaseName := existingRelease.Name releaseStatus := existingRelease.Info.Status - if releaseStatus == release.StatusUninstalling { + if releaseStatus == rcommon.StatusUninstalling { return fmt.Errorf("Helm release %s is in state 'uninstalling'; try again later or manually uninstall the botclient with 'metaplay remove botclient'", releaseName) } else if releaseStatus.IsPending() { return fmt.Errorf("Helm release %s is in state '%s'; you can manually uninstall the botclient with 'metaplay remove botclient'", releaseName, releaseStatus) diff --git a/cmd/deploy_server.go b/cmd/deploy_server.go index 39ff0b83..99b9febe 100644 --- a/cmd/deploy_server.go +++ b/cmd/deploy_server.go @@ -20,7 +20,7 @@ import ( "github.com/metaplay/cli/pkg/styles" "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "helm.sh/helm/v3/pkg/release" + rcommon "helm.sh/helm/v4/pkg/release/common" ) const metaplayGameServerChartName = "metaplay-gameserver" @@ -444,7 +444,7 @@ func (o *deployGameServerOpts) Run(cmd *cobra.Command) error { log.Info().Msgf(" %-19s %s", "Revision:", styles.RenderTechnical(fmt.Sprintf("%d", existingRelease.Version))) lastDeployedAt := "Unknown" if !existingRelease.Info.LastDeployed.IsZero() { - lastDeployedAt = humanize.Time(existingRelease.Info.LastDeployed.Time) + lastDeployedAt = humanize.Time(existingRelease.Info.LastDeployed) } log.Info().Msgf(" %-19s %s", "Last Deployed:", styles.RenderTechnical(lastDeployedAt)) } @@ -454,7 +454,7 @@ func (o *deployGameServerOpts) Run(cmd *cobra.Command) error { uninstallExistingRelease := false if existingRelease != nil { releaseStatus := existingRelease.Info.Status - if releaseStatus == release.StatusUninstalling { + if releaseStatus == rcommon.StatusUninstalling { log.Error().Msgf("Helm release is in state 'uninstalling'; try again later or manually uninstall the server with %s", styles.RenderPrompt("metaplay remove server")) return fmt.Errorf("Unable to deploy server due to existing Helm release is in state 'uninstalling'") } else if releaseStatus.IsPending() { diff --git a/cmd/get_server_info.go b/cmd/get_server_info.go index 81be6785..cbfa5125 100644 --- a/cmd/get_server_info.go +++ b/cmd/get_server_info.go @@ -18,7 +18,7 @@ import ( "github.com/metaplay/cli/pkg/styles" "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "helm.sh/helm/v3/pkg/release" + v1 "helm.sh/helm/v4/pkg/release/v1" ) type getServerInfoOpts struct { @@ -238,13 +238,13 @@ func (o *getServerInfoOpts) gatherDeployedServerInfo(ctx context.Context, target } // Extract the Helm release information from a release object into a simpler info class. -func (o *getServerInfoOpts) getHelmReleaseInfo(releaseInfo *release.Release) (*helmReleaseInfo, error) { +func (o *getServerInfoOpts) getHelmReleaseInfo(releaseInfo *v1.Release) (*helmReleaseInfo, error) { helmInfo := &helmReleaseInfo{ Name: releaseInfo.Name, Status: releaseInfo.Info.Status.String(), Namespace: releaseInfo.Namespace, Revision: releaseInfo.Version, - LastDeployed: releaseInfo.Info.LastDeployed.Time, + LastDeployed: releaseInfo.Info.LastDeployed, } if releaseInfo.Chart != nil && releaseInfo.Chart.Metadata != nil { @@ -256,7 +256,7 @@ func (o *getServerInfoOpts) getHelmReleaseInfo(releaseInfo *release.Release) (*h } // Extract information about the docker image used in the game server deployment. -func (o *getServerInfoOpts) getImageInfo(ctx context.Context, targetEnv *envapi.TargetEnvironment, existingRelease *release.Release) (*deploymentImageInfo, error) { +func (o *getServerInfoOpts) getImageInfo(ctx context.Context, targetEnv *envapi.TargetEnvironment, existingRelease *v1.Release) (*deploymentImageInfo, error) { // Extract image information from Helm release values. var imageTag, fullImageRef string if existingRelease.Config != nil { diff --git a/go.mod b/go.mod index 5e62576b..739aa652 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/zalando/go-keyring v0.2.6 golang.org/x/sys v0.38.0 gopkg.in/yaml.v3 v3.0.1 - helm.sh/helm/v3 v3.19.0 + helm.sh/helm/v4 v4.0.0 k8s.io/api v0.34.1 k8s.io/apimachinery v0.34.1 k8s.io/client-go v0.34.1 @@ -50,6 +50,7 @@ require ( github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/Masterminds/squirrel v1.5.4 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/ProtonMail/go-crypto v1.3.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/atotto/clipboard v0.1.4 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.18.24 // indirect @@ -71,14 +72,14 @@ require ( github.com/charmbracelet/x/ansi v0.10.1 // indirect github.com/charmbracelet/x/cellbuf v0.0.13 // indirect github.com/charmbracelet/x/term v0.2.1 // indirect - github.com/containerd/containerd v1.7.28 // indirect + github.com/cloudflare/circl v1.6.1 // indirect github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/containerd/stargz-snapshotter/estargz v0.17.0 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/cyphar/filepath-securejoin v0.4.1 // indirect + github.com/cyphar/filepath-securejoin v0.5.0 // indirect github.com/danieljoos/wincred v1.2.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidmz/go-pageant v1.0.2 // indirect @@ -87,13 +88,16 @@ require ( github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker-credential-helpers v0.9.3 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/dylibso/observe-sdk/go v0.0.0-20240819160327-2d926c5d788a // indirect github.com/ebitengine/purego v0.8.4 // indirect github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect - github.com/evanphx/json-patch v5.9.11+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect + github.com/extism/go-sdk v1.7.1 // indirect github.com/fatih/color v1.18.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fluxcd/cli-utils v0.36.0-flux.14 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-errors/errors v1.5.1 // indirect github.com/go-fed/httpsig v1.1.0 // indirect @@ -116,11 +120,10 @@ require ( github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/gosuri/uitable v0.0.4 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.8 // indirect github.com/huandu/xstrings v1.5.0 // indirect + github.com/ianlancetaylor/demangle v0.0.0-20240805132620-81f5be970eca // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmoiron/sqlx v1.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -163,9 +166,6 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.64.0 // indirect - github.com/prometheus/procfs v0.16.1 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rubenv/sql-migrate v1.8.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect @@ -176,6 +176,8 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/cast v1.8.0 // indirect github.com/stretchr/testify v1.11.1 // indirect + github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 // indirect + github.com/tetratelabs/wazero v1.9.0 // indirect github.com/tidwall/gjson v1.18.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect @@ -190,10 +192,10 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect - go.opentelemetry.io/otel v1.36.0 // indirect + go.opentelemetry.io/otel v1.37.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect - go.opentelemetry.io/otel/metric v1.36.0 // indirect - go.opentelemetry.io/otel/trace v1.36.0 // indirect + go.opentelemetry.io/otel/metric v1.37.0 // indirect + go.opentelemetry.io/otel/trace v1.37.0 // indirect go.opentelemetry.io/proto/otlp v1.6.0 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect @@ -204,19 +206,18 @@ require ( golang.org/x/term v0.36.0 // indirect golang.org/x/text v0.30.0 // indirect golang.org/x/time v0.12.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250428153025-10db94c68c34 // indirect - google.golang.org/grpc v1.72.1 // indirect google.golang.org/protobuf v1.36.6 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/apiextensions-apiserver v0.34.0 // indirect - k8s.io/apiserver v0.34.0 // indirect + k8s.io/apiextensions-apiserver v0.34.1 // indirect + k8s.io/apiserver v0.34.1 // indirect k8s.io/cli-runtime v0.34.1 // indirect k8s.io/component-base v0.34.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect oras.land/oras-go/v2 v2.6.0 // indirect + sigs.k8s.io/controller-runtime v0.22.3 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/kustomize/api v0.20.1 // indirect sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect diff --git a/go.sum b/go.sum index b5390fbf..7891fd96 100644 --- a/go.sum +++ b/go.sum @@ -28,6 +28,8 @@ github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8 github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw= +github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= @@ -94,8 +96,8 @@ github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payR github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= -github.com/containerd/containerd v1.7.28 h1:Nsgm1AtcmEh4AHAJ4gGlNSaKgXiNccU270Dnf81FQ3c= -github.com/containerd/containerd v1.7.28/go.mod h1:azUkWcOvHrWvaiUjSQH0fjzuHIwSPg1WL5PshGP4Szs= +github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= +github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= @@ -115,8 +117,8 @@ github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creativeprojects/go-selfupdate v1.5.1 h1:fuyEGFFfqcC8SxDGolcEPYPLXGQ9Mcrc5uRyRG2Mqnk= github.com/creativeprojects/go-selfupdate v1.5.1/go.mod h1:2uY75rP8z/D/PBuDn6mlBnzu+ysEmwOJfcgF8np0JIM= -github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= -github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= +github.com/cyphar/filepath-securejoin v0.5.0 h1:hIAhkRBMQ8nIeuVwcAoymp7MY4oherZdAxD+m0u9zaw= +github.com/cyphar/filepath-securejoin v0.5.0/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0= github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -151,20 +153,26 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4 github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dylibso/observe-sdk/go v0.0.0-20240819160327-2d926c5d788a h1:UwSIFv5g5lIvbGgtf3tVwC7Ky9rmMFBp0RMs+6f6YqE= +github.com/dylibso/observe-sdk/go v0.0.0-20240819160327-2d926c5d788a/go.mod h1:C8DzXehI4zAbrdlbtOByKX6pfivJTBiV9Jjqv56Yd9Q= github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw= github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= -github.com/evanphx/json-patch v5.9.11+incompatible h1:ixHHqfcGvxhWkniF1tWxBHA0yb4Z+d1UQi45df52xW8= -github.com/evanphx/json-patch v5.9.11+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= +github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/extism/go-sdk v1.7.1 h1:lWJos6uY+tRFdlIHR+SJjwFDApY7OypS/2nMhiVQ9Sw= +github.com/extism/go-sdk v1.7.1/go.mod h1:IT+Xdg5AZM9hVtpFUA+uZCJMge/hbvshl8bwzLtFyKA= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fluxcd/cli-utils v0.36.0-flux.14 h1:I//AMVUXTc+M04UtIXArMXQZCazGMwfemodV1j/yG8c= +github.com/fluxcd/cli-utils v0.36.0-flux.14/go.mod h1:uDo7BYOfbdmk/asnHuI0IQPl6u0FCgcN54AHDu3Y5As= github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI= github.com/foxcpp/go-mockdns v1.1.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -182,6 +190,8 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic= @@ -208,8 +218,6 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= @@ -226,8 +234,8 @@ github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5 h1:xhMrHhTJ6zxu3gA4enFM9MLn9AY7613teCdFnlUVbSQ= +github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -244,15 +252,10 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48= github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= @@ -263,6 +266,8 @@ github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvH github.com/hashicorp/golang-lru/v2 v2.0.5/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/ianlancetaylor/demangle v0.0.0-20240805132620-81f5be970eca h1:T54Ema1DU8ngI+aef9ZhAhNGQhcRTrWxVeG07F+c/Rw= +github.com/ianlancetaylor/demangle v0.0.0-20240805132620-81f5be970eca/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= @@ -360,18 +365,16 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= -github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= -github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= -github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= +github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= +github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y= +github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= -github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -387,10 +390,10 @@ github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/ github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.64.0 h1:pdZeA+g617P7oGv1CzdTzyeShxAGrTBsolKNOLQPGO4= -github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= -github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= -github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= +github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE= +github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= +github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0= +github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw= github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5 h1:EaDatTxkdHG+U3Bk4EUr+DZ7fOGwTfezUiUJMaIcaho= github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5/go.mod h1:fyalQWdtzDBECAQFBJuQe5bzQ02jGd5Qcbgb97Flm7U= github.com/redis/go-redis/extra/redisotel/v9 v9.0.5 h1:EfpWLLCyXw8PSM2/XNJLjI3Pb27yVE+gIAfeqp8LUCc= @@ -439,6 +442,10 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/testcontainers/testcontainers-go v0.40.0 h1:pSdJYLOVgLE8YdUY2FHQ1Fxu+aMnb6JfVz1mxk7OeMU= github.com/testcontainers/testcontainers-go v0.40.0/go.mod h1:FSXV5KQtX2HAMlm7U3APNyLkkap35zNLxukw9oBi/MY= +github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 h1:ZF+QBjOI+tILZjBaFj3HgFonKXUcwgJ4djLb6i42S3Q= +github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834/go.mod h1:m9ymHTgNSEjuxvw8E7WWe4Pl4hZQHXONY8wE6dMLaRk= +github.com/tetratelabs/wazero v1.9.0 h1:IcZ56OuxrtaEz8UYNRHBrUa9bYeX9oVY93KspZZBf/I= +github.com/tetratelabs/wazero v1.9.0/go.mod h1:TSbcXCfFP0L2FGkRPxHphadXPjo1T6W+CseNNY7EkjM= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -479,8 +486,8 @@ go.opentelemetry.io/contrib/exporters/autoexport v0.57.0 h1:jmTVJ86dP60C01K3slFQ go.opentelemetry.io/contrib/exporters/autoexport v0.57.0/go.mod h1:EJBheUMttD/lABFyLXhce47Wr6DPWYReCzaZiXadH7g= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0 h1:WzNab7hOOLzdDF/EoWCt4glhrbMPVMOO5JYTmpz36Ls= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0/go.mod h1:hKvJwTzJdp90Vh7p6q/9PAOd55dI6WA6sWj62a/JvSs= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.8.0 h1:S+LdBGiQXtJdowoJoQPEtI52syEP/JYBUpjO49EQhV8= @@ -505,20 +512,26 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.32.0 h1:cC2yDI3IQd0Udsu go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.32.0/go.mod h1:2PD5Ex6z8CFzDbTdOlwyNIUywRr1DN0ospafJM1wJ+s= go.opentelemetry.io/otel/log v0.8.0 h1:egZ8vV5atrUWUbnSsHn6vB8R21G2wrKqNiDt3iWertk= go.opentelemetry.io/otel/log v0.8.0/go.mod h1:M9qvDdUTRCopJcGRKg57+JSQ9LgLBrwwfC32epk5NX8= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= go.opentelemetry.io/otel/sdk/log v0.8.0 h1:zg7GUYXqxk1jnGF/dTdLPrK06xJdrXgqgFLnI4Crxvs= go.opentelemetry.io/otel/sdk/log v0.8.0/go.mod h1:50iXr0UVwQrYS45KbruFrEt4LvAdCaWWgIrsN3ZQggo= go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= go.opentelemetry.io/proto/otlp v1.6.0 h1:jQjP+AQyTf+Fe7OKj/MfkDrmK4MNVtw2NpXsf9fefDI= go.opentelemetry.io/proto/otlp v1.6.0/go.mod h1:cicgGehlFuNdgZkcALOCh3VE6K/u2tAjzlRhDwmVpZc= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= @@ -590,7 +603,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg= google.golang.org/genproto/googleapis/api v0.0.0-20250428153025-10db94c68c34 h1:0PeQib/pH3nB/5pEmFeVQJotzGohV0dq4Vcp09H5yhE= google.golang.org/genproto/googleapis/api v0.0.0-20250428153025-10db94c68c34/go.mod h1:0awUlEkap+Pb1UMeJwJQQAdJQrt3moU7J2moTy69irI= google.golang.org/genproto/googleapis/rpc v0.0.0-20250428153025-10db94c68c34 h1:h6p3mQqrmT1XkHVTfzLdNz1u7IhINeZkz67/xTbOuWs= @@ -613,16 +625,16 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= -helm.sh/helm/v3 v3.19.0 h1:krVyCGa8fa/wzTZgqw0DUiXuRT5BPdeqE/sQXujQ22k= -helm.sh/helm/v3 v3.19.0/go.mod h1:Lk/SfzN0w3a3C3o+TdAKrLwJ0wcZ//t1/SDXAvfgDdc= +helm.sh/helm/v4 v4.0.0 h1:Ppai7cygdmyxSR+JR9djUoVrRmyMI/yY5P5TBd25oHs= +helm.sh/helm/v4 v4.0.0/go.mod h1:G1Y5AE+lJPQSAjh7nbXnhZrtGtxo+I6POSu9DruYiGI= k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM= k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk= -k8s.io/apiextensions-apiserver v0.34.0 h1:B3hiB32jV7BcyKcMU5fDaDxk882YrJ1KU+ZSkA9Qxoc= -k8s.io/apiextensions-apiserver v0.34.0/go.mod h1:hLI4GxE1BDBy9adJKxUxCEHBGZtGfIg98Q+JmTD7+g0= +k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJbII2CI= +k8s.io/apiextensions-apiserver v0.34.1/go.mod h1:hP9Rld3zF5Ay2Of3BeEpLAToP+l4s5UlxiHfqRaRcMc= k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4= k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= -k8s.io/apiserver v0.34.0 h1:Z51fw1iGMqN7uJ1kEaynf2Aec1Y774PqU+FVWCFV3Jg= -k8s.io/apiserver v0.34.0/go.mod h1:52ti5YhxAvewmmpVRqlASvaqxt0gKJxvCeW7ZrwgazQ= +k8s.io/apiserver v0.34.1 h1:U3JBGdgANK3dfFcyknWde1G6X1F4bg7PXuvlqt8lITA= +k8s.io/apiserver v0.34.1/go.mod h1:eOOc9nrVqlBI1AFCvVzsob0OxtPZUCPiUJL45JOTBG0= k8s.io/cli-runtime v0.34.1 h1:btlgAgTrYd4sk8vJTRG6zVtqBKt9ZMDeQZo2PIzbL7M= k8s.io/cli-runtime v0.34.1/go.mod h1:aVA65c+f0MZiMUPbseU/M9l1Wo2byeaGwUuQEQVVveE= k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY= @@ -639,6 +651,8 @@ k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= oras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc= oras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o= +sigs.k8s.io/controller-runtime v0.22.3 h1:I7mfqz/a/WdmDCEnXmSPm8/b/yRTy6JsKKENTijTq8Y= +sigs.k8s.io/controller-runtime v0.22.3/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I= diff --git a/pkg/envapi/wait_server_ready.go b/pkg/envapi/wait_server_ready.go index 8a871e00..827da93e 100644 --- a/pkg/envapi/wait_server_ready.go +++ b/pkg/envapi/wait_server_ready.go @@ -370,7 +370,16 @@ func isGameServerReady(ctx context.Context, kubeCli *KubeClient, gameServer *Tar return false, nil, fmt.Errorf("pod %s failed to deploy (see above for logs and details)", podName) } } else { - statusLines = append(statusLines, fmt.Sprintf(" %s: not found", podName)) + // Pod not in our filtered list - try to fetch it directly to see if it exists + actualPod, err := kubeCli.Clientset.CoreV1().Pods(kubeCli.Namespace).Get(ctx, podName, metav1.GetOptions{}) + if err != nil { + // Pod truly doesn't exist + statusLines = append(statusLines, fmt.Sprintf(" %s: not found", podName)) + } else { + // Pod exists but didn't pass our filters (old version, terminating, etc.) + status := resolvePodStatus(*actualPod) + statusLines = append(statusLines, fmt.Sprintf(" %s: %s [%s] (old version, being replaced)", podName, status.Phase, status.Message)) + } allPodsReady = false } } diff --git a/pkg/helmutil/client_config.go b/pkg/helmutil/client_config.go index 0fbed57b..2cbab46a 100644 --- a/pkg/helmutil/client_config.go +++ b/pkg/helmutil/client_config.go @@ -8,8 +8,7 @@ import ( "fmt" "time" - "github.com/rs/zerolog/log" - "helm.sh/helm/v3/pkg/action" + "helm.sh/helm/v4/pkg/action" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/client-go/discovery" "k8s.io/client-go/discovery/cached/memory" @@ -34,7 +33,7 @@ func NewActionConfig(kubeconfigPayload string, namespace string) (*action.Config // Initialize Helm action configuration actionConfig := new(action.Configuration) - if err := actionConfig.Init(restGetter, namespace, "secret", log.Printf); err != nil { + if err := actionConfig.Init(restGetter, namespace, "secret"); err != nil { return nil, fmt.Errorf("failed to initialize Helm configuration: %w", err) } diff --git a/pkg/helmutil/get_existing_release.go b/pkg/helmutil/get_existing_release.go index c5bb52e3..46dfb125 100644 --- a/pkg/helmutil/get_existing_release.go +++ b/pkg/helmutil/get_existing_release.go @@ -7,8 +7,8 @@ package helmutil import ( "fmt" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v4/pkg/action" + v1 "helm.sh/helm/v4/pkg/release/v1" ) const ( @@ -18,7 +18,7 @@ const ( // Find an existing Helm relase with the given chart name. // If multiple releases are found, it is considered an error. -func GetExistingRelease(actionConfig *action.Configuration, chartName string) (*release.Release, error) { +func GetExistingRelease(actionConfig *action.Configuration, chartName string) (*v1.Release, error) { // Find all releases of the chart deployed in the environment. releases, err := HelmListReleases(actionConfig, chartName) if err != nil { diff --git a/pkg/helmutil/list_releases.go b/pkg/helmutil/list_releases.go index ab91ff7e..05b5c8ce 100644 --- a/pkg/helmutil/list_releases.go +++ b/pkg/helmutil/list_releases.go @@ -9,13 +9,13 @@ import ( "strings" "github.com/rs/zerolog/log" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v4/pkg/action" + v1 "helm.sh/helm/v4/pkg/release/v1" ) // HelmListReleases lists all Helm releases in the specified namespace // that match the specified chartName. -func HelmListReleases(actionConfig *action.Configuration, chartName string) ([]*release.Release, error) { +func HelmListReleases(actionConfig *action.Configuration, chartName string) ([]*v1.Release, error) { // Create Helm List action list := action.NewList(actionConfig) list.AllNamespaces = false // restrict to the given namespace @@ -23,28 +23,39 @@ func HelmListReleases(actionConfig *action.Configuration, chartName string) ([]* list.SetStateMask() // make sure the derived state is up-to-date // Execute the List action - releases, err := list.Run() + releasers, err := list.Run() if err != nil { return nil, fmt.Errorf("failed to list Helm releases: %w", err) } + + // Convert Releaser interfaces to concrete v1.Release types + var releases []*v1.Release + for _, releaser := range releasers { + if rel, ok := releaser.(*v1.Release); ok { + releases = append(releases, rel) + } else { + log.Warn().Msgf("Unexpected release type: %T", releaser) + } + } + log.Debug().Msgf("Found %d Helm releases: %s", len(releases), strings.Join(GetReleaseNames(releases), ", ")) // Filter releases by chart name - var filteredReleases []*release.Release + var matchingReleases []*v1.Release for _, rel := range releases { if rel.Chart != nil && rel.Chart.Metadata != nil { if rel.Chart.Metadata.Name == chartName { - filteredReleases = append(filteredReleases, rel) + matchingReleases = append(matchingReleases, rel) } } else { log.Warn().Msgf("Found chart with missing metadata: %s", rel.Name) } } - return filteredReleases, nil + return matchingReleases, nil } -func GetReleaseNames(releases []*release.Release) []string { +func GetReleaseNames(releases []*v1.Release) []string { names := make([]string, len(releases)) for ndx, release := range releases { names[ndx] = release.Name diff --git a/pkg/helmutil/uninstall_release.go b/pkg/helmutil/uninstall_release.go index 97ba5973..f35da504 100644 --- a/pkg/helmutil/uninstall_release.go +++ b/pkg/helmutil/uninstall_release.go @@ -8,16 +8,17 @@ import ( "fmt" "time" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/kube" + v1 "helm.sh/helm/v4/pkg/release/v1" ) // UninstallRelease uninstalls the given Helm release. -func UninstallRelease(actionConfig *action.Configuration, release *release.Release) error { +func UninstallRelease(actionConfig *action.Configuration, release *v1.Release) error { // Create Helm Uninstall action uninstall := action.NewUninstall(actionConfig) - uninstall.Wait = true uninstall.Timeout = 5 * time.Minute + uninstall.WaitStrategy = kube.LegacyStrategy // Wait for resources to be deleted (legacy wait behavior) // Execute the Uninstall action _, err := uninstall.Run(release.Name) diff --git a/pkg/helmutil/upgrade_or_install.go b/pkg/helmutil/upgrade_or_install.go index 9b1794a0..7ea73916 100644 --- a/pkg/helmutil/upgrade_or_install.go +++ b/pkg/helmutil/upgrade_or_install.go @@ -6,18 +6,20 @@ package helmutil import ( "fmt" + "os" "reflect" - "strings" "time" "github.com/metaplay/cli/internal/tui" "github.com/rs/zerolog/log" "gopkg.in/yaml.v3" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/chart/loader" - "helm.sh/helm/v3/pkg/chartutil" - "helm.sh/helm/v3/pkg/cli" - "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/chart/loader" + v2chart "helm.sh/helm/v4/pkg/chart/v2" + v2loader "helm.sh/helm/v4/pkg/chart/v2/loader" + "helm.sh/helm/v4/pkg/cli" + "helm.sh/helm/v4/pkg/kube" + v1 "helm.sh/helm/v4/pkg/release/v1" ) // HelmUpgradeOrInstall performs the equivalent of `helm upgrade --install --wait --values ...` @@ -32,7 +34,7 @@ import ( func HelmUpgradeOrInstall( output *tui.TaskOutput, actionConfig *action.Configuration, - existingRelease *release.Release, + existingRelease *v1.Release, namespace, releaseName, chartURL string, chartVersion string, valuesFiles []string, @@ -40,7 +42,7 @@ func HelmUpgradeOrInstall( requiredValues map[string]any, timeout time.Duration, validateValuesSchema bool, -) (*release.Release, error) { +) (*v1.Release, error) { // Validate that defaultValues and requiredValues have correct types if err := validateHelmValuesTypes(defaultValues, "defaultValues"); err != nil { return nil, fmt.Errorf("invalid defaultValues: %w", err) @@ -53,13 +55,8 @@ func HelmUpgradeOrInstall( headerLine := fmt.Sprintf("Deploying chart %s as release %s", chartURL, releaseName) output.SetHeaderLines([]string{headerLine}) - // Pipe Helm output to task output - actionConfig.Log = func(format string, args ...any) { - // Render line and trim any trailing line endings - line := fmt.Sprintf(format, args...) - line = strings.TrimRight(line, "\r\n") - output.AppendLine(line) - } + // Note: In Helm v4, logging is handled via slog and cannot be easily redirected + // The actionConfig.Log field no longer exists var installCmd *action.Install var upgradeCmd *action.Upgrade @@ -74,8 +71,9 @@ func HelmUpgradeOrInstall( installCmd.Version = chartVersion installCmd.ReleaseName = releaseName installCmd.Namespace = namespace - installCmd.Wait = true installCmd.Timeout = timeout + installCmd.WaitStrategy = kube.LegacyStrategy // Wait for resources to be ready (legacy wait behavior) + installCmd.WaitForJobs = true // Also wait for jobs to complete installCmd.Devel = true // If version is development, accept it installCmd.SkipSchemaValidation = !validateValuesSchema // Disable schema validation for legacy charts chartPathOptions = &installCmd.ChartPathOptions @@ -84,11 +82,13 @@ func HelmUpgradeOrInstall( upgradeCmd = action.NewUpgrade(actionConfig) upgradeCmd.Version = chartVersion upgradeCmd.Namespace = namespace - upgradeCmd.Wait = true upgradeCmd.Timeout = timeout + upgradeCmd.WaitStrategy = kube.LegacyStrategy // Wait for resources to be ready (legacy wait behavior) + upgradeCmd.WaitForJobs = true // Also wait for jobs to complete upgradeCmd.MaxHistory = 10 // Keep 10 releases max upgradeCmd.Devel = true // If version is development, accept it - upgradeCmd.Atomic = false // Don't rollback on failures to not hide errors + upgradeCmd.ForceReplace = true // Force recreate resources (delete old, create new) instead of rolling update + upgradeCmd.RollbackOnFailure = false // Don't rollback on failures to not hide errors (was Atomic) upgradeCmd.CleanupOnFail = true // Clean resources on failure upgradeCmd.SkipSchemaValidation = !validateValuesSchema // Disable schema validation for legacy charts chartPathOptions = &upgradeCmd.ChartPathOptions @@ -109,7 +109,18 @@ func HelmUpgradeOrInstall( return nil, fmt.Errorf("failed to load Helm chart: %w", err) } - output.AppendLinef("Chart loaded: %s (version %s)", loadedChart.Name(), loadedChart.Metadata.Version) + // Get chart metadata - loader.Load returns a v2.Chart + v2Chart, ok := loadedChart.(*v2chart.Chart) + if !ok { + return nil, fmt.Errorf("unexpected chart type: %T", loadedChart) + } + chartName := "" + loadedChartVersion := "" + if v2Chart.Metadata != nil { + chartName = v2Chart.Metadata.Name + loadedChartVersion = v2Chart.Metadata.Version + } + output.AppendLinef("Chart loaded: %s (version %s)", chartName, loadedChartVersion) // Construct base values baseValues := map[string]any{} @@ -121,13 +132,19 @@ func HelmUpgradeOrInstall( filesValueMap := map[string]any{} for _, valuesFile := range valuesFiles { output.AppendLinef("Loading values from: %s", valuesFile) - values, err := chartutil.ReadValuesFile(valuesFile) + file, err := os.Open(valuesFile) + if err != nil { + return nil, fmt.Errorf("failed to open values file: %w", err) + } + defer file.Close() + + values, err := v2loader.LoadValues(file) if err != nil { return nil, fmt.Errorf("failed to read values file: %w", err) } // Merge with previous values, files processed later override earlier ones - filesValueMap = mergeValuesMaps(filesValueMap, values.AsMap()) + filesValueMap = mergeValuesMaps(filesValueMap, values) } // Resolve final configurable values map: use defaultValues as base to allow files to override any defaults. @@ -154,17 +171,27 @@ func HelmUpgradeOrInstall( output.AppendLine("Starting Helm deployment...") if installCmd != nil { output.AppendLine("Installing new release...") - release, err := installCmd.Run(loadedChart, finalValueMap) + releaser, err := installCmd.Run(loadedChart, finalValueMap) if err != nil { return nil, fmt.Errorf("failed to install the Helm chart: %w", err) } + // Convert Releaser interface to concrete v1.Release + release, ok := releaser.(*v1.Release) + if !ok { + return nil, fmt.Errorf("unexpected release type: %T", releaser) + } return release, nil } else { output.AppendLine("Upgrading existing release...") - release, err := upgradeCmd.Run(releaseName, loadedChart, finalValueMap) + releaser, err := upgradeCmd.Run(releaseName, loadedChart, finalValueMap) if err != nil { return nil, fmt.Errorf("failed to upgrade an existing Helm release: %w", err) } + // Convert Releaser interface to concrete v1.Release + release, ok := releaser.(*v1.Release) + if !ok { + return nil, fmt.Errorf("unexpected release type: %T", releaser) + } return release, nil } } From c9f1344fdbe7cf88f99a44ec606e2f2a095f341c Mon Sep 17 00:00:00 2001 From: Petri Kero Date: Wed, 7 Jan 2026 21:54:12 +0200 Subject: [PATCH 2/3] Cleanup. --- pkg/helmutil/upgrade_or_install.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/helmutil/upgrade_or_install.go b/pkg/helmutil/upgrade_or_install.go index 7ea73916..076edc80 100644 --- a/pkg/helmutil/upgrade_or_install.go +++ b/pkg/helmutil/upgrade_or_install.go @@ -55,9 +55,6 @@ func HelmUpgradeOrInstall( headerLine := fmt.Sprintf("Deploying chart %s as release %s", chartURL, releaseName) output.SetHeaderLines([]string{headerLine}) - // Note: In Helm v4, logging is handled via slog and cannot be easily redirected - // The actionConfig.Log field no longer exists - var installCmd *action.Install var upgradeCmd *action.Upgrade var chartPathOptions *action.ChartPathOptions @@ -88,7 +85,7 @@ func HelmUpgradeOrInstall( upgradeCmd.MaxHistory = 10 // Keep 10 releases max upgradeCmd.Devel = true // If version is development, accept it upgradeCmd.ForceReplace = true // Force recreate resources (delete old, create new) instead of rolling update - upgradeCmd.RollbackOnFailure = false // Don't rollback on failures to not hide errors (was Atomic) + upgradeCmd.RollbackOnFailure = false // Don't rollback on failures to not hide errors upgradeCmd.CleanupOnFail = true // Clean resources on failure upgradeCmd.SkipSchemaValidation = !validateValuesSchema // Disable schema validation for legacy charts chartPathOptions = &upgradeCmd.ChartPathOptions From c670ef57d19408fee741b7b8efa87fd0dfc3ef70 Mon Sep 17 00:00:00 2001 From: Petri Kero Date: Wed, 7 Jan 2026 21:58:58 +0200 Subject: [PATCH 3/3] Use the Helm v4 default waiting strategy. --- pkg/helmutil/uninstall_release.go | 2 +- pkg/helmutil/upgrade_or_install.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/helmutil/uninstall_release.go b/pkg/helmutil/uninstall_release.go index f35da504..6cab3d64 100644 --- a/pkg/helmutil/uninstall_release.go +++ b/pkg/helmutil/uninstall_release.go @@ -18,7 +18,7 @@ func UninstallRelease(actionConfig *action.Configuration, release *v1.Release) e // Create Helm Uninstall action uninstall := action.NewUninstall(actionConfig) uninstall.Timeout = 5 * time.Minute - uninstall.WaitStrategy = kube.LegacyStrategy // Wait for resources to be deleted (legacy wait behavior) + uninstall.WaitStrategy = kube.StatusWatcherStrategy // Wait for resources to be deleted // Execute the Uninstall action _, err := uninstall.Run(release.Name) diff --git a/pkg/helmutil/upgrade_or_install.go b/pkg/helmutil/upgrade_or_install.go index 076edc80..23089255 100644 --- a/pkg/helmutil/upgrade_or_install.go +++ b/pkg/helmutil/upgrade_or_install.go @@ -69,7 +69,7 @@ func HelmUpgradeOrInstall( installCmd.ReleaseName = releaseName installCmd.Namespace = namespace installCmd.Timeout = timeout - installCmd.WaitStrategy = kube.LegacyStrategy // Wait for resources to be ready (legacy wait behavior) + installCmd.WaitStrategy = kube.StatusWatcherStrategy // Wait for resources to be ready installCmd.WaitForJobs = true // Also wait for jobs to complete installCmd.Devel = true // If version is development, accept it installCmd.SkipSchemaValidation = !validateValuesSchema // Disable schema validation for legacy charts @@ -80,7 +80,7 @@ func HelmUpgradeOrInstall( upgradeCmd.Version = chartVersion upgradeCmd.Namespace = namespace upgradeCmd.Timeout = timeout - upgradeCmd.WaitStrategy = kube.LegacyStrategy // Wait for resources to be ready (legacy wait behavior) + upgradeCmd.WaitStrategy = kube.StatusWatcherStrategy // Wait for resources to be ready upgradeCmd.WaitForJobs = true // Also wait for jobs to complete upgradeCmd.MaxHistory = 10 // Keep 10 releases max upgradeCmd.Devel = true // If version is development, accept it