bitnami/charts-syncer

Chart indexing fails: Truncated gzip input

jotadrilo opened this issue · 1 comments

Context

Today, I tried syncing a whole Helm Chart repository to a local directory. However, during the re-package process (uncompress source, indexed, chart, modify it, re-package it, and "upload" it to local) the sync failed with:

I0801 11:27:42.723174   72993 sync.go:171] Packaging "schema-registry-4.0.0"
I0801 11:27:42.756879   72993 sync.go:105] Uploading "schema-registry-4.0.0" chart...
Error: uncompressing "/Users/jdrios/.charts-syncer/4f2301d176a9788434844a4ad9839aac81ab7c84/airflow-11.1.6.tgz": unexpected EOF

If I try to uncompress the indexed chart manually I get the following error:

❯ tar xzf airflow-11.1.6.tgz
airflow/charts/postgresql/values.yaml: truncated gzip input
tar: Error exit delayed from previous errors.

Steps to reproduce

This is the configuration file I used (I changed the source repo url here):

source:
  repo:
    kind: HELM
    url: https://acme.org/mychartrepo

target:
  containerRegistry: docker.io
  containerRepository: foo
  repo:
    kind: LOCAL
    path: ./local-repo
❯ ./charts-syncer version
0.18.0

❯ ./charts-syncer sync --config charts-syncer.yaml -v 4

I could not detect the conditions under which this process fails to generate the corrupted tarball.
However, I have spotted that we are not closing file descriptors (nor HTTP body responses) correctly so I have sent #168