distribution-tooling-for-helm icon indicating copy to clipboard operation
distribution-tooling-for-helm copied to clipboard

Invalid path when searching Images.lock

Open BLaurent opened this issue 1 year ago • 3 comments

Describe the bug

I am creating wrap.tgz package and just want to get some info about it:

helm dt info simple-web-api-0.7.5.wrap.tgz
failed to load Images.lock: Images.lock not found in wrap
Error: plugin "dt" exited with error

Plugin info:

helm dt version
Distribution Tooling for Helm v0.4.1
Built on: 2024-04-04T15:45:20Z

OS info:

OS: macOS 14.4 23E214 arm64

Reproduction steps

  1. Create a wrap file helm dt wrap ./path_to_helm_chart
  2. Execute helm dt info ./path_to_wrap.tgz

Expected behavior

When I do tar tvfz simple-web-api-0.7.5.wrap.tgz I have this output :

  simple-web-api-0.7.5/chart
  simple-web-api-0.7.5/chart/.helmignore
  simple-web-api-0.7.5/chart/.imgpkg
  simple-web-api-0.7.5/chart/.imgpkg/bundle.yml
  simple-web-api-0.7.5/chart/.imgpkg/images.yml
  simple-web-api-0.7.5/chart/Chart.lock
  simple-web-api-0.7.5/chart/Chart.yaml
  simple-web-api-0.7.5/chart/Chart_template.yaml
  simple-web-api-0.7.5/chart/Images.lock
  simple-web-api-0.7.5/chart/README.md
  simple-web-api-0.7.5/chart/charts

Images.lock is in a sub-directory named chart due to

But in this StripComponents is set to 1. The Images.lock cannot be found as the method here will return chart/Images.lock and the test is done with Images.lock

Additional context

No response

BLaurent avatar Jun 20 '24 09:06 BLaurent

Thanks for reporting. We will work on a fix.

alemorcuq avatar Jun 21 '24 11:06 alemorcuq

If I may, there is smth, I do not understand. The dt info command is documented to work on wrapped chart as shown in the readme. However it does work when passing a chart directory. Handy it is for sure but all the tests are built around assumption the chart directory is rendered at the root of the temp directory.

BLaurent avatar Jul 03 '24 16:07 BLaurent

I've proposed this PR #75

BLaurent avatar Jul 03 '24 17:07 BLaurent