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 catch the error when failed to list objects for s3 #512

Conversation

jojohappy
Copy link
Member

Signed-off-by: jojohappy [email protected]

Changes

Fixed #261

Verification

Just use a bucket that does not exist to execute thanos bucket ls.

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Thanks, nice catch!

@@ -196,6 +196,10 @@ func (b *Bucket) Iter(ctx context.Context, dir string, f func(string) error) err
}

for object := range b.client.ListObjects(b.bucket, dir, false, ctx.Done()) {
// catch the error when failed to list objects
Copy link
Member

Choose a reason for hiding this comment

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

Can you make those comment full sentence (and below?) - upper case first letter and trailing period.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@bwplotka bwplotka mentioned this pull request Sep 12, 2018
4 tasks
@bwplotka bwplotka merged commit 5f2151f into thanos-io:master Sep 13, 2018
@jojohappy jojohappy deleted the fix_throw_errors_when_s3_bucket_does_not_exists branch September 20, 2018 02:34
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.

'bucket verify' command should error if S3 bucket does not exist
2 participants