chart-testing icon indicating copy to clipboard operation
chart-testing copied to clipboard

Support for library charts

Open hairmare opened this issue 4 years ago • 19 comments

Is this a request for help?:

Probably

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

This is a FEATURE REQUEST. I would like to be able to test library charts to some degree using the chart-testing automation.

This will help with maintaining library charts since it could make it easier to change them if they are properly tested.

Version of Helm and Kubernetes:

"latest"

What happened:

I created a library chart on a repo with the chart-testing GitHub Action enabled.

What you expected to happen:

That chart-testing does some sort or more or less meaningful tests on my library chart.

How to reproduce it (as minimally and precisely as possible):

Run the install tests of chart-testing against a charts/ folder containing a library chart.

Anything else we need to know:

I think there are a few reasonable ideas on how to tackle this but wanted to get some input:

  • this could be out of scope for chart-testing and I should ignore my library. If this is the way to go I should try to always combine any changes to the library chart with changes to an example chart that uses the library (this might result in some sorts of dependency-hell when it comes to managing Chart.lock files in PRs)
  • chart-testing could support a concrete example of the library in the ci/ folder and use that for testing
  • chart-testing could only support linting library charts and not exit with and simply not attempt to install a library chart (i can already do this by ignoring my library chart)

hairmare avatar Jun 23 '20 16:06 hairmare

I would go with not event trying to install library charts. Since it's not possible just skip them.

For anyone looking for a workaround: Create separate config file for install only which excludes library charts.

lukasz-mitka avatar Jan 28 '21 10:01 lukasz-mitka

We have a library chart among other charts, it's quite surprising to see that libraries chart are not supported.

Before discovering this issue, I had also to create an empty values.yaml otherwise was even failing earlier.

Will try to use a separated config for ct install but looks really clunky.

gionn avatar Feb 02 '23 11:02 gionn

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Nov 29 '23 01:11 github-actions[bot]

bad bot. Still needed.

lukasz-mitka avatar Nov 29 '23 08:11 lukasz-mitka

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Dec 31 '23 01:12 github-actions[bot]

most likely ct should just skip library charts during ct install, but it should lint them during ct lint. I can do this now using two different configs, but keeping those up to date feels error prone and a lot of manual work.

would a change that just makes ct install skip library charts be a welcome change?

hairmare avatar Dec 31 '23 04:12 hairmare

@hairmare I'd say that makes sense. Just skip them and print a warning.

davidkarlsen avatar Dec 31 '23 09:12 davidkarlsen

+1 with tests :)

cpanato avatar Jan 19 '24 10:01 cpanato

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Feb 19 '24 01:02 github-actions[bot]

bad bot. Still needed.

lukasz-mitka avatar Feb 19 '24 08:02 lukasz-mitka

bad bot.

Still needed.

Are willing to work on this and open a pr?

cpanato avatar Feb 19 '24 09:02 cpanato

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Mar 21 '24 01:03 github-actions[bot]

Are willing to work on this and open a pr?

No, sorry, no time to spare.

lukasz-mitka avatar Mar 21 '24 09:03 lukasz-mitka

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 23 '24 01:04 github-actions[bot]

bad bot

lukasz-mitka avatar Apr 23 '24 08:04 lukasz-mitka

@cpanato Could you set an exempt-issue-labels for these kind of issues?

lukasz-mitka avatar Apr 23 '24 09:04 lukasz-mitka

sounds good @lukasz-mitka

cpanato avatar Apr 23 '24 09:04 cpanato