Skip to content

Plain text output of describe command look incorrect #346

Open

Description

@joaopapereira

What steps did you take:
When the annotation in ImagesLock contains yaml the text output of the describe command is incorrectly indented.

Let us assume we have the following ImagesLock

---
apiVersion: imgpkg.carvel.dev/v1alpha1
images:
- annotations:
    kbld.carvel.dev/id: index.docker.io/dkalinin/k8s-simple-app:latest
    kbld.carvel.dev/origins: |
      - resolved:
          tag: latest
          url: index.docker.io/dkalinin/k8s-simple-app:latest
  image: index.docker.io/dkalinin/k8s-simple-app@sha256:4c8b96d4fffdfae29258d94a22ae4ad1fe36139d47288b8960d9958d1e63a9d0
kind: ImagesLock

When we execute imgpkg push -b localhost:5000/test -f basic-step-2 the bundle is pushed to the registry

What happened:

When we execute imgpkg describe -b localhost:5000/test@sha256:3cd8f0d917a92fafeef2d44eb63195d5351c35cf46b8b7448cb126c7d68c6291 this is the output

Bundle SHA: sha256:3cd8f0d917a92fafeef2d44eb63195d5351c35cf46b8b7448cb126c7d68c6291

Images:
  - Image: index.docker.io/dkalinin/k8s-simple-app@sha256:4c8b96d4fffdfae29258d94a22ae4ad1fe36139d47288b8960d9958d1e63a9d0
    Type: Image
    Origin: index.docker.io/dkalinin/k8s-simple-app@sha256:4c8b96d4fffdfae29258d94a22ae4ad1fe36139d47288b8960d9958d1e63a9d0
    Annotations:
      kbld.carvel.dev/id: index.docker.io/dkalinin/k8s-simple-app:latest
      kbld.carvel.dev/origins: - resolved:
    tag: latest
    url: index.docker.io/dkalinin/k8s-simple-app:latest


Succeeded

What did you expect:
The output should be correctly indented

Bundle SHA: sha256:3cd8f0d917a92fafeef2d44eb63195d5351c35cf46b8b7448cb126c7d68c6291

Images:
  - Image: index.docker.io/dkalinin/k8s-simple-app@sha256:4c8b96d4fffdfae29258d94a22ae4ad1fe36139d47288b8960d9958d1e63a9d0
    Type: Image
    Origin: index.docker.io/dkalinin/k8s-simple-app@sha256:4c8b96d4fffdfae29258d94a22ae4ad1fe36139d47288b8960d9958d1e63a9d0
    Annotations:
      kbld.carvel.dev/id: index.docker.io/dkalinin/k8s-simple-app:latest
      kbld.carvel.dev/origins: - resolved:
                                   tag: latest
                                   url: index.docker.io/dkalinin/k8s-simple-app:latest


Succeeded

Anything else you would like to add:
We are using the IndentingUI to automatically indent our output but maybe in this case we need to use some static Prefix or something similar

Environment:

  • imgpkg version (use imgpkg --version): v0.26.0
  • Docker registry used (e.g. Docker HUB): NA
  • OS (e.g. from /etc/os-release): MacOS

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help work on this issue.

Activity

  1. added
    bugThis issue describes a defect or unexpected behavior
    carvel triageThis issue has not yet been reviewed for validity
    carvel acceptedThis issue should be considered for future work and that the triage process has been completed
    good first issueAn issue that will be a good candidate for a new contributor
    and removed
    carvel triageThis issue has not yet been reviewed for validity
    on Mar 9, 2022
  2. moved this to To Triage in Carvelon Jul 25, 2022
  3. moved this from To Triage to Unprioritized in Carvelon Feb 14, 2023
  4. udayx-dev commented on Oct 28, 2026

    @udayx-dev

    Hi, I'd like to work on this as a first contribution.

    Is this plain-text indentation issue still wanted? My plan is to reproduce it with an ImagesLock containing YAML annotations, then fix the text output indentation for that case.

    If that approach sounds good, could you please assign it to me?

    Thanks!

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

    bugThis issue describes a defect or unexpected behaviorcarvel acceptedThis issue should be considered for future work and that the triage process has been completedgood first issueAn issue that will be a good candidate for a new contributor

    Type

    No type

    Projects

    • Status
      Unprioritized

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions