Skip to content

Push should return an error when metadata exceeds 2KB #461

Description

@Shion1305

Description:
While working with helm-s3, I encountered an issue where large metadata in Chart.yaml caused failures during reindexing. The issue arises because helm-s3 marshals the chart's metadata into JSON and stores it as x-amz-meta-chart-metadata in an S3 object, but S3 limits metadata to 2KB. If the metadata exceeds this limit, it gets truncated, leading to issues when reindexing charts.

S3 docs
Uploading Screenshot 2024-09-29 at 8.46.22.png…

Steps to Reproduce:

  1. Add a long string (e.g., in the description field) in Chart.yaml.
  2. Push the chart using helm-s3.
  3. The chart gets uploaded, but the metadata is marshaled into x-amz-meta-chart-metadata and truncated due to the 2KB limit.
  4. When running helm s3 reindex, the metadata fails to unmarshal, causing the reindex operation to fail.

Proposal:

To avoid this issue and prevent future operations (such as reindexing) from failing, I propose that the Push command should throw an error if the metadata exceeds 2KB. This will inform users at the point of pushing the chart, allowing them to adjust the metadata size before uploading.

Benefit:

By adding this validation to the Push operation, users will be able to resolve the issue earlier, avoiding troubleshooting time and preventing failures in subsequent operations such as reindex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions