Skip to content

Enhancement: Make s3 backend readError logic more robust#905

Merged
mapno merged 9 commits intografana:mainfrom
wei840222:main
Aug 27, 2021
Merged

Enhancement: Make s3 backend readError logic more robust#905
mapno merged 9 commits intografana:mainfrom
wei840222:main

Conversation

@wei840222
Copy link
Copy Markdown
Contributor

for some s3 compatible storage backend, it may has differnt error messsage when object not exist.
I think using minio.error code for judge the object is not exist is more robust.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Aug 24, 2021

CLA assistant check
All committers have signed the CLA.

@wei840222 wei840222 changed the title Enhancement: make s3 backend readError logic more robust Enhancement: Make s3 backend readError logic more robust Aug 24, 2021
Copy link
Copy Markdown
Contributor

@mapno mapno left a comment

Choose a reason for hiding this comment

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

Hi! Thanks for the contribution. Is there any difference between the current check err.Error() == s3KeyDoesNotExist and checking the error code for the same 'no key' error? It's being checked in both modified methods.

Comment thread tempodb/backend/s3/s3.go Outdated
@mapno
Copy link
Copy Markdown
Contributor

mapno commented Aug 24, 2021

Sorry, I re-read your description and saw the explanation for some s3 compatible storage backend, it may has different error message . Then, would it make sense to just check the code?

@wei840222
Copy link
Copy Markdown
Contributor Author

I think it is make sense to just check the code.
If possible, I can submit another commit to make corrections.

@wei840222
Copy link
Copy Markdown
Contributor Author

wei840222 commented Aug 24, 2021

@mapno I've changed.

Comment thread tempodb/backend/s3/s3.go Outdated
@wei840222 wei840222 requested a review from joe-elliott August 24, 2021 14:42
@wei840222 wei840222 requested a review from mapno August 26, 2021 02:49
Copy link
Copy Markdown
Contributor

@mapno mapno left a comment

Choose a reason for hiding this comment

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

LGTM, nice!

@wei840222
Copy link
Copy Markdown
Contributor Author

It seems need approved for run CI.

@joe-elliott
Copy link
Copy Markdown
Collaborator

Thanks for the contribution, wei. We will wait til we cut 1.1 to merge.

@wei840222
Copy link
Copy Markdown
Contributor Author

Got it, thx

@mapno mapno merged commit f26fac1 into grafana:main Aug 27, 2021
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.

4 participants