Skip to content

fix: read Helm chart archives with the JDK gzip decoder - #705

Merged
ddecrulle merged 1 commit into
mainfrom
fix/helm-chart-gzip-extra-field
Nov 4, 2026
Merged

ddecrulle merged 1 commit into
mainfrom
fix/helm-chart-gzip-extra-field

Conversation

@ddecrulle

Copy link
Copy Markdown
Member

Why

#701 bumped commons-compress from 1.27.1 to 1.28.0. That version parses the gzip header "extra" field strictly, and rejects the non-standard one written by helm package (+aHR0cHM6Ly95b3V0dS5iZS96OVV6MWljandyTQo=Helm). Every chart archive then fails with:

java.io.IOException: Extra subfield lenght exceeds remaining bytes in extra: 21064 > 37
    at org.apache.commons.compress.compressors.gzip.ExtraField.fromBytes(ExtraField.java:154)
    at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.<init>(...)
    at fr.insee.onyxia.api.dao.universe.CatalogLoader.extractDataFromTgz(CatalogLoader.java:248)

CatalogLoader only logs this at INFO, so charts load without values.schema.json (config) and values.yaml (defaultValues). The web launcher then crashes in computeHelmValues on YAML.parse(undefined). This was seen on datalab after deploying main, and the deployment has been reverted.

What

  • CatalogLoader.extractDataFromTgz reads the archive with java.util.zip.GZIPInputStream, which skips the extra field. commons-compress is still used for the tar part, so the dependency stays at 1.28.0.
  • New CatalogLoaderTest.extractHelmPackagedChartTest: it extracts the existing test chart, which already has Helm's gzip header, and checks that both the schema and the default values are read. Before the fix it fails with the exact production exception.

Checked

  • mvn verify: 72 tests pass, spotless OK.
  • Not yet checked on a real deployment. After deploying, CatalogLoaderException should be gone from the startup logs, and latestPackages[*].defaultValues should be back in /catalogs.

Note for reviewers

These load failures were only logged at INFO, which is why the problem went unnoticed. Raising that log level could be a separate change.

🤖 Generated with Claude Code

commons-compress 1.28.0 (bumped in #701) parses the gzip header "extra"
field strictly and rejects the non-standard one written by "helm package"
("Extra subfield lenght exceeds remaining bytes in extra"). Every chart
then failed to load: no values.schema.json and no defaultValues, which made
the web launcher crash on YAML.parse(undefined).

Use java.util.zip.GZIPInputStream, which skips the extra field, and add a
test extracting a Helm-packaged chart.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@ddecrulle
ddecrulle merged commit caed44b into main Nov 4, 2026
9 checks passed
@ddecrulle
ddecrulle deleted the fix/helm-chart-gzip-extra-field branch November 4, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant