Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Shion1305 opened this issue Sep 11, 2024 · 1 comment · May be fixed by #463
Open

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

Shion1305 opened this issue Sep 11, 2024 · 1 comment · May be fixed by #463

Comments

@Shion1305
Copy link

Shion1305 commented Sep 11, 2024

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.

@Shion1305
Copy link
Author

I'm willing to address and create PR for this issue.

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 a pull request may close this issue.

1 participant