From 2b222ca9b3c92f3aff1877741e943343537992b7 Mon Sep 17 00:00:00 2001 From: "Jose R. Gonzalez" Date: Thu, 11 Jun 2026 16:08:49 -0500 Subject: [PATCH] Migrate from helm/v3 to helm/v4 Many changes just required an import statement change (/v3 to /v4). In some cases, the import path changed due to subversion changes in the helm packages (e.g. the "chart" package becomes "chart/v2" to allow room for a future "chart/v3" in Helm's API). Some minor logic changes were made with an explicit goal of keeping behavior identical to helm/v3. Behavior can change at a later date, if needed. Finally, this migration adds a slog adapter for local logging functions to preserve behavior. In the future, we will likely adopt the slog package for Chart Verifier logging. Signed-off-by: Jose R. Gonzalez --- cmd/report_test.go | 2 +- cmd/verify.go | 6 +- go.mod | 60 ++-- go.sum | 269 +++++++++--------- internal/chartverifier/api/verifier.go | 2 +- internal/chartverifier/checks/charttesting.go | 2 +- .../chartverifier/checks/charttesting_test.go | 2 +- internal/chartverifier/checks/checks.go | 23 +- internal/chartverifier/checks/checks_test.go | 2 +- internal/chartverifier/checks/helm.go | 43 +-- internal/chartverifier/checks/helm_test.go | 2 +- internal/chartverifier/checks/registry.go | 2 +- internal/chartverifier/helmverifier.go | 2 +- internal/chartverifier/reportBuilder.go | 17 +- internal/chartverifier/reportbuilder_test.go | 2 +- internal/chartverifier/utils/logger.go | 2 + internal/chartverifier/utils/slog_adapter.go | 104 +++++++ internal/chartverifier/verifier.go | 2 +- internal/chartverifier/verifier_test.go | 2 +- internal/chartverifier/verifierbuilder.go | 2 +- internal/helm/actions/template.go | 82 ++++-- internal/tool/helm.go | 29 +- internal/tool/helm_test.go | 92 +++--- internal/tool/kubectl.go | 2 +- pkg/chartverifier/report/types.go | 8 +- pkg/chartverifier/reportsummary/types.go | 6 +- pkg/chartverifier/verifier/verifier.go | 6 +- 27 files changed, 461 insertions(+), 312 deletions(-) create mode 100644 internal/chartverifier/utils/slog_adapter.go diff --git a/cmd/report_test.go b/cmd/report_test.go index c31a732b..86c208e5 100644 --- a/cmd/report_test.go +++ b/cmd/report_test.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - helmchart "helm.sh/helm/v3/pkg/chart" + helmchart "helm.sh/helm/v4/pkg/chart/v2" "github.com/redhat-certification/chart-verifier/internal/chartverifier/profiles" "github.com/redhat-certification/chart-verifier/internal/chartverifier/utils" diff --git a/cmd/verify.go b/cmd/verify.go index be9a0738..076259b3 100644 --- a/cmd/verify.go +++ b/cmd/verify.go @@ -32,10 +32,8 @@ import ( apiverifier "github.com/redhat-certification/chart-verifier/pkg/chartverifier/verifier" apiversion "github.com/redhat-certification/chart-verifier/pkg/chartverifier/version" - "helm.sh/helm/v3/pkg/cli" - "helm.sh/helm/v3/pkg/cli/values" - - //"helm.sh/helm/v3/pkg/getter" + "helm.sh/helm/v4/pkg/cli" + "helm.sh/helm/v4/pkg/cli/values" "github.com/spf13/cobra" "github.com/spf13/viper" diff --git a/go.mod b/go.mod index 4f315330..edccbd5a 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/stretchr/testify v1.11.1 golang.org/x/mod v0.36.0 gopkg.in/yaml.v3 v3.0.1 - helm.sh/helm/v3 v3.20.2 + helm.sh/helm/v4 v4.1.4 k8s.io/api v0.35.1 k8s.io/apimachinery v0.35.1 k8s.io/client-go v0.35.1 @@ -32,30 +32,31 @@ require ( github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/Masterminds/squirrel v1.5.4 // indirect + github.com/ProtonMail/go-crypto v1.3.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect - github.com/containerd/containerd v1.7.32 // indirect - github.com/containerd/errdefs v1.0.0 // indirect - github.com/containerd/log v0.1.0 // indirect - github.com/containerd/platforms v1.0.0-rc.4 // indirect + github.com/cloudflare/circl v1.6.3 // indirect github.com/cyphar/filepath-securejoin v0.6.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/go-events v0.0.0-20260522192827-649f5caa5440 // indirect + github.com/dylibso/observe-sdk/go v0.0.0-20240819160327-2d926c5d788a // indirect github.com/emicklei/go-restful/v3 v3.12.2 // 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/fatih/color v1.16.0 // indirect + github.com/extism/go-sdk v1.7.1 // indirect + github.com/fatih/color v1.18.0 // indirect + github.com/fluxcd/cli-utils v0.37.2-flux.1 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect - github.com/go-errors/errors v1.4.2 // indirect + github.com/go-errors/errors v1.5.1 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect github.com/go-logr/logr v1.4.3 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/jsonpointer v0.21.1 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.1 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/gobwas/glob v0.2.3 // indirect + github.com/gofrs/flock v0.13.0 // indirect github.com/google/btree v1.1.3 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/gosuri/uitable v0.0.4 // indirect @@ -65,16 +66,16 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // 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 github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.18.6 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/mailru/easyjson v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect @@ -91,35 +92,33 @@ require ( github.com/opencontainers/image-spec v1.1.1 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/rubenv/sql-migrate v1.8.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect github.com/shopspring/decimal v1.4.0 // indirect - github.com/sirupsen/logrus v1.9.4 // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spf13/pflag v1.0.10 // indirect github.com/subosito/gotenv v1.6.0 // indirect + github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 // indirect + github.com/tetratelabs/wazero v1.11.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 // indirect + go.opentelemetry.io/proto/otlp v1.9.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.51.0 // indirect - golang.org/x/net v0.55.0 // indirect - golang.org/x/oauth2 v0.36.0 // indirect - golang.org/x/sync v0.20.0 // indirect - golang.org/x/sys v0.45.0 // indirect - golang.org/x/term v0.43.0 // indirect - golang.org/x/text v0.37.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/term v0.39.0 // indirect + golang.org/x/text v0.33.0 // indirect golang.org/x/time v0.12.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260523011958-0a33c5d7ca68 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect - google.golang.org/grpc v1.81.1 // indirect + google.golang.org/grpc v1.79.3 // indirect google.golang.org/protobuf v1.36.11 // indirect gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect @@ -132,10 +131,11 @@ require ( k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect oras.land/oras-go/v2 v2.6.0 // indirect + sigs.k8s.io/controller-runtime v0.23.1 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect - sigs.k8s.io/kustomize/api v0.20.1 // indirect - sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect + sigs.k8s.io/kustomize/api v0.21.1 // indirect + sigs.k8s.io/kustomize/kyaml v0.21.1 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/go.sum b/go.sum index 62d2402b..1723c377 100644 --- a/go.sum +++ b/go.sum @@ -22,6 +22,8 @@ github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM= github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= +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/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -30,24 +32,17 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= -github.com/containerd/containerd v1.7.32 h1:S54xuVcPxeLaYgaRABtpJ2VyVUVsy0IGf7qHBs+sbY8= -github.com/containerd/containerd v1.7.32/go.mod h1:jdwD6s/BhV4XVJGrvtziNPVA+83n66TwptVaPKprq4E= -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/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= -github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/containerd/platforms v1.0.0-rc.4 h1:M42JrUT4zfZTqtkUwkr0GzmUWbfyO5VO0Q5b3op97T4= -github.com/containerd/platforms v1.0.0-rc.4/go.mod h1:lKlMXyLybmBedS/JJm11uDofzI8L2v0J2ZbYvNsbq1A= +github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8= +github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.6.1 h1:5CeZ1jPXEiYt3+Z6zqprSAgSWiggmpVyciv8syjIpVE= @@ -66,20 +61,26 @@ github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxK github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= -github.com/docker/go-events v0.0.0-20260522192827-649f5caa5440 h1:ECrenhSc+wUljTsE/Yc85IY1BSvnQoeLhcC8QlXUlHQ= -github.com/docker/go-events v0.0.0-20260522192827-649f5caa5440/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +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/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/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/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= -github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +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.37.2-flux.1 h1:tQ588ghtRN+E+kHq415FddfqA9v4brn/1WWgrP6rQR0= +github.com/fluxcd/cli-utils v0.37.2-flux.1/go.mod h1:LcWSu1NYET8d8U7O326RhEm5JkQXCMK6ITu4G1CT02c= github.com/foxcpp/go-mockdns v1.2.0 h1:omK3OrHRD1IWJz1FuFBCFquhXslXoF17OvBS6JPzZF0= github.com/foxcpp/go-mockdns v1.2.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -88,22 +89,22 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= +github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs= github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw= 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-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +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-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic= +github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU= +github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= @@ -113,8 +114,8 @@ github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9L github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= +github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= 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= @@ -122,8 +123,8 @@ github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7O github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= @@ -134,8 +135,8 @@ github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= 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/grpc-ecosystem/grpc-gateway/v2 v2.27.7 h1:X+2YciYSxvMQK0UZ7sg45ZVabVZBeBuvMkmuI2V3Fak= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7/go.mod h1:lW34nIZuQ8UDPdkon5fmfp2l3+ZkQ2me/+oecHYLOII= 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= @@ -155,6 +156,8 @@ github.com/helm/chart-testing/v3 v3.10.1 h1:ByfJIFpvbau7u3Af1/Z2j01DdKGI4SBouSof github.com/helm/chart-testing/v3 v3.10.1/go.mod h1:OFtBbzuUE1BhFY1LgG2WLhtG/+2b3VkBC8+SGzQAlDA= 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= @@ -163,13 +166,10 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao= -github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= @@ -180,8 +180,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -217,10 +217,10 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= -github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= -github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= -github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= +github.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI= +github.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE= +github.com/onsi/gomega v1.39.0 h1:y2ROC3hKFmQZJNFeGAMeHZKkjBL65mIZcvrLQBF9k6Q= +github.com/onsi/gomega v1.39.0/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4= github.com/opdev/getocprange v0.0.0-20260608195748-56b0b7806c21 h1:6MnqqjDwYZXO2Lvh/VuJA72L1sc9L+V7kWNos5IXMi8= github.com/opdev/getocprange v0.0.0-20260608195748-56b0b7806c21/go.mod h1:V/uOZp1DUYIvQG8yZXsDFAqv3NgekM6RkbYTpXjgFcw= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -231,10 +231,6 @@ github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0 github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= 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/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -244,10 +240,12 @@ github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= 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.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= -github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= -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.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/otlptranslator v1.0.0 h1:s0LJW/iN9dkIH+EnhiD3BlkkP5QVIUVEoIwkU+A6qos= +github.com/prometheus/otlptranslator v1.0.0/go.mod h1:vRYWnXvI6aWGpsdY/mOT/cbeVRBlPWtBNDb7kGR3uKM= +github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= +github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= 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= @@ -264,12 +262,12 @@ github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDc github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= +github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= -github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= -github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= @@ -284,106 +282,109 @@ github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3A github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +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.11.0 h1:+gKemEuKCTevU4d7ZTzlsvgd1uaToIDtlQlmNbwqYhA= +github.com/tetratelabs/wazero v1.11.0/go.mod h1:eV28rsN8Q+xwjogd7f4/Pp4xFxO7uOGbLcD/LzB1wiU= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/contrib/bridges/prometheus v0.57.0 h1:UW0+QyeyBVhn+COBec3nGhfnFe5lwB0ic1JBVjzhk0w= -go.opentelemetry.io/contrib/bridges/prometheus v0.57.0/go.mod h1:ppciCHRLsyCio54qbzQv0E4Jyth/fLWDTJYfvWpcSVk= -go.opentelemetry.io/contrib/exporters/autoexport v0.57.0 h1:jmTVJ86dP60C01K3slFQa2NQ/Aoi7zA+wy7vMOKD9H4= -go.opentelemetry.io/contrib/exporters/autoexport v0.57.0/go.mod h1:EJBheUMttD/lABFyLXhce47Wr6DPWYReCzaZiXadH7g= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 h1:8tvICD4vSTOOsNrsI4Ljf6C+6UKvpTEH5XY3JMoyPoo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0/go.mod h1:z9+yiacE0IHRqM4qFfkbt/JYlmYXgss8GY/jXoNuPJI= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -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= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.8.0/go.mod h1:5KXybFvPGds3QinJWQT7pmXf+TN5YIa7CNYObWRkj50= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 h1:j7ZSD+5yn+lo3sGV69nW04rRR0jhYnBwjuX3r0HvnK0= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0/go.mod h1:WXbYJTUaZXAbYd8lbgGuvih0yuCfOFC5RJoYnoLcGz8= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 h1:t/Qur3vKSkUCcDVaSumWF2PKHt85pc7fRvFuoVT8qFU= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0/go.mod h1:Rl61tySSdcOJWoEgYZVtmnKdA0GeKrSqkHC1t+91CH8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 h1:cMyu9O88joYEaI47CnQkxO1XZdpoTF9fEnW2duIddhw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0/go.mod h1:6Am3rn7P9TVVeXYG+wtcGE7IE1tsQ+bP3AuWcKt/gOI= -go.opentelemetry.io/otel/exporters/prometheus v0.54.0 h1:rFwzp68QMgtzu9PgP3jm9XaMICI6TsofWWPcBDKwlsU= -go.opentelemetry.io/otel/exporters/prometheus v0.54.0/go.mod h1:QyjcV9qDP6VeK5qPyKETvNjmaaEc7+gqjh4SS0ZYzDU= -go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.8.0 h1:CHXNXwfKWfzS65yrlB2PVds1IBZcdsX8Vepy9of0iRU= -go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.8.0/go.mod h1:zKU4zUgKiaRxrdovSS2amdM5gOc59slmo/zJwGX+YBg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0 h1:SZmDnHcgp3zwlPBS2JX2urGYe/jBKEIT6ZedHRUyCz8= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0/go.mod h1:fdWW0HtZJ7+jNpTKUR0GpMEDP69nR8YBJQxNiVCE3jk= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.32.0 h1:cC2yDI3IQd0Udsux7Qmq8ToKAx1XCilTQECZ0KDZyTw= -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.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= -go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= -go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= -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.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= -go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= -go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= -go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= +go.opentelemetry.io/contrib/bridges/prometheus v0.65.0 h1:I/7S/yWobR3QHFLqHsJ8QOndoiFsj1VgHpQiq43KlUI= +go.opentelemetry.io/contrib/bridges/prometheus v0.65.0/go.mod h1:jPF6gn3y1E+nozCAEQj3c6NZ8KY+tvAgSVfvoOJUFac= +go.opentelemetry.io/contrib/exporters/autoexport v0.65.0 h1:2gApdml7SznX9szEKFjKjM4qGcGSvAybYLBY319XG3g= +go.opentelemetry.io/contrib/exporters/autoexport v0.65.0/go.mod h1:0QqAGlbHXhmPYACG3n5hNzO5DnEqqtg4VcK5pr22RI0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 h1:7iP2uCb7sGddAr30RRS6xjKy7AZ2JtTOPA3oolgVSw8= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0/go.mod h1:c7hN3ddxs/z6q9xwvfLPk+UHlWRQyaeR1LdgfL/66l0= +go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= +go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.16.0 h1:ZVg+kCXxd9LtAaQNKBxAvJ5NpMf7LpvEr4MIZqb0TMQ= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.16.0/go.mod h1:hh0tMeZ75CCXrHd9OXRYxTlCAdxcXioWHFIpYw2rZu8= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.16.0 h1:djrxvDxAe44mJUrKataUbOhCKhR3F8QCyWucO16hTQs= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.16.0/go.mod h1:dt3nxpQEiSoKvfTVxp3TUg5fHPLhKtbcnN3Z1I1ePD0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.40.0 h1:NOyNnS19BF2SUDApbOKbDtWZ0IK7b8FJ2uAGdIWOGb0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.40.0/go.mod h1:VL6EgVikRLcJa9ftukrHu/ZkkhFBSo1lzvdBC9CF1ss= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.40.0 h1:9y5sHvAxWzft1WQ4BwqcvA+IFVUJ1Ya75mSAUnFEVwE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.40.0/go.mod h1:eQqT90eR3X5Dbs1g9YSM30RavwLF725Ris5/XSXWvqE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 h1:QKdN8ly8zEMrByybbQgv8cWBcdAarwmIPZ6FThrWXJs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0/go.mod h1:bTdK1nhqF76qiPoCCdyFIV+N/sRHYXYCTQc+3VCi3MI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 h1:DvJDOPmSWQHWywQS6lKL+pb8s3gBLOZUtw4N+mavW1I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0/go.mod h1:EtekO9DEJb4/jRyN4v4Qjc2yA7AtfCBuz2FynRUWTXs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0 h1:wVZXIWjQSeSmMoxF74LzAnpVQOAFDo3pPji9Y4SOFKc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0/go.mod h1:khvBS2IggMFNwZK/6lEeHg/W57h/IX6J4URh57fuI40= +go.opentelemetry.io/otel/exporters/prometheus v0.62.0 h1:krvC4JMfIOVdEuNPTtQ0ZjCiXrybhv+uOHMfHRmnvVo= +go.opentelemetry.io/otel/exporters/prometheus v0.62.0/go.mod h1:fgOE6FM/swEnsVQCqCnbOfRV4tOnWPg7bVeo4izBuhQ= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.16.0 h1:ivlbaajBWJqhcCPniDqDJmRwj4lc6sRT+dCAVKNmxlQ= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.16.0/go.mod h1:u/G56dEKDDwXNCVLsbSrllB2o8pbtFLUC4HpR66r2dc= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.40.0 h1:ZrPRak/kS4xI3AVXy8F7pipuDXmDsrO8Lg+yQjBLjw0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.40.0/go.mod h1:3y6kQCWztq6hyW8Z9YxQDDm0Je9AJoFar2G0yDcmhRk= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.40.0 h1:MzfofMZN8ulNqobCmCAVbqVL5syHw+eB2qPRkCMA/fQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.40.0/go.mod h1:E73G9UFtKRXrxhBsHtG00TB5WxX57lpsQzogDkqBTz8= +go.opentelemetry.io/otel/log v0.16.0 h1:DeuBPqCi6pQwtCK0pO4fvMB5eBq6sNxEnuTs88pjsN4= +go.opentelemetry.io/otel/log v0.16.0/go.mod h1:rWsmqNVTLIA8UnwYVOItjyEZDbKIkMxdQunsIhpUMes= +go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= +go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc= +go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8= +go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE= +go.opentelemetry.io/otel/sdk/log v0.16.0 h1:e/b4bdlQwC5fnGtG3dlXUrNOnP7c8YLVSpSfEBIkTnI= +go.opentelemetry.io/otel/sdk/log v0.16.0/go.mod h1:JKfP3T6ycy7QEuv3Hj8oKDy7KItrEkus8XJE6EoSzw4= +go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw= +go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg= +go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw= +go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= 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.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI= -golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4= golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ= -golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= -golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= -golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= -golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= -golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= -golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= -golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4= -golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk= -golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc= -golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= +golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c= golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= -google.golang.org/genproto/googleapis/api v0.0.0-20260523011958-0a33c5d7ca68 h1:WVVw1Nl19li0fMX++FJ3ye1z9+S1N35QODDy5qpnaXw= -google.golang.org/genproto/googleapis/api v0.0.0-20260523011958-0a33c5d7ca68/go.mod h1:1dCETSCY2YKZNXQE3h4fun3TYwF5p8jejRKZgfWAgAY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= -google.golang.org/grpc v1.81.1 h1:VnnIIZ88UzOOKLukQi+ImGz8O1Wdp8nAGGnvOfEIWQQ= -google.golang.org/grpc v1.81.1/go.mod h1:xGH9GfzOyMTGIOXBJmXt+BX/V0kcdQbdcuwQ/zNw42I= +google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 h1:merA0rdPeUV3YIIfHHcH4qBkiQAc1nfCKSI7lB4cV2M= +google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409/go.mod h1:fl8J1IvUjCilwZzQowmw2b7HQB2eAuYBabMXzWurF+I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 h1:H86B94AW+VfJWDqFeEbBPhEtHzJwJfTbgE2lZa54ZAQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= +google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -398,8 +399,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -helm.sh/helm/v3 v3.20.2 h1:binM4rvPx5DcNsa1sIt7UZi55lRbu3pZUFmQkSoRh48= -helm.sh/helm/v3 v3.20.2/go.mod h1:Fl1kBaWCpkUrM6IYXPjQ3bdZQfFrogKArqptvueZ6Ww= +helm.sh/helm/v4 v4.1.4 h1:zwTrNkalG4f7SYigRSdQnYrTj0QEz1qzetzAlYoDVSo= +helm.sh/helm/v4 v4.1.4/go.mod h1:5dSo8rRgn3OTkDAc/k0Ipw5/Q+BlqKIKZwa0XwSiINI= k8s.io/api v0.35.1 h1:0PO/1FhlK/EQNVK5+txc4FuhQibV25VLSdLMmGpDE/Q= k8s.io/api v0.35.1/go.mod h1:28uR9xlXWml9eT0uaGo6y71xK86JBELShLy4wR1XtxM= k8s.io/apiextensions-apiserver v0.35.1 h1:p5vvALkknlOcAqARwjS20kJffgzHqwyQRM8vHLwgU7w= @@ -424,15 +425,17 @@ k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzk k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/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.23.1 h1:TjJSM80Nf43Mg21+RCy3J70aj/W6KyvDtOlpKf+PupE= +sigs.k8s.io/controller-runtime v0.23.1/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I= -sigs.k8s.io/kustomize/api v0.20.1/go.mod h1:t6hUFxO+Ph0VxIk1sKp1WS0dOjbPCtLJ4p8aADLwqjM= -sigs.k8s.io/kustomize/kyaml v0.20.1 h1:PCMnA2mrVbRP3NIB6v9kYCAc38uvFLVs8j/CD567A78= -sigs.k8s.io/kustomize/kyaml v0.20.1/go.mod h1:0EmkQHRUsJxY8Ug9Niig1pUMSCGHxQ5RklbpV/Ri6po= +sigs.k8s.io/kustomize/api v0.21.1 h1:lzqbzvz2CSvsjIUZUBNFKtIMsEw7hVLJp0JeSIVmuJs= +sigs.k8s.io/kustomize/api v0.21.1/go.mod h1:f3wkKByTrgpgltLgySCntrYoq5d3q7aaxveSagwTlwI= +sigs.k8s.io/kustomize/kyaml v0.21.1 h1:IVlbmhC076nf6foyL6Taw4BkrLuEsXUXNpsE+ScX7fI= +sigs.k8s.io/kustomize/kyaml v0.21.1/go.mod h1:hmxADesM3yUN2vbA5z1/YTBnzLJ1dajdqpQonwBL1FQ= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= -sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 h1:2WOzJpHUBVrrkDjU4KBT8n5LDcj824eX0I5UKcgeRUs= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/internal/chartverifier/api/verifier.go b/internal/chartverifier/api/verifier.go index 4f19aa55..f1695d9d 100644 --- a/internal/chartverifier/api/verifier.go +++ b/internal/chartverifier/api/verifier.go @@ -4,7 +4,7 @@ import ( "time" "github.com/spf13/viper" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/cli" "github.com/redhat-certification/chart-verifier/internal/chartverifier" "github.com/redhat-certification/chart-verifier/internal/chartverifier/checks" diff --git a/internal/chartverifier/checks/charttesting.go b/internal/chartverifier/checks/charttesting.go index 989578d4..150c53a9 100644 --- a/internal/chartverifier/checks/charttesting.go +++ b/internal/chartverifier/checks/charttesting.go @@ -13,7 +13,7 @@ import ( "github.com/helm/chart-testing/v3/pkg/util" "github.com/opdev/getocprange" "gopkg.in/yaml.v3" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/cli" "github.com/redhat-certification/chart-verifier/internal/chartverifier/utils" "github.com/redhat-certification/chart-verifier/internal/tool" diff --git a/internal/chartverifier/checks/charttesting_test.go b/internal/chartverifier/checks/charttesting_test.go index 5b0bd789..7efb07fb 100644 --- a/internal/chartverifier/checks/charttesting_test.go +++ b/internal/chartverifier/checks/charttesting_test.go @@ -11,7 +11,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/cli" ) // absPathFromSourceFileLocation returns the absolute path of a file or directory under the current source file's diff --git a/internal/chartverifier/checks/checks.go b/internal/chartverifier/checks/checks.go index 208a09c4..83db80d8 100644 --- a/internal/chartverifier/checks/checks.go +++ b/internal/chartverifier/checks/checks.go @@ -27,10 +27,11 @@ import ( "strings" "github.com/opdev/getocprange" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/chart" - "helm.sh/helm/v3/pkg/lint" - "helm.sh/helm/v3/pkg/lint/support" + "helm.sh/helm/v4/pkg/action" + + chartv2 "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/lint" + "helm.sh/helm/v4/pkg/chart/v2/lint/support" "github.com/redhat-certification/chart-verifier/internal/chartverifier/pyxis" "github.com/redhat-certification/chart-verifier/internal/tool" @@ -259,7 +260,7 @@ func NotContainCRDs(opts *CheckOptions) (Result, error) { return r, nil } -func hasCRDObjects(c *chart.Chart) bool { +func hasCRDObjects(c *chartv2.Chart) bool { // Check main chart CRDs directory if len(c.CRDObjects()) > 0 { return true @@ -275,7 +276,7 @@ func hasCRDObjects(c *chart.Chart) bool { return false } -func hasCRDInTemplates(c *chart.Chart) bool { +func hasCRDInTemplates(c *chartv2.Chart) bool { // Check main chart templates for _, f := range c.Templates { if !strings.HasSuffix(f.Name, ".yaml") && !strings.HasSuffix(f.Name, ".yml") { @@ -315,7 +316,7 @@ func isCRDFile(data []byte) bool { return false } -func hasCRDInFiles(c *chart.Chart) bool { +func hasCRDInFiles(c *chartv2.Chart) bool { // Check this chart's files (root directory) for _, f := range c.Files { if !strings.HasSuffix(f.Name, ".yaml") && !strings.HasSuffix(f.Name, ".yml") { @@ -341,8 +342,12 @@ func HelmLint(opts *CheckOptions) (Result, error) { if err != nil { return NewResult(false, err.Error()), err } + r := NewResult(true, HelmLintSuccessful) - linter := lint.All(p, opts.Values, "default", false) + // TODO: When chart/v3 is released, consider whether it makes sense to use + // actions.Lint related APIs vs. chart/v3/lint (given we use chart/v2/lint + // here, but will need to support both.) + linter := lint.RunAll(p, opts.Values, "default") if linter.HighestSeverity > support.WarningSev { reason := "" for _, m := range linter.Messages { @@ -506,7 +511,7 @@ func SignatureIsValid(opts *CheckOptions) (Result, error) { } verify.Keyring = keyringFilename - err = verify.Run(chartPath) + _, err = verify.Run(chartPath) if err != nil { failureMsg := fmt.Sprintf("%s : %s : %v", ChartSigned, SignatureFailure, err) return NewResult(false, failureMsg), nil diff --git a/internal/chartverifier/checks/checks_test.go b/internal/chartverifier/checks/checks_test.go index 8170101a..33bbd790 100644 --- a/internal/chartverifier/checks/checks_test.go +++ b/internal/chartverifier/checks/checks_test.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/cli" "github.com/redhat-certification/chart-verifier/internal/chartverifier/pyxis" "github.com/redhat-certification/chart-verifier/internal/tool" diff --git a/internal/chartverifier/checks/helm.go b/internal/chartverifier/checks/helm.go index 951dc7dd..8c4e46e5 100644 --- a/internal/chartverifier/checks/helm.go +++ b/internal/chartverifier/checks/helm.go @@ -29,22 +29,22 @@ import ( "slices" "strings" - "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v4/pkg/chart/common" + chartv2 "helm.sh/helm/v4/pkg/chart/v2" + loaderv2 "helm.sh/helm/v4/pkg/chart/v2/loader" + utilv2 "helm.sh/helm/v4/pkg/chart/v2/util" - "helm.sh/helm/v3/pkg/chart" - "helm.sh/helm/v3/pkg/chart/loader" - - "helm.sh/helm/v3/pkg/action" - kubefake "helm.sh/helm/v3/pkg/kube/fake" - "helm.sh/helm/v3/pkg/storage" - "helm.sh/helm/v3/pkg/storage/driver" + "helm.sh/helm/v4/pkg/action" + kubefake "helm.sh/helm/v4/pkg/kube/fake" + "helm.sh/helm/v4/pkg/storage" + "helm.sh/helm/v4/pkg/storage/driver" "github.com/redhat-certification/chart-verifier/internal/helm/actions" ) // loadChartFromRemote attempts to retrieve a Helm chart from the given remote url. Returns an error if the given url // doesn't contain the 'http' or 'https' schema, or any other error related to retrieving the contents of the chart. -func loadChartFromRemote(url *url.URL) (*chart.Chart, error) { +func loadChartFromRemote(url *url.URL) (*chartv2.Chart, error) { if url.Scheme != "http" && url.Scheme != "https" { return nil, fmt.Errorf("only 'http' and 'https' schemes are supported, but got %q", url.Scheme) } @@ -59,12 +59,12 @@ func loadChartFromRemote(url *url.URL) (*chart.Chart, error) { return nil, ChartNotFoundErr(url.String()) } - return loader.LoadArchive(resp.Body) + return loaderv2.LoadArchive(resp.Body) } // loadChartFromAbsPath attempts to retrieve a local Helm chart by resolving the maybe relative path into an absolute // path from the current working directory. -func loadChartFromAbsPath(path string) (*chart.Chart, error) { +func loadChartFromAbsPath(path string) (*chartv2.Chart, error) { // although filepath.Abs() can return an error according to its signature, this won't happen (as of go 1.15) // because the only invalid value it would accept is an empty string, which is internally converted into "." // regardless, the error is still being caught and propagated to avoid being bitten by internal changes in the @@ -74,7 +74,7 @@ func loadChartFromAbsPath(path string) (*chart.Chart, error) { return nil, err } - c, err := loader.Load(chartPath) + c, err := loaderv2.Load(chartPath) if err != nil { if os.IsNotExist(err) { return nil, ChartNotFoundErr(path) @@ -87,12 +87,12 @@ func loadChartFromAbsPath(path string) (*chart.Chart, error) { type ChartCache interface { MakeKey(uri string) string - Add(uri string, chrt *chart.Chart) (ChartCacheItem, error) + Add(uri string, chrt *chartv2.Chart) (ChartCacheItem, error) Get(uri string) (ChartCacheItem, bool, error) } type ChartCacheItem struct { - Chart *chart.Chart + Chart *chartv2.Chart Path string } @@ -118,7 +118,7 @@ func (c *chartCache) Get(uri string) (ChartCacheItem, bool, error) { } } -func (c *chartCache) Add(opts *CheckOptions, chrt *chart.Chart) (ChartCacheItem, error) { +func (c *chartCache) Add(opts *CheckOptions, chrt *chartv2.Chart) (ChartCacheItem, error) { var ( err error userCacheDir string @@ -131,7 +131,7 @@ func (c *chartCache) Add(opts *CheckOptions, chrt *chart.Chart) (ChartCacheItem, key := c.MakeKey(opts.URI) chartCacheDir := path.Join(userCacheDir, key) cacheItem := ChartCacheItem{Chart: chrt, Path: path.Join(chartCacheDir, chrt.Name())} - if err = chartutil.SaveDir(chrt, chartCacheDir); err != nil { + if err = utilv2.SaveDir(chrt, chartCacheDir); err != nil { return ChartCacheItem{}, err } c.chartMap[key] = cacheItem @@ -146,9 +146,11 @@ func init() { // LoadChartFromURI attempts to retrieve a chart from the given uri string. It accepts "http", "https", "file" schemes, // and defaults to "file" if there isn't one. -func LoadChartFromURI(opts *CheckOptions) (*chart.Chart, string, error) { +// +// TODO(komish): Identify path to support OCI distribution +func LoadChartFromURI(opts *CheckOptions) (*chartv2.Chart, string, error) { var ( - chrt *chart.Chart + chrt *chartv2.Chart err error ) @@ -204,9 +206,9 @@ func getImageReferences(chartURI string, vals map[string]interface{}, serverKube // We'll start with DefaultCapabilities, but we'll really only use the // kubeVersion of this when rendering manifests because Helm replaces the // action config's capabilities for client-only execution. - caps := chartutil.DefaultCapabilities.Copy() + caps := common.DefaultCapabilities.Copy() - kubeVersion, err := chartutil.ParseKubeVersion(serverKubeVersionString) + kubeVersion, err := common.ParseKubeVersion(serverKubeVersionString) if err != nil { return nil, fmt.Errorf("%s: %w", "unable to render manifests and extract images due to invalid kubeVersion in server capabilities", err) } @@ -217,7 +219,6 @@ func getImageReferences(chartURI string, vals map[string]interface{}, serverKube Releases: nil, KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard}, Capabilities: caps, - Log: func(format string, v ...interface{}) {}, } mem := driver.NewMemory() diff --git a/internal/chartverifier/checks/helm_test.go b/internal/chartverifier/checks/helm_test.go index e08a8aa2..02bc3e39 100644 --- a/internal/chartverifier/checks/helm_test.go +++ b/internal/chartverifier/checks/helm_test.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/cli" "github.com/redhat-certification/chart-verifier/internal/testutil" ) diff --git a/internal/chartverifier/checks/registry.go b/internal/chartverifier/checks/registry.go index 8fb64d17..70f61e19 100644 --- a/internal/chartverifier/checks/registry.go +++ b/internal/chartverifier/checks/registry.go @@ -20,7 +20,7 @@ import ( "time" "github.com/spf13/viper" - helmcli "helm.sh/helm/v3/pkg/cli" + helmcli "helm.sh/helm/v4/pkg/cli" apiChecks "github.com/redhat-certification/chart-verifier/pkg/chartverifier/checks" ) diff --git a/internal/chartverifier/helmverifier.go b/internal/chartverifier/helmverifier.go index 9ee62545..6507aab6 100644 --- a/internal/chartverifier/helmverifier.go +++ b/internal/chartverifier/helmverifier.go @@ -20,7 +20,7 @@ import ( "time" "github.com/spf13/viper" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/cli" "github.com/redhat-certification/chart-verifier/internal/chartverifier/checks" apiReport "github.com/redhat-certification/chart-verifier/pkg/chartverifier/report" diff --git a/internal/chartverifier/reportBuilder.go b/internal/chartverifier/reportBuilder.go index 4dfd657c..4749d25a 100644 --- a/internal/chartverifier/reportBuilder.go +++ b/internal/chartverifier/reportBuilder.go @@ -34,7 +34,8 @@ import ( "github.com/redhat-certification/chart-verifier/internal/chartverifier/utils" apiReport "github.com/redhat-certification/chart-verifier/pkg/chartverifier/report" - helmchart "helm.sh/helm/v3/pkg/chart" + chartcommon "helm.sh/helm/v4/pkg/chart/common" + helmchart "helm.sh/helm/v4/pkg/chart/v2" ) type ReportBuilder interface { @@ -162,17 +163,17 @@ func (r *reportBuilder) Build() (*apiReport.Report, error) { return apiReport, nil } -type By func(p1, p2 *helmchart.File) bool +type By func(p1, p2 *chartcommon.File) bool type fileSorter struct { - files []*helmchart.File - by func(p1, p2 *helmchart.File) bool // Closure used in the Less method. + files []*chartcommon.File + by func(p1, p2 *chartcommon.File) bool // Closure used in the Less method. } // If chart-verifier is run from within the helm chart directory // the output will be sent to the OutputDirectory and affect the digest. // This removes any verifier output files from the calculated digest -func filterOutputDirectory(files []*helmchart.File) []*helmchart.File { +func filterOutputDirectory(files []*chartcommon.File) []*chartcommon.File { n := 0 for _, file := range files { if !strings.Contains(file.Name, utils.OutputDirectory) { @@ -183,7 +184,7 @@ func filterOutputDirectory(files []*helmchart.File) []*helmchart.File { return files[:n] } -func (by By) sort(files []*helmchart.File) { +func (by By) sort(files []*chartcommon.File) { fs := &fileSorter{ files: files, by: by, // The Sort method's receiver is the function (closure) that defines the sort order. @@ -206,8 +207,8 @@ func (fs *fileSorter) Less(i, j int) bool { return fs.by(fs.files[i], fs.files[j]) } -func GenerateSha(rawFiles []*helmchart.File) string { - name := func(f1, f2 *helmchart.File) bool { +func GenerateSha(rawFiles []*chartcommon.File) string { + name := func(f1, f2 *chartcommon.File) bool { return f1.Name < f2.Name } diff --git a/internal/chartverifier/reportbuilder_test.go b/internal/chartverifier/reportbuilder_test.go index a7c92213..d63cbc70 100644 --- a/internal/chartverifier/reportbuilder_test.go +++ b/internal/chartverifier/reportbuilder_test.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/assert" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/cli" "github.com/stretchr/testify/require" diff --git a/internal/chartverifier/utils/logger.go b/internal/chartverifier/utils/logger.go index 8b7dfe36..f50e98b4 100644 --- a/internal/chartverifier/utils/logger.go +++ b/internal/chartverifier/utils/logger.go @@ -52,6 +52,8 @@ func InitLog(cobraCmd *cobra.Command, stdFilename string, suppressErrorLog bool) } else { stderrFileName = fmt.Sprintf("verifier-%s.log", verifierlog.Time) } + + initSlogHandler(suppressErrorLog) } func LogWarning(message string) { diff --git a/internal/chartverifier/utils/slog_adapter.go b/internal/chartverifier/utils/slog_adapter.go new file mode 100644 index 00000000..4161b654 --- /dev/null +++ b/internal/chartverifier/utils/slog_adapter.go @@ -0,0 +1,104 @@ +package utils + +import ( + "bytes" + "context" + "log/slog" + "strings" + "sync" +) + +// adapter is a slogHandler singleton, initialized via the SlogHandler function. +var adapter *slogHandler + +func initSlogHandler(suppressLogs bool) { + b := bytes.NewBuffer([]byte{}) + if adapter == nil { + textHandler := slog.NewTextHandler(b, &slog.HandlerOptions{ + Level: slog.LevelDebug, + ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr { + if a.Key == slog.TimeKey || a.Key == slog.LevelKey { + return slog.Attr{} + } + return a + }, + }) + + adapter = &slogHandler{ + handler: textHandler, + suppressed: suppressLogs, + buffer: b, + mu: &sync.Mutex{}, + } + } +} + +// SlogHandler will return the package handler, or initialize a suppressed one +// if this is called before initialization to avoid return a nil handler. +// +// This handler is considered an adapter for the project-level logging +// functionality, and therefore initSlogHandler should be called before +// requesting a handler for proper alignment between the primary logging +// functions and this adapter. +func SlogHandler() *slogHandler { + if adapter == nil { + suppressLogs := true + initSlogHandler(suppressLogs) + } + return adapter +} + +// Ensure the adapter implements the slog.Handler interface. +var _ slog.Handler = &slogHandler{} + +type slogHandler struct { + handler slog.Handler + suppressed bool + buffer *bytes.Buffer + mu *sync.Mutex +} + +// Suppress sets whether or not to suppress these logs. Implemented by +// disabling the slog.Handler. +func (h *slogHandler) Suppress(b bool) { + h.suppressed = b +} + +func (h *slogHandler) IsSuppressed() bool { + return h.suppressed +} + +func (h *slogHandler) Enabled(_ context.Context, _ slog.Level) bool { + return !h.suppressed +} + +func (h *slogHandler) Handle(ctx context.Context, record slog.Record) error { + h.mu.Lock() + defer h.mu.Unlock() + err := h.handler.Handle(ctx, record) + if err != nil { + return err + } + + LogInfo(strings.TrimSpace(h.buffer.String())) + h.buffer.Reset() + return nil +} + +func (h *slogHandler) WithAttrs(attrs []slog.Attr) slog.Handler { + return &slogHandler{ + handler: h.handler.WithAttrs(attrs), + suppressed: h.suppressed, + buffer: h.buffer, + mu: h.mu, + } +} + +func (h *slogHandler) WithGroup(name string) slog.Handler { + return &slogHandler{ + handler: h.handler.WithGroup(name), + suppressed: h.suppressed, + buffer: h.buffer, + mu: h.mu, + } +} diff --git a/internal/chartverifier/verifier.go b/internal/chartverifier/verifier.go index 3ede84e6..b4edd192 100644 --- a/internal/chartverifier/verifier.go +++ b/internal/chartverifier/verifier.go @@ -22,7 +22,7 @@ import ( "time" "github.com/spf13/viper" - helmcli "helm.sh/helm/v3/pkg/cli" + helmcli "helm.sh/helm/v4/pkg/cli" "github.com/redhat-certification/chart-verifier/internal/chartverifier/checks" "github.com/redhat-certification/chart-verifier/internal/chartverifier/profiles" diff --git a/internal/chartverifier/verifier_test.go b/internal/chartverifier/verifier_test.go index b37b2c7f..34c7f33b 100644 --- a/internal/chartverifier/verifier_test.go +++ b/internal/chartverifier/verifier_test.go @@ -25,7 +25,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/cli" "github.com/redhat-certification/chart-verifier/internal/chartverifier/checks" "github.com/redhat-certification/chart-verifier/internal/testutil" diff --git a/internal/chartverifier/verifierbuilder.go b/internal/chartverifier/verifierbuilder.go index b09ca3e3..dcd98e18 100644 --- a/internal/chartverifier/verifierbuilder.go +++ b/internal/chartverifier/verifierbuilder.go @@ -22,7 +22,7 @@ import ( "github.com/redhat-certification/chart-verifier/internal/chartverifier/profiles" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/cli" "github.com/spf13/viper" diff --git a/internal/helm/actions/template.go b/internal/helm/actions/template.go index dde807e3..925382f8 100644 --- a/internal/helm/actions/template.go +++ b/internal/helm/actions/template.go @@ -2,48 +2,65 @@ package actions import ( "bytes" + "errors" "fmt" "strings" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/chart/loader" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/chart/loader" + chartv2 "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/cli" + "helm.sh/helm/v4/pkg/release" ) -func RenderManifests(name string, url string, vals map[string]interface{}, conf *action.Configuration) (string, error) { - validate := false - client := action.NewInstall(conf) - client.DryRun = true - includeCrds := true - client.ReleaseName = "RELEASE-NAME" - client.Replace = true // Skip the releaseName check - client.ClientOnly = !validate +// RenderManifest performs a client-side dry-run installation of the provided +// chartURL with vals and release name. The provided conf serves as a baseline +// configuration, after which the installer is configured for client-side dry +// run. +// +// Helm libraries handle parsing of chartURL. CRDs and Hooks (if enabled) are +// added. The finally output contains the rendered manifests of what would be +// installed by the provided chart. +func RenderManifests(releaseName string, chartURL string, vals map[string]any, conf *action.Configuration) (string, error) { + installer := action.NewInstall(conf) + // Prepare client for rendering only, no installation + installer.DryRunStrategy = "client" + // Skip the releaseName check by enabling Replace mode. + installer.Replace = true emptyResponse := "" // Must set the capabilities on *action.Install{}.KubeVersion directly // because Helm will replace our capabilities with the defaults they // configure. if conf.Capabilities != nil { - client.KubeVersion = &conf.Capabilities.KubeVersion + installer.KubeVersion = &conf.Capabilities.KubeVersion } - name, chart, err := client.NameAndChart([]string{name, url}) + // Roundtrip through the installer name validation to make sure + // installer flags don't conflict with a passed in releaseName and chartURL. + releaseName, chartURL, err := installer.NameAndChart([]string{releaseName, chartURL}) if err != nil { return emptyResponse, err } - client.ReleaseName = name - cp, err := client.LocateChart(chart, cli.New()) + installer.ReleaseName = releaseName + + chartPath, err := installer.LocateChart(chartURL, cli.New()) + if err != nil { + return emptyResponse, err + } + + ch, err := loader.Load(chartPath) if err != nil { return emptyResponse, err } - ch, err := loader.Load(cp) + rel, err := installer.Run(ch, vals) if err != nil { return emptyResponse, err } - rel, err := client.Run(ch, vals) + relAccessor, err := release.NewAccessor(rel) if err != nil { return emptyResponse, err } @@ -51,17 +68,34 @@ func RenderManifests(name string, url string, vals map[string]interface{}, conf var manifests bytes.Buffer var output bytes.Buffer - if includeCrds { - for _, f := range rel.Chart.CRDs() { - fmt.Fprintf(&manifests, "---\n# Source: %s\n%s\n", f.Name, f.Data) + // CRDObjects() method is not accessible from the chart.Charter interface, + // we need to assert the supported type and pull the CRDs from there. + switch v := relAccessor.Chart().(type) { + case *chartv2.Chart: + for _, f := range v.CRDObjects() { + fmt.Fprintf(&manifests, "---\n# Source: %s\n%s\n", f.Name, f.File.Data) } + // TODO(komish): When chartv3 becomes a part of Helm's public API, we should + // be able to uncomment this and add the right imports to support that chart + // type. May need to validate CRD types have not changed. + // + // case *chartv3.Chart: + // for _, f := range v.CRDObjects() { + // fmt.Fprintf(&manifests, "---\n# Source: %s\n%s\n", f.Name, f.File.Data) + // } + default: + return emptyResponse, errors.New("unsupported chart type") } - fmt.Fprintln(&manifests, strings.TrimSpace(rel.Manifest)) + fmt.Fprintln(&manifests, strings.TrimSpace(relAccessor.Manifest())) - if !client.DisableHooks { - for _, m := range rel.Hooks { - fmt.Fprintf(&manifests, "---\n# Source: %s\n%s\n", m.Path, m.Manifest) + if !installer.DisableHooks { + for _, hook := range relAccessor.Hooks() { + hookAccessor, err := release.NewHookAccessor(hook) + if err != nil { + return emptyResponse, err + } + fmt.Fprintf(&manifests, "---\n# Source: %s\n%s\n", hookAccessor.Path(), hookAccessor.Manifest()) } } diff --git a/internal/tool/helm.go b/internal/tool/helm.go index 86e01f8b..23fd354f 100644 --- a/internal/tool/helm.go +++ b/internal/tool/helm.go @@ -9,12 +9,13 @@ import ( "github.com/redhat-certification/chart-verifier/internal/chartverifier/utils" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/chart/loader" - "helm.sh/helm/v3/pkg/cli" - "helm.sh/helm/v3/pkg/cli/values" - "helm.sh/helm/v3/pkg/getter" - "helm.sh/helm/v3/pkg/strvals" + "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/chart/v2/loader" + "helm.sh/helm/v4/pkg/cli" + "helm.sh/helm/v4/pkg/cli/values" + "helm.sh/helm/v4/pkg/getter" + "helm.sh/helm/v4/pkg/kube" + "helm.sh/helm/v4/pkg/strvals" ) type Helm struct { @@ -29,10 +30,8 @@ func NewHelm(envSettings *cli.EnvSettings, args map[string]interface{}, timeout if timeout < 5*time.Minute { helm.timeout = 5 * time.Minute } - config := new(action.Configuration) - if err := config.Init(envSettings.RESTClientGetter(), envSettings.Namespace(), os.Getenv("HELM_DRIVER"), func(format string, v ...interface{}) { - utils.LogInfo(fmt.Sprintf(format, v)) - }); err != nil { + config := action.NewConfiguration(action.ConfigurationSetLogger(utils.SlogHandler())) + if err := config.Init(envSettings.RESTClientGetter(), envSettings.Namespace(), os.Getenv("HELM_DRIVER")); err != nil { return nil, err } helm.config = config @@ -44,7 +43,7 @@ func (h Helm) Install(ctx context.Context, namespace, chart, release, valuesFile client := action.NewInstall(h.config) client.Namespace = namespace client.ReleaseName = release - client.Wait = true + client.WaitStrategy = kube.StatusWatcherStrategy // default timeout duration // ref: https://helm.sh/docs/helm/helm_install client.Timeout = h.timeout @@ -117,7 +116,10 @@ func (h Helm) Test(ctx context.Context, namespace, release string) error { return errors.New("Helm test error : timeout has expired, please consider increasing the timeout using the chart-verifier timeout flag") } // TODO: support filter - _, err := client.Run(release) + // TODO: client.Run returns a shutdown function as of helm/v4 that we should + // leverage to cleanup releases combined with our existing logic to clean up + // resources at the namespace level. + _, _, err := client.Run(release) if err != nil { utils.LogError(fmt.Sprintf("Execute helm test. error %v", err)) return err @@ -130,6 +132,7 @@ func (h Helm) Test(ctx context.Context, namespace, release string) error { func (h Helm) Uninstall(namespace, release string) error { utils.LogInfo(fmt.Sprintf("Execute helm uninstall. namespace: %s, release: %s", namespace, release)) client := action.NewUninstall(h.config) + client.WaitStrategy = kube.StatusWatcherStrategy // TODO: support other options if required _, err := client.Run(release) if err != nil { @@ -146,7 +149,7 @@ func (h Helm) Upgrade(ctx context.Context, namespace, chart, release string) err client := action.NewUpgrade(h.config) client.Namespace = namespace client.ReuseValues = true - client.Wait = true + client.WaitStrategy = kube.StatusWatcherStrategy cp, err := client.LocateChart(chart, h.envSettings) if err != nil { diff --git a/internal/tool/helm_test.go b/internal/tool/helm_test.go index 68242ad7..f267b4c6 100644 --- a/internal/tool/helm_test.go +++ b/internal/tool/helm_test.go @@ -10,14 +10,16 @@ import ( "gopkg.in/yaml.v3" "github.com/stretchr/testify/require" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/chart" - "helm.sh/helm/v3/pkg/chartutil" - "helm.sh/helm/v3/pkg/cli" - kubefake "helm.sh/helm/v3/pkg/kube/fake" - "helm.sh/helm/v3/pkg/release" - "helm.sh/helm/v3/pkg/storage" - "helm.sh/helm/v3/pkg/storage/driver" + "helm.sh/helm/v4/pkg/action" + chartcommon "helm.sh/helm/v4/pkg/chart/common" + chartv2 "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/cli" + kubefake "helm.sh/helm/v4/pkg/kube/fake" + + releasecommon "helm.sh/helm/v4/pkg/release/common" + releasev1 "helm.sh/helm/v4/pkg/release/v1" + "helm.sh/helm/v4/pkg/storage" + "helm.sh/helm/v4/pkg/storage/driver" ) func TestInstall(t *testing.T) { @@ -45,8 +47,7 @@ func TestInstall(t *testing.T) { actionConfig := &action.Configuration{ Releases: storage.Init(driver.NewMemory()), KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard}, - Capabilities: chartutil.DefaultCapabilities, - Log: func(format string, v ...interface{}) {}, + Capabilities: chartcommon.DefaultCapabilities, } helm := Helm{ config: actionConfig, @@ -72,15 +73,15 @@ func TestInstall(t *testing.T) { func TestUninstall(t *testing.T) { tests := []struct { name string - release *release.Release + release *releasev1.Release expected string }{ { name: "successful release uninstall should remove release installed", - release: &release.Release{ + release: &releasev1.Release{ Name: "test-release-valid", - Info: &release.Info{ - Status: release.StatusDeployed, + Info: &releasev1.Info{ + Status: releasecommon.StatusDeployed, }, Namespace: "default", }, @@ -88,10 +89,10 @@ func TestUninstall(t *testing.T) { }, { name: "remove non-existent release should result in error", - release: &release.Release{ + release: &releasev1.Release{ Name: "test-release-invalid", - Info: &release.Info{ - Status: release.StatusDeployed, + Info: &releasev1.Info{ + Status: releasecommon.StatusDeployed, }, Namespace: "default", }, @@ -105,8 +106,7 @@ func TestUninstall(t *testing.T) { actionConfig := &action.Configuration{ Releases: store, KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard}, - Capabilities: chartutil.DefaultCapabilities, - Log: func(format string, v ...interface{}) {}, + Capabilities: chartcommon.DefaultCapabilities, } helm := Helm{ config: actionConfig, @@ -130,13 +130,13 @@ func TestUninstall(t *testing.T) { } func TestUpgrade(t *testing.T) { - testValues, err := chartutil.ReadValuesFile("../chartverifier/checks/psql-service-0.1.7/values.yaml") + testValues, err := chartcommon.ReadValuesFile("../chartverifier/checks/psql-service-0.1.7/values.yaml") if err != nil { t.Error(err) } testValues.AsMap()["k8Project"] = "default" - var chartMetadata chart.Metadata + var chartMetadata chartv2.Metadata yamlFile, err := os.ReadFile("../chartverifier/checks/psql-service-0.1.7/Chart.yaml") require.NoError(t, err) err = yaml.Unmarshal(yamlFile, &chartMetadata) @@ -145,20 +145,20 @@ func TestUpgrade(t *testing.T) { tests := []struct { name string chartPath string - release *release.Release + release *releasev1.Release expected string timeout time.Duration }{ { name: "successful release upgrade should not return error", chartPath: "../chartverifier/checks/psql-service-0.1.7", - release: &release.Release{ + release: &releasev1.Release{ Name: "test-release-valid", - Info: &release.Info{ - Status: release.StatusDeployed, + Info: &releasev1.Info{ + Status: releasecommon.StatusDeployed, }, Namespace: "default", - Chart: &chart.Chart{Metadata: &chartMetadata, Values: testValues}, + Chart: &chartv2.Chart{Metadata: &chartMetadata, Values: testValues}, }, expected: "", timeout: 10 * time.Second, @@ -166,13 +166,13 @@ func TestUpgrade(t *testing.T) { { name: "upgrade non-existent release should result in error", chartPath: "../chartverifier/checks/psql-service-0.1.7", - release: &release.Release{ + release: &releasev1.Release{ Name: "test-release-invalid", - Info: &release.Info{ - Status: release.StatusDeployed, + Info: &releasev1.Info{ + Status: releasecommon.StatusDeployed, }, Namespace: "default", - Chart: &chart.Chart{Values: testValues}, + Chart: &chartv2.Chart{Values: testValues}, }, expected: "\"test-release-invalid\" has no deployed releases", timeout: 10 * time.Second, @@ -185,8 +185,7 @@ func TestUpgrade(t *testing.T) { actionConfig := &action.Configuration{ Releases: store, KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard}, - Capabilities: chartutil.DefaultCapabilities, - Log: func(format string, v ...interface{}) {}, + Capabilities: chartcommon.DefaultCapabilities, } helm := Helm{ config: actionConfig, @@ -219,30 +218,30 @@ func TestReleaseTesting(t *testing.T) { if err != nil { t.Error(err) } - testHooks := []*release.Hook{ + testHooks := []*releasev1.Hook{ { Name: "test-success-hook", Kind: "Pod", Path: releaseTestPath, Manifest: string(releaseTest), - LastRun: release.HookExecution{}, - Events: []release.HookEvent{release.HookTest}, + LastRun: releasev1.HookExecution{}, + Events: []releasev1.HookEvent{releasev1.HookTest}, }, } tests := []struct { name string chartPath string - release *release.Release + release *releasev1.Release expected string timeout time.Duration }{ { name: "successful release test should not return error", chartPath: "../chartverifier/checks/psql-service-0.1.7", - release: &release.Release{ + release: &releasev1.Release{ Name: "test-release-valid", - Info: &release.Info{ - Status: release.StatusDeployed, + Info: &releasev1.Info{ + Status: releasecommon.StatusDeployed, }, Namespace: "default", Hooks: testHooks, @@ -253,10 +252,10 @@ func TestReleaseTesting(t *testing.T) { { name: "release test on non-existent release should result in error", chartPath: "../chartverifier/checks/psql-service-0.1.7", - release: &release.Release{ + release: &releasev1.Release{ Name: "test-release-invalid", - Info: &release.Info{ - Status: release.StatusDeployed, + Info: &releasev1.Info{ + Status: releasecommon.StatusDeployed, }, Namespace: "default", Hooks: testHooks, @@ -267,10 +266,10 @@ func TestReleaseTesting(t *testing.T) { { name: "release test with a zero or negative value should result in error", chartPath: "../chartverifier/checks/psql-service-0.1.7", - release: &release.Release{ + release: &releasev1.Release{ Name: "test-release-invalid-timeout", - Info: &release.Info{ - Status: release.StatusDeployed, + Info: &releasev1.Info{ + Status: releasecommon.StatusDeployed, }, Namespace: "default", Hooks: testHooks, @@ -286,8 +285,7 @@ func TestReleaseTesting(t *testing.T) { actionConfig := &action.Configuration{ Releases: store, KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard}, - Capabilities: chartutil.DefaultCapabilities, - Log: func(format string, v ...interface{}) {}, + Capabilities: chartcommon.DefaultCapabilities, } helm := Helm{ config: actionConfig, diff --git a/internal/tool/kubectl.go b/internal/tool/kubectl.go index 6579476a..9d45adec 100644 --- a/internal/tool/kubectl.go +++ b/internal/tool/kubectl.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v4/pkg/cli" v1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/chartverifier/report/types.go b/pkg/chartverifier/report/types.go index d1e4c2af..1c98df47 100644 --- a/pkg/chartverifier/report/types.go +++ b/pkg/chartverifier/report/types.go @@ -3,7 +3,7 @@ package report import ( "net/url" - helmchart "helm.sh/helm/v3/pkg/chart" + chartv2 "helm.sh/helm/v4/pkg/chart/v2" apichecks "github.com/redhat-certification/chart-verifier/pkg/chartverifier/checks" ) @@ -24,9 +24,9 @@ type Report struct { } type ReportMetadata struct { - ToolMetadata ToolMetadata `json:"tool" yaml:"tool"` - ChartData *helmchart.Metadata `json:"chart" yaml:"chart"` - Overrides string `json:"chart-overrides" yaml:"chart-overrides"` + ToolMetadata ToolMetadata `json:"tool" yaml:"tool"` + ChartData *chartv2.Metadata `json:"chart" yaml:"chart"` + Overrides string `json:"chart-overrides" yaml:"chart-overrides"` } type ToolMetadata struct { diff --git a/pkg/chartverifier/reportsummary/types.go b/pkg/chartverifier/reportsummary/types.go index f2f4346f..bd0e0d93 100644 --- a/pkg/chartverifier/reportsummary/types.go +++ b/pkg/chartverifier/reportsummary/types.go @@ -1,7 +1,7 @@ package reportsummary import ( - helmchart "helm.sh/helm/v3/pkg/chart" + chartv2 "helm.sh/helm/v4/pkg/chart/v2" "github.com/redhat-certification/chart-verifier/internal/chartverifier/profiles" apireport "github.com/redhat-certification/chart-verifier/pkg/chartverifier/report" @@ -38,8 +38,8 @@ type MetadataReport struct { WebCatalogOnly bool `json:"webCatalogOnly" yaml:"webCatalogOnly,omitempty"` //nolint:stylecheck // complains Uri should be URI - leaving as is for now //because this produces an outputted file. - ChartUri string `json:"chart-uri" yaml:"chart-uri"` - Chart *helmchart.Metadata `json:"chart" yaml:"chart"` + ChartUri string `json:"chart-uri" yaml:"chart-uri"` + Chart *chartv2.Metadata `json:"chart" yaml:"chart"` } type ResultsReport struct { diff --git a/pkg/chartverifier/verifier/verifier.go b/pkg/chartverifier/verifier/verifier.go index 0ca296ed..c255f4c0 100644 --- a/pkg/chartverifier/verifier/verifier.go +++ b/pkg/chartverifier/verifier/verifier.go @@ -33,9 +33,9 @@ import ( "github.com/spf13/viper" - "helm.sh/helm/v3/pkg/cli" - "helm.sh/helm/v3/pkg/cli/values" - "helm.sh/helm/v3/pkg/getter" + "helm.sh/helm/v4/pkg/cli" + "helm.sh/helm/v4/pkg/cli/values" + "helm.sh/helm/v4/pkg/getter" ) // to do: move report structiure, logs structure, and check names to api directory