{"record":{"id":"f6658405ac5edcc0","repo":"cilium/cilium","slug":"unsupported-release-type-t-f66584","errorCode":null,"errorMessage":"unsupported release type: %T","messagePattern":"unsupported release type: %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cilium-cli/install/upgrade.go","lineNumber":67,"sourceCode":"\t\tDryRun:           k.params.DryRun,\n\t\tDryRunHelmValues: k.params.DryRunHelmValues,\n\t}\n\trel, err := helm.Upgrade(ctx, k8sClient.HelmActionConfig, upgradeParams)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif k.params.DryRun {\n\t\taccessor, err := release.NewAccessor(rel)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to create release accessor: %w\", err)\n\t\t}\n\t\tfmt.Println(accessor.Manifest())\n\t}\n\tif k.params.DryRunHelmValues {\n\t\tv1rel, ok := rel.(*v1release.Release)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unsupported release type: %T\", rel)\n\t\t}\n\t\thelmValues, err := yaml.Marshal(v1rel.Config)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfmt.Println(string(helmValues))\n\t}\n\tif !k.params.Restart {\n\t\tfmt.Println(\"⚠️  You maybe need to restart Cilium pods for configmap changes to take effect\")\n\t\treturn nil\n\t}\n\n\tif err := k.client.DeletePodCollection(ctx, k.params.Namespace,\n\t\tmetav1.DeleteOptions{}, metav1.ListOptions{LabelSelector: defaults.AgentPodSelector}); err != nil {\n\t\treturn fmt.Errorf(\"⚠️  unable to restart Cilium pods: %w\", err)\n\t}\n\n\tif err := k.client.DeletePodCollection(ctx, k.params.Namespace,","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/cilium-cli/install/upgrade.go#L49-L85","documentation":"With --dry-run-helm-values, cilium-cli type-asserts the upgraded Helm release to *v1release.Release so it can YAML-marshal the release's user-supplied values (v1rel.Config). This error means the release object returned by helm.Upgrade is not the concrete v1 release type, so its Config field cannot be read directly. It is a forward-compatibility guard against Helm abstracting releases behind other types.","triggerScenarios":"k.params.DryRunHelmValues is set, and the Go type assertion rel.(*v1release.Release) fails because helm.Upgrade returned a release wrapped in a different concrete type (e.g. an accessor-backed or future Helm release representation).","commonSituations":"Helm library version drift between cilium-cli's internal helm wrapper and release/v1; custom builds where the upgrade path returns a generic release interface; running a preview/alpha cilium-cli against newer Helm APIs.","solutions":["Upgrade cilium-cli to the latest stable release where the upgrade path returns *v1release.Release","If building from source, sync helm.sh/helm/v4 to the pinned version in cilium-cli's go.mod","Preview values instead via 'helm get values <release>' or 'helm upgrade --dry-run' outside cilium-cli","Report the concrete %T value from the error to cilium-cli if it reproduces on the latest version"],"exampleFix":"// before\nv1rel, ok := rel.(*v1release.Release)\nif !ok {\n\treturn fmt.Errorf(\"unsupported release type: %T\", rel)\n}\n// after (use accessor instead of hard type assertion)\naccessor, err := release.NewAccessor(rel)\nif err != nil {\n\treturn fmt.Errorf(\"failed to create release accessor: %w\", err)\n}\n_ = accessor // use accessor API for values where available\nv1rel, ok := rel.(*v1release.Release)\nif !ok {\n\treturn fmt.Errorf(\"unsupported release type: %T\", rel)\n}","handlingStrategy":"type-guard","validationCode":"// Guard the assertion yourself before expecting values output\nrel, err := helm.Upgrade(ctx, k8sClient.HelmActionConfig, upgradeParams)\nif err != nil {\n\treturn err\n}\nif _, ok := rel.(*v1release.Release); !ok {\n\treturn fmt.Errorf(\"--dry-run-helm-values needs *v1release.Release, got %T\", rel)\n}","typeGuard":"func asV1Release(rel release.Release) (*v1release.Release, bool) {\n\tv1rel, ok := rel.(*v1release.Release)\n\treturn v1rel, ok\n}","tryCatchPattern":"err := installer.UpgradeWithHelm(ctx, k8sClient)\nif err != nil && strings.Contains(err.Error(), \"unsupported release type\") {\n\tlog.Printf(\"values preview skipped; fetch with 'helm get values <release>' instead: %v\", err)\n\terr = nil // upgrade already applied\n}","preventionTips":["Avoid mixing cilium-cli builds with mismatched helm.sh/helm/v4 versions","Prefer 'helm get values <release>' for reading live values instead of --dry-run-helm-values","Pin toolchain versions in CI so the release concrete type stays v1"],"tags":["helm","dry-run","upgrade","type-assertion","cilium"],"backgroundTag":"helm-release-type-mismatch","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}