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

[FIXED] Hash decoding in object store, propagate errors from Get() correctly #1052

Merged
merged 1 commit into from Aug 24, 2022

Conversation

piotrpio
Copy link
Collaborator

Resolves #1042

  1. Decode digest hash without SHA-256 prefix
  2. Move verifying digest match to Read(), in order to return error on e.g. ReadAll() Additionally, this bypasses lock set by Read() which prevents us from setting error on ObjectResult.

@coveralls
Copy link

coveralls commented Aug 24, 2022

Coverage Status

Coverage decreased (-0.04%) to 85.573% when pulling 0f8244e on fix-object-sha into 8ae6730 on main.

@Jarema
Copy link
Member

Jarema commented Aug 24, 2022

As discussed, would be nice to have a test for digest check failure.

@piotrpio piotrpio marked this pull request as ready for review August 24, 2022 13:00
Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

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

LGTM

@piotrpio
Copy link
Collaborator Author

@Jarema added test verifying digest check failure

Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

LGTM

@piotrpio piotrpio merged commit 6761fc3 into main Aug 24, 2022
@piotrpio piotrpio deleted the fix-object-sha branch September 15, 2022 13:52
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.

Object Store "Get" API call always fails to verify content digest
4 participants