-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[content-service] Make the name of the usage report bucket configurable #11689
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
Conversation
The name of the object storage bucket to which usage reports are uploaded needs to be configurable for Gitpod SaaS. GCloud bucket names are globally unique, so the bucket name must vary between staging and production.
Rather than hardcoding the name of the bucket.
started the job as gitpod-build-af-rename-usage-report-bucket.6 because the annotations in the pull request description changed |
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.
nit: suggest rename the file usagereport-service.go
to usage-report-service.go
or usage-report-service_test.go
to usagereport-service_test.go
. It makes the unit test filename matches the source code file and is easy to read.
Thanks, renamed in 17e7c40 |
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.
Code LGTM.
Description
As part of the move towards usage based pricing (#9036), we'd like for the usage aggregator (
components/usage
) to be able to upload its usage reports to cloud storage. This will provide an audit trail of usage reports, allowing us to cross reference usage entries in the database with the usage reports that provided the data. In future, we may also allow access to these reports to users directly.Making the
content-service
able to upload usage reports was done in #11519.This PR makes the usage report bucket name configurable.
The name of the object storage bucket to which usage reports are uploaded needs to be configurable for Gitpod SaaS. GCloud bucket names are globally unique, so the bucket name must vary between staging and production.
Related Issue(s)
#11688
How to test
Unit tests for the installer.
Hit the
content-service
UsageReport
service with a gRPC client to generate a signed upload URL that includes the name of the bucket (edit thecontent-service
configmap to change the name of the bucket):Release Notes
Documentation
Werft options: