masmovil / bazel-rules

Apache License 2.0
62 stars 31 forks source link

Helm chart output archive is not reproducible #55

Open christian-roggia opened 1 year ago

christian-roggia commented 1 year ago

The current setup invokes the tar command instead of leveraging on the existing pkg_tar rules. This results in the output archive (.tgz) changing after each new instance invocation, triggering cache invalidation and rebuilds of targets.

va7ish commented 1 year ago

Perhaps the reasoning for current model is that helm charts are to be always produced by helm package command, even though the result is still a .tgz file. Not sure if we can just blindly assume that helm package is always equivalent to tar -cvzf

danigar commented 11 months ago

Hi @christian-roggia! Thanks for pointing this out. The actual rules are just a wrapper around helm commands (with some extra func). Seems like helm package is not producing reproducible outputs. Here you can find the explanation why https://github.com/helm/helm/issues/3612#issuecomment-525340295 and this is the proper fix https://github.com/helm/helm/pull/10178 (not merged yet). To avoid depending on the fix to be merged, we are implementing a new version leveraging on the existing pkg_tar rules as per your suggestion.