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

return ErrStorageObjectNotFound when object requested for download is not found in Azure blob storage #4200

Conversation

sandeepsukhani
Copy link
Contributor

What this PR does:
When GetObject method is called on any of the object stores and the object is not there in the storage then we return ErrStorageObjectNotFound which is not the case for azure blob storage. This PR makes the required changes to make it consistent with other stores.

I have copied some of the code from thanos for the checks https://github.com/thanos-io/thanos/blob/main/pkg/objstore/azure/azure.go#L179

…download is not found in storage

Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
@pstibrany
Copy link
Contributor

I am wondering if it would be possible to use ServiceCode from StorageError type and check against ServiceCodeBlobNotFound.

Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
@sandeepsukhani
Copy link
Contributor Author

sandeepsukhani commented May 20, 2021

I am wondering if it would be possible to use ServiceCode from StorageError type and check against ServiceCodeBlobNotFound.

Makes sense. I have updated the code.
Thanks!

@sandeepsukhani sandeepsukhani changed the title detect and return ErrStorageObjectNotFound when object requested for download is not found in storage detect and return ErrStorageObjectNotFound when object requested for download is not found in Azure blob storage May 24, 2021
@sandeepsukhani sandeepsukhani changed the title detect and return ErrStorageObjectNotFound when object requested for download is not found in Azure blob storage return ErrStorageObjectNotFound when object requested for download is not found in Azure blob storage May 24, 2021
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@gouthamve gouthamve left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants