Skip to content
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

Google Cloud Run is the new Cloud Functions #1483

Merged
merged 8 commits into from
Jun 13, 2022

Conversation

joe-elliott
Copy link
Member

@joe-elliott joe-elliott commented Jun 9, 2022

What this PR does:
Changes Tempo's GCP serverless technology from Function to Run. Google Cloud Run supports generic container images and allows us to use Go 1.18 for Parquet support.

Changes made:

  • In drone upload a docker image instead of a zip file to gcs
  • Remove cloud functions code/makefile instructions and replace with cloud run
  • Updated e2e tests to use the new cloud run image
  • Dropped a few places we were using custom code instead of 1.17 features (time.UnixMicro(), math.MaxInt)
  • Changed Cloud Functions documentation to be Cloud Run focused
  • Updated both Lambda and Cloud run to use Go 1.17 to match the rest of the codebase.

Checklist

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

.drone/drone.jsonnet Outdated Show resolved Hide resolved
cmd/tempo-serverless/cloud-run/Dockerfile Outdated Show resolved Hide resolved
pkg/util/trace_info.go Outdated Show resolved Hide resolved
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
@@ -0,0 +1,147 @@
module github.com/grafana/tempo/cmd/tempo-serverless/cloud-run

go 1.18
Copy link
Contributor

Choose a reason for hiding this comment

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

Time to party.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm actually going to walk this back to 1.17 to match the rest of the codebase. We should move this forward together.

# build the serverless container image
#
# todo: FROM scratch saves ~5MB which could be meaningful in a serverless setting, but using scratch gave strange errors on query.
FROM alpine:3.15 as certs
Copy link
Contributor

Choose a reason for hiding this comment

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

I think 3.16 is out if you want to upgrade.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not a bad idea, but all other images are on 3.15. I'm going to leave this on 3.15 as well. We should open a separate PR that moves all of them forward as one.

Copy link
Contributor

@zalegrala zalegrala left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks for putting it together.

Signed-off-by: Joe Elliott <number101010@gmail.com>
@joe-elliott joe-elliott merged commit b59263c into grafana:main Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants