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

Allow sharding config to be written in yaml or json #974

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

priyawadhwa
Copy link
Contributor

Right now we only support yaml, which is getting annoying with Helm (Helm has a bunch of issues trying to parse it).

Signed-off-by: Priya Wadhwa [email protected]

Summary

Release Note

Documentation

Right now we only support yaml, which is getting annoying with Helm (Helm has a bunch of issues trying to parse it).

Signed-off-by: Priya Wadhwa <[email protected]>
@priyawadhwa priyawadhwa requested a review from a team as a code owner August 15, 2022 22:34
@priyawadhwa priyawadhwa merged commit db64f44 into sigstore:main Aug 15, 2022
@priyawadhwa priyawadhwa deleted the sharding-config branch August 15, 2022 23:26
@github-actions github-actions bot added this to the v1.0.0 milestone Aug 15, 2022
@@ -82,6 +83,10 @@ func logRangesFromPath(path string) (Ranges, error) {
return Ranges{}, nil
}
if err := yaml.Unmarshal(contents, &ranges); err != nil {
// Try to use JSON
if jerr := json.Unmarshal(contents, &ranges); jerr == nil {
return ranges, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't assign this jerr to err, there can be a situation where we have a nil error, but a zero-value range.

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.

3 participants