Repository navigation
don't swallow errors in Swift driver's GetContent() - #1578
Merged
RichardScothern merged 1 commit intoMar 31, 2016
Merged
Conversation
In 326c3a9, which was only intended to be a refactoring commit, the behavior of this block subtly changed so that unknown types of errors would be swallowed instead of propagated. I noticed this while investigating an error similar to #1539 aka moby/moby#21290. It appears that during GetContent() for a hashstate, the Swift proxy produces an error. Since this error was silently swallowed, an empty []byte is used to restart the hash, then producing the digest of the empty string instead of the layer's digest. This PR will not fix the issue, but it should make the actual error more visible by propagating it into `blobWriter#resumeDigest' and 'blobWriter#validateBlob', respectively. Signed-off-by: Stefan Majewsky <[email protected]>
Current coverage is
|
|
Sounds reasonable. 👍 |
thaJeztah
pushed a commit
to thaJeztah/distribution
that referenced
this pull request
Apr 22, 2021
don't swallow errors in Swift driver's GetContent()
thaJeztah
pushed a commit
to thaJeztah/distribution
that referenced
this pull request
Jan 19, 2022
don't swallow errors in Swift driver's GetContent()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In 326c3a9, which was only intended to be a refactoring commit, the behavior of this block subtly changed so that unknown types of errors would be swallowed instead of propagated.
I noticed this while investigating an error similar to #1539 aka moby/moby#21290. It appears that during GetContent() for a hashstate, the Swift proxy produces an unexpected error. Since this error was silently swallowed, an empty []byte is used to restart the hash, then producing the digest of the empty string instead of the layer's digest.
This PR will not fix the issue, but it should make the actual error more visible by propagating it into `blobWriter#resumeDigest' and 'blobWriter#validateBlob', respectively.
/cc @lebauce