helm/chart-testing

Allow version increment check in combination with --chart-dirs flag

philippwaller opened this issue · 4 comments

Usecase

I use CT mainly in a CI pipeline. To take advantage of the matrix build feature, I wrote my own change detection script and test all my changed charts in parallel in multiple VMs. Therefore, I call CT as follows and pass only one chart at a time:

ct lint --config .github/ct.yaml --charts ${{ matrix.charts }}

In this context I would like to check if a version bump is necessary. However, this is currently not possible since the version check is disabled in combination with the --chart-dirs flag.

Current workaround is to use the --excluded-charts which is very inconvenient in this case.

Proposal

a) [BREAK-CHANGE] The version check is activated by default when using --charts and --all. To prevent false warnings, the version check is only performed if the passed chart has been changed.

----- or -----

b) [NEW-FEATURE] The version check can be executed independently of the lint function via a separate command in the main menu. The check can be executed either for:

  • all charts
  • all changed charts (default)
  • for specified charts

Additionally, the flag --enable-change-detection can be used to perform the check only for changed charts.

Next steps

If one of the two ideas is accepted, I'll be happy to write a PR.

sacsar commented

I have another use case (though perhaps the answer here is that I'm doing it wrong). I have three charts: foo, bar and common. Both foo and bar depend on common. Therefore, if common's version is bumped, the version in foo and bar's dependencies needs to be bumped as well, but ct lint won't catch this. The obvious solution would be to run with --all but then you lose the version check.

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.

This issue was closed because it has been stalled for 5 days with no activity.

Is there a way we can reopen this? I would like this feature to be added.