Skip to content

Commit

Permalink
Upgrade objstore
Browse files Browse the repository at this point in the history
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
  • Loading branch information
kakkoyun committed Jul 13, 2023
1 parent bcc1257 commit 26130d6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 274 deletions.
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ require (
github.com/klauspost/compress v1.16.7
github.com/nanmu42/limitio v1.0.0
github.com/oklog/run v1.1.0
github.com/polarsignals/frostdb v0.0.0-20230626160949-575a3f643680
github.com/polarsignals/frostdb v0.0.0-20230706122805-ab6f1543ccd2
github.com/prometheus/client_golang v1.16.0
github.com/prometheus/common v0.44.0
github.com/prometheus/prometheus v0.45.0
github.com/segmentio/parquet-go v0.0.0-20230622230624-510764ae9e80
github.com/stretchr/testify v1.8.4
github.com/thanos-io/objstore v0.0.0-20230522103316-23ebe2eacadd
github.com/thanos-io/objstore v0.0.0-20230706112411-e16e78ffbf33
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.42.0
go.opentelemetry.io/otel v1.16.0
Expand All @@ -55,7 +55,6 @@ require (
google.golang.org/grpc v1.56.2
google.golang.org/protobuf v1.31.0
gopkg.in/dnaeon/go-vcr.v3 v3.1.2
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
)

Expand Down Expand Up @@ -196,7 +195,6 @@ require (
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/oracle/oci-go-sdk/v65 v65.13.0 // indirect
github.com/ovh/go-ovh v1.4.1 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
Expand Down Expand Up @@ -236,6 +234,7 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gotest.tools/v3 v3.2.0 // indirect
k8s.io/api v0.26.2 // indirect
k8s.io/apimachinery v0.26.2 // indirect
Expand Down
9 changes: 4 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@ github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKw
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
Expand Down Expand Up @@ -764,8 +763,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/polarsignals/frostdb v0.0.0-20230626160949-575a3f643680 h1:Z7pITXeG2iHHCeLaLFWpkyd2VE4f9FqktY+lUVgwvEk=
github.com/polarsignals/frostdb v0.0.0-20230626160949-575a3f643680/go.mod h1:k0z+Ox9NB3+1vozRALvIX1So/4DPFJ8J1VbITQfIpZM=
github.com/polarsignals/frostdb v0.0.0-20230706122805-ab6f1543ccd2 h1:wk490COZdp84iRUivWERzziHWUpcSxocWmxPxP2hAYI=
github.com/polarsignals/frostdb v0.0.0-20230706122805-ab6f1543ccd2/go.mod h1:+98odC+kowAidfNj6nWKILyry/D2cYThaquvfuadlYQ=
github.com/polarsignals/wal v0.0.0-20230509073041-6731e243de20 h1:YverywcwPHYj5iQq1/Zy/EihWVyw2F0S7j52FvGWK4w=
github.com/polarsignals/wal v0.0.0-20230509073041-6731e243de20/go.mod h1:EVDHAAe+7GQ33A1/x+/gE+sBPN4toQ0XG5RoLD49xr8=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
Expand Down Expand Up @@ -889,8 +888,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4=
github.com/tencentyun/cos-go-sdk-v5 v0.7.40 h1:W6vDGKCHe4wBACI1d2UgE6+50sJFhRWU4O8IB2ozzxM=
github.com/tencentyun/cos-go-sdk-v5 v0.7.40/go.mod h1:4dCEtLHGh8QPxHEkgq+nFaky7yZxQuYwgSJM87icDaw=
github.com/thanos-io/objstore v0.0.0-20230522103316-23ebe2eacadd h1:asQ0HomkaUXZuR3J7daBEusMS++3hkYsYM6u8gpmPWM=
github.com/thanos-io/objstore v0.0.0-20230522103316-23ebe2eacadd/go.mod h1:5V7lzXuaxwt6XFQoA/zJrhdnQrxq1+r0bwQ1iYOq3gM=
github.com/thanos-io/objstore v0.0.0-20230706112411-e16e78ffbf33 h1:qasMv1FKHDhdYiF3M2RLCcrOyMXxqkDNdtsZG9ii6ZE=
github.com/thanos-io/objstore v0.0.0-20230706112411-e16e78ffbf33/go.mod h1:Vc+D0zxX8fT7VOe8Gj0J6vzw0kcTrMCEgE140wCz1c0=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
Expand Down
3 changes: 1 addition & 2 deletions pkg/debuginfo/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"time"

"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/require"
"github.com/thanos-io/objstore/client"
"github.com/thanos-io/objstore/providers/filesystem"
Expand Down Expand Up @@ -52,7 +51,7 @@ func TestMetadata(t *testing.T) {
})
require.NoError(t, err)

bucket, err := client.NewBucket(logger, cfg, prometheus.NewRegistry(), "parca/store")
bucket, err := client.NewBucket(logger, cfg, "parca/store")
require.NoError(t, err)

store, err := NewStore(
Expand Down
260 changes: 0 additions & 260 deletions pkg/objectstore/bucket.go

This file was deleted.

7 changes: 5 additions & 2 deletions pkg/parca/parca.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ import (
"github.com/prometheus/prometheus/discovery"
"github.com/prometheus/prometheus/model/labels"
"github.com/thanos-io/objstore"
"github.com/thanos-io/objstore/client"
objstoretracing "github.com/thanos-io/objstore/tracing/opentelemetry"
tracing "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
Expand All @@ -59,7 +61,6 @@ import (
"github.com/parca-dev/parca/pkg/config"
"github.com/parca-dev/parca/pkg/debuginfo"
"github.com/parca-dev/parca/pkg/metastore"
"github.com/parca-dev/parca/pkg/objectstore"
"github.com/parca-dev/parca/pkg/parcacol"
"github.com/parca-dev/parca/pkg/profilestore"
queryservice "github.com/parca-dev/parca/pkg/query"
Expand Down Expand Up @@ -218,11 +219,13 @@ func Run(ctx context.Context, logger log.Logger, reg *prometheus.Registry, flags
return err
}

bucket, err := objectstore.NewBucket(tracerProvider.Tracer("objstore_bucket"), logger, bucketCfg, reg, "parca")
bucket, err := client.NewBucket(logger, bucketCfg, "parca")
if err != nil {
level.Error(logger).Log("msg", "failed to initialize object storage bucket", "err", err)
return err
}
bucket = client.NewInstrumentedBucket(reg, bucket)
bucket = objstoretracing.NewTracingBucket(tracerProvider.Tracer("objstore_bucket"), bucket)

var signedRequestsClient signedrequests.Client
if flags.Debuginfo.UploadsSignedURL {
Expand Down
2 changes: 1 addition & 1 deletion pkg/symbolizer/symbolizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ func setup(t *testing.T) (*grpc.ClientConn, pb.MetastoreServiceClient, *Symboliz
})
require.NoError(t, err)

bucket, err := client.NewBucket(logger, cfg, prometheus.NewRegistry(), "parca/store")
bucket, err := client.NewBucket(logger, cfg, "parca/store")
require.NoError(t, err)

metadata := debuginfo.NewObjectStoreMetadata(logger, bucket)
Expand Down

0 comments on commit 26130d6

Please sign in to comment.