-
Notifications
You must be signed in to change notification settings - Fork 188
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
Store Helm indexes in JSON format #1178
Conversation
4b64dd5
to
e4eb660
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to reserve some time to go through this in depth, but while I do this, you can continue to optimize the loading logic as done here:
Tested this change against two scenarios:
In both scenarios, memory improvements could be observed but the most significant ones were observed during scenario 2 (as can be expected based on the changes. Scenario 1BeforeAfterScenario 2BeforeAfter |
0d40af7
to
b9d8673
Compare
} | ||
] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newline.
// `sigs.k8s.io/yaml` package to unmarshal the YAML data. | ||
// Copied from https://github.com/helm/helm/blob/2544aa23a33977d91fe8f59d12dd923dc43be6c5/pkg/repo/index.go#L378-L390 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// `sigs.k8s.io/yaml` package to unmarshal the YAML data. | |
// Copied from https://github.com/helm/helm/blob/2544aa23a33977d91fe8f59d12dd923dc43be6c5/pkg/repo/index.go#L378-L390 | |
// `sigs.k8s.io/yaml` package to unmarshal the YAML data. | |
// | |
// Can potentially be replaced when Helm PR for JSON support has been merged. | |
// xref: https://github.com/helm/helm/pull/12245 |
@@ -401,6 +402,15 @@ func (r *ChartRepository) Digest(algorithm digest.Algorithm) digest.Digest { | |||
return r.digests[algorithm] | |||
} | |||
|
|||
// ToJSON returns the index formatted as JSON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ToJSON returns the index formatted as JSON | |
// ToJSON returns the index formatted as JSON. |
@somtochiama can you please squash your commits? |
184e38d
to
8edffe6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but would prefer another +1 before this gets merged.
Thank you @somtochiama 🙇 🥇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
8edffe6
to
74aa43f
Compare
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
74aa43f
to
1aa9cf2
Compare
Closes #1172
Store helm indexes in JSON format for more efficient caching.
See linked issue above for more details.