Skip to content

storage History function has inconsistent behaviours depending on the driver #8458

@mikeshng

Description

@mikeshng

The storage History function states returns ErrReleaseNotFound if no such release name exists.
https://github.com/helm/helm/blob/master/pkg/storage/storage.go#L150

For secret and cfgmap, it's possible to have an empty return because there is no length check.
https://github.com/helm/helm/blob/master/pkg/storage/driver/secrets.go#L129-L138
https://github.com/helm/helm/blob/master/pkg/storage/driver/cfgmaps.go#L138-L147

For memory and sql, it's not possible to return an empty due to a length check.
https://github.com/helm/helm/blob/master/pkg/storage/driver/memory.go#L145-L146
https://github.com/helm/helm/blob/master/pkg/storage/driver/sql.go#L313-L325

This seems to be inconsistent behaviour. Is this intentional? Thanks.

Output of helm version:

version.BuildInfo{Version:"v3.1.2", GitCommit:"d878d4d45863e42fd5cff6743294a11d28a9abce", GitTreeState:"clean", GoVersion:"go1.13.8"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:56:40Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.4", GitCommit:"224be7bdce5a9dd0c2fd0d46b83865648e2fe0ba", GitTreeState:"clean", BuildDate:"2020-01-14T01:25:43Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.):
kind

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions