Skip to content

Include bundle metadata in describe output - #790

Open
clcc2019 wants to merge 1 commit into
carvel-dev:developfrom
clcc2019:feat/describe-bundle-metadata
Open

clcc2019 wants to merge 1 commit into
carvel-dev:developfrom
clcc2019:feat/describe-bundle-metadata

Conversation

@clcc2019

Copy link
Copy Markdown

Summary

  • read .imgpkg/bundle.yml directly from each bundle image
  • populate metadata, authors, and websites in imgpkg describe output
  • preserve the existing empty metadata behavior when bundle.yml is absent

Fixes #632

Testing

  • go test ./pkg/imgpkg/v1 -run '^TestDescribeBundleMetadata$' -count=1\n- go test ./pkg/imgpkg/v1 -run '^TestDescribeBundle$' -count=1\n- git diff --check

Signed-off-by: Song Duan <dsong.cc@gmail.com>
Signed-off-by: clcc2019 <46099295+clcc2019@users.noreply.github.com>
@clcc2019
clcc2019 force-pushed the feat/describe-bundle-metadata branch from c4b2723 to 1e97f18 Compare July 20, 2026 07:06

@joaopapereira joaopapereira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need some linter clearing and also test are failing, do you mind fixing that?

Text describe still never prints metadata (bundleTextPrinter); only YAML does. Issue #632 used -o yaml, so OK for the fix, but I would prefer to have consistent UX output.

We are missing a test for “no bundle.yml → empty metadata” (claimed in description).

I was contemplating another question about this PR and that is that we have to read the image 2 times to get the bundle.yaml file and the images.yaml, when we already have the image downloaded locally in the SingleLayerReader. What I am debating here is if this is going to make the Read slower and that will affect the overall performance of imgpkg so that when we do describe it is faster. But as I was writing this I think I convinced myself that it is better to have a slower describe than a slower pull or copy. nevertheless I think it makes sense to maybe have SingleLayerReader to be able to have another function called ReadBundleInfo or something of the sorts and have a function called func (o *SingleLayerReader) read(img regv1.Image, filename string) ([]byte, error) that basically we can extract the logic of reading a file from a layer and after that Read would call o.read(img, ImagesLockFile) while the ReadBundleInfo would call the o.read(img, BundleMetadataFile)

@github-project-automation github-project-automation Bot moved this to In Progress in Carvel Sep 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Command describe does not include metadata.

3 participants