-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat(storage): GCS backend using thanos.io/objstore #11132
Conversation
a2f70a5
to
daf3d62
Compare
Signed-off-by: Joao Marcal <[email protected]>
daf3d62
to
0c88216
Compare
Trivy scan found the following vulnerabilities:
|
6b6b613
to
e816a3c
Compare
Thank you! ❤️ |
bc19a01
to
19f610c
Compare
…iod) Signed-off-by: Ashwanth Goli <[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.
Just some small comments but overall lgmt 🙌 thank you for the work to get this merged!
if err != nil { | ||
size = -1 | ||
level.Warn(s.logger).Log("msg", "failed to get size of object", "err", err) | ||
} |
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.
Here since we are always dealing with the gcs provider is this code path possible? IIUC the TryToGetSize will only produce an error if it gets an unsupported io.Reader
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.
likely not for gcs, but it might also fail if the provider specific code fails to get the size for some reason. Seems very unlikely but I added this to not fail the Get request entirely if we cannot figure out the size. Size is only being used to reduce allocations, does not affect any functionality
pkg/storage/bucket/client.go
Outdated
ErrUnsupportedStorageBackend = errors.New("unsupported storage backend") | ||
ErrInvalidCharactersInStoragePrefix = errors.New("storage prefix contains invalid characters, it may only contain digits and English alphabet letters") | ||
|
||
// TODO: Remove this global if we can tag all clients with component name |
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.
Even if we do this aren't we still going to hit duplicated metric registration for multiple schema_config?
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.
yeah, i think the comment can be more descriptive. i'll fix it :)
// reset if GetObject fails to return a valid size | ||
if size < 0 { | ||
size = 0 | ||
} |
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.
hey would that be possible a bug on our side? If so, i think we should at least log something. If that's a known problem with the GCP API please ignore this comment.
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.
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 just a quick question on #11132 (comment)
What this PR does / why we need it:
This PR adds support to use the thanos.io/objstore backend for the GCS provider for all components
including the RulerWhich issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
CLI Table
Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updatedadd-to-release-notes
labeldocs/sources/setup/upgrade/_index.md
production/helm/loki/Chart.yaml
and updateproduction/helm/loki/CHANGELOG.md
andproduction/helm/loki/README.md
. Example PRdeprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR