Skip to content

Commit

Permalink
*: Update parca-dev/parca after proto refactoring/linting
Browse files Browse the repository at this point in the history
  • Loading branch information
brancz committed Aug 31, 2021
1 parent eabffbd commit 0617854
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 35 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
github.com/oklog/run v1.1.0
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d
github.com/parca-dev/parca v0.0.0-20210809093136-2790c84a495e
github.com/parca-dev/parca v0.0.0-20210831075758-4d575344697c
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/prometheus v2.5.0+incompatible
github.com/sirupsen/logrus v1.8.1
Expand Down
48 changes: 30 additions & 18 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion k8s/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
profilestorepb "github.com/parca-dev/parca/proto/gen/go/profilestore"
profilestorepb "github.com/parca-dev/parca/gen/proto/go/parca/profilestore/v1alpha1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
"github.com/go-kit/kit/log/level"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/oklog/run"
profilestorepb "github.com/parca-dev/parca/gen/proto/go/parca/profilestore/v1alpha1"
"github.com/parca-dev/parca/pkg/debuginfo"
profilestorepb "github.com/parca-dev/parca/proto/gen/go/profilestore"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/prometheus/pkg/labels"
Expand Down Expand Up @@ -75,8 +75,8 @@ func main() {

var (
err error
wc profilestorepb.ProfileStoreClient = NewNoopProfileStoreClient()
dc DebugInfoClient = NewNoopDebugInfoClient()
wc profilestorepb.ProfileStoreServiceClient = NewNoopProfileStoreClient()
dc DebugInfoClient = NewNoopDebugInfoClient()
)

if len(flags.StoreAddress) > 0 {
Expand All @@ -86,7 +86,7 @@ func main() {
os.Exit(1)
}

wc = profilestorepb.NewProfileStoreClient(conn)
wc = profilestorepb.NewProfileStoreServiceClient(conn)
dc = debuginfo.NewDebugInfoClient(conn)
}

Expand Down
6 changes: 3 additions & 3 deletions podmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/go-kit/kit/log/level"
"github.com/parca-dev/parca-agent/k8s"
"github.com/parca-dev/parca-agent/ksym"
profilestorepb "github.com/parca-dev/parca/proto/gen/go/profilestore"
profilestorepb "github.com/parca-dev/parca/gen/proto/go/parca/profilestore/v1alpha1"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/tools/cache"
)
Expand All @@ -48,7 +48,7 @@ type PodManager struct {
containerIDsByKey map[string]map[string]*CgroupProfiler
mtx *sync.RWMutex

writeClient profilestorepb.ProfileStoreClient
writeClient profilestorepb.ProfileStoreServiceClient
debugInfoClient DebugInfoClient
sink func(Record)

Expand Down Expand Up @@ -162,7 +162,7 @@ func NewPodManager(
podLabelSelector string,
samplingRatio float64,
ksymCache *ksym.KsymCache,
writeClient profilestorepb.ProfileStoreClient,
writeClient profilestorepb.ProfileStoreServiceClient,
debugInfoClient DebugInfoClient,
) (*PodManager, error) {
createdChan := make(chan *v1.Pod)
Expand Down
8 changes: 4 additions & 4 deletions profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/parca-dev/parca-agent/byteorder"
"github.com/parca-dev/parca-agent/ksym"
"github.com/parca-dev/parca-agent/maps"
profilestorepb "github.com/parca-dev/parca/proto/gen/go/profilestore"
profilestorepb "github.com/parca-dev/parca/gen/proto/go/parca/profilestore/v1alpha1"
)

//go:embed dist/parca-agent.bpf.o
Expand Down Expand Up @@ -71,7 +71,7 @@ func NewNoopDebugInfoClient() DebugInfoClient {

type NoopProfileStoreClient struct{}

func NewNoopProfileStoreClient() profilestorepb.ProfileStoreClient {
func NewNoopProfileStoreClient() profilestorepb.ProfileStoreServiceClient {
return &NoopProfileStoreClient{}
}

Expand All @@ -92,7 +92,7 @@ type CgroupProfiler struct {
cancel func()

pidMappingFileCache *maps.PidMappingFileCache
writeClient profilestorepb.ProfileStoreClient
writeClient profilestorepb.ProfileStoreServiceClient
debugInfoClient DebugInfoClient

mtx *sync.RWMutex
Expand All @@ -103,7 +103,7 @@ type CgroupProfiler struct {
func NewCgroupProfiler(
logger log.Logger,
ksymCache *ksym.KsymCache,
writeClient profilestorepb.ProfileStoreClient,
writeClient profilestorepb.ProfileStoreServiceClient,
debugInfoClient DebugInfoClient,
target CgroupProfilingTarget,
sink func(Record),
Expand Down
6 changes: 3 additions & 3 deletions systemdmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import (
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/parca-dev/parca-agent/ksym"
profilestorepb "github.com/parca-dev/parca/proto/gen/go/profilestore"
profilestorepb "github.com/parca-dev/parca/gen/proto/go/parca/profilestore/v1alpha1"
)

type SystemdManager struct {
logger log.Logger
nodeName string
samplingRatio float64
ksymCache *ksym.KsymCache
writeClient profilestorepb.ProfileStoreClient
writeClient profilestorepb.ProfileStoreServiceClient
debugInfoClient DebugInfoClient
sink func(Record)
units map[string]struct{}
Expand Down Expand Up @@ -56,7 +56,7 @@ func NewSystemdManager(
units []string,
samplingRatio float64,
ksymCache *ksym.KsymCache,
writeClient profilestorepb.ProfileStoreClient,
writeClient profilestorepb.ProfileStoreServiceClient,
debugInfoClient DebugInfoClient,
) *SystemdManager {
unitsSet := map[string]struct{}{}
Expand Down
2 changes: 1 addition & 1 deletion targetmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/google/pprof/profile"
profilestorepb "github.com/parca-dev/parca/proto/gen/go/profilestore"
profilestorepb "github.com/parca-dev/parca/gen/proto/go/parca/profilestore/v1alpha1"
"github.com/prometheus/prometheus/pkg/labels"
)

Expand Down

0 comments on commit 0617854

Please sign in to comment.