Skip to content

Listing releases (helm list) with short listing format (--short) and json output (--output json) gives unexpected results. #7749

Closed

Description

@git-enzo

Output of helm version:
version.BuildInfo{Version:"v3.1.1", GitCommit:"afe70585407b420d0097d07b21c47dc511525ac8", GitTreeState:"clean", GoVersion:"go1.13.8"}

Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:36:53Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.7", GitCommit:"c83d931fb9bece427bc63a02349755e0f8696d3e", GitTreeState:"clean", BuildDate:"2020-01-31T20:09:49Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

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

Hello,

When I try to list all releases for a specified namespace with json output and short (quiet) listing format, then output is no json.

It seems that combination of these two parameters breaks specified output in helm3. If these parameters are used separately, then it works as expected (either json output or short listing). This behavior is correct in helm2.

Below examples, assuming that we have 2 releases named 'test1' and 'test2' in 'test' namespace.

Helm 3:

Command:
helm list --namespace test --short --output json or helm list --namespace test -q -o json or other combinations

Output:

test1
test2

there is only short listing format (missing json output)

Helm 2:

Command:
helm list --namespace test --short --output json

Output:
["test1","test2"] as expected, short listing format with json output

Activity

  1. added
    bug
    v3.x
    on Mar 9, 2020
  2. mattfarina commented on Mar 9, 2020

    @mattfarina
    Collaborator

    Thanks for the report. I have replicated the issue.

  3. anshulvermapatel commented on Mar 9, 2020

    @anshulvermapatel
    Contributor

    @mattfarina , I too replicated the issue and am working on a PR, give me some more time.

  4. mattfarina commented on Mar 9, 2020

    @mattfarina
    Collaborator

    @anshulvermapatel great. please ping me to review when you have it.

  5. anshulvermapatel commented on Mar 9, 2020

    @anshulvermapatel
    Contributor

    @mattfarina , Raised a PR, please review it once you get time.
    Thank You, do let me know if there is any change required.

  6. added a commit that references this issue on Mar 24, 2020
  7. added this to the 3.2.0 milestone on Mar 24, 2020
  8. mattfarina commented on Mar 24, 2020

    @mattfarina
    Collaborator

    #7753 was merged with a fix for this.

  9. added a commit that references this issue on May 8, 2020
  10. added 4 commits that reference this issue on Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugv3.x

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions