Skip to content

Commit

Permalink
Ruler: Rule group not found API message
Browse files Browse the repository at this point in the history
We copied over the ruler code as part of #5089, and it seems that at the same time we stopped depending on the object storage implementation of Cortex. Turns out, there are (slight) differences between the clients which meant that response returned by the API when we try to get a rule group that is not found had changed.

This ensures that is consistent with the error assertion that we have in the code for the ruler.
  • Loading branch information
gotjosh authored and chaudum committed Feb 10, 2022
1 parent 6d2b507 commit afaaea4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/storage/chunk/gcp/gcs_object_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ func (s *GCSObjectClient) GetObject(ctx context.Context, objectKey string) (io.R
func (s *GCSObjectClient) getObject(ctx context.Context, objectKey string) (rc io.ReadCloser, size int64, err error) {
reader, err := s.getsBuckets.Object(objectKey).NewReader(ctx)
if err != nil {
if err == storage.ErrObjectNotExist {
return nil, 0, chunk.ErrStorageObjectNotFound
}
return nil, 0, err
}

Expand Down

0 comments on commit afaaea4

Please sign in to comment.