Skip to content

Conversation

alanprot
Copy link
Member

@alanprot alanprot commented Aug 16, 2023

What this PR does:

  • Update to the latest thanos objectstore
  • Fix 5xx when key gets revoke on store gateway
    Which issue(s) this PR fixes:
    Fixes #

Checklist

  • Tests updated
  • [NA] Documentation added
  • [NA] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Alan Protasio <alanprot@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>
@alanprot alanprot marked this pull request as ready for review August 16, 2023 18:55
if errors.Is(err, bucket.ErrCustomerManagedKeyAccessDenied) {
u.storesErrorsMu.Lock()
u.storesErrors[job.userID] = err
u.storesErrors[job.userID] = httpgrpc.Errorf(int(codes.PermissionDenied), "store error: %s", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason we wrap this to httpgrpc error?

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems it is used in testing only?

Copy link
Member Author

Choose a reason for hiding this comment

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

This get translated to a 4xx here:

if s.Code() == codes.PermissionDenied {
return validation.AccessDeniedError(s.Message())
}

This was causing 5xx in this case.

Signed-off-by: Alan Protasio <alanprot@gmail.com>
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

LGTM

@alanprot alanprot merged commit 526a6d9 into cortexproject:master Aug 16, 2023
@alanprot alanprot deleted the store-error branch August 16, 2023 21:11
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.

2 participants