-
Notifications
You must be signed in to change notification settings - Fork 86
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
filesystem: abort filesystem bucket operations if the context has been cancelled #43
filesystem: abort filesystem bucket operations if the context has been cancelled #43
Conversation
Signed-off-by: Charles Korn <[email protected]>
Signed-off-by: Charles Korn <[email protected]>
Signed-off-by: Charles Korn <[email protected]>
Signed-off-by: Charles Korn <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, LGTM :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Changes
Changed all of the
filesystem.Bucket
methods to return early if the context has been cancelled.This makes testing cancellation behaviour of consuming applications easier (see grafana/mimir#4061 for an example), and brings the behaviour of the filesystem bucket into line with the other providers.
Verification
I've added tests for cancellation behaviour in
filesystem_test.go
, and the existing acceptance tests should catch any regressions in existing behaviour.