Skip to content

Commit

Permalink
fix: external metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Lifosmin Simon committed Sep 18, 2024
1 parent 9bc9768 commit b83fef8
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion plugins/providers/bigquery/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ type bigQueryClient struct {

func NewBigQueryClient(projectID string, opts ...option.ClientOption) (*bigQueryClient, error) {
ctx := context.Background()

client, err := bq.NewClient(ctx, projectID, opts...)
if err != nil {
return nil, err
Expand Down
6 changes: 1 addition & 5 deletions plugins/providers/dataplex/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ type policyTagClient struct {

func newPolicyTagClient(projectID, location string, credentialsJSON []byte) (*policyTagClient, error) {
ctx := context.Background()
opts := []option.ClientOption{
option.WithCredentialsJSON(credentialsJSON),
}
policyManager, err := datacatalog.NewPolicyTagManagerClient(ctx, opts...)
policyManager, err := datacatalog.NewPolicyTagManagerClient(ctx, option.WithCredentialsJSON(credentialsJSON))
if err != nil {
return nil, err
}

return &policyTagClient{
policyManager: policyManager,
projectId: projectID,
Expand Down
7 changes: 1 addition & 6 deletions plugins/providers/gate/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,7 @@ func (p *provider) getClient(pc *domain.ProviderConfig) (*gate.Client, error) {
return nil, fmt.Errorf("failed to decrypt credentials: %w", err)
}

opts := []gate.ClientOption{
gate.WithAPIKey(creds.APIKey),
gate.WithQueryParamAuthMethod(),
}

client, err := gate.NewClient(creds.Host, opts...)
client, err := gate.NewClient(creds.Host, gate.WithAPIKey(creds.APIKey), gate.WithQueryParamAuthMethod())
if err != nil {
return nil, fmt.Errorf("failed to initialize client: %w", err)
}
Expand Down
1 change: 0 additions & 1 deletion plugins/providers/gcloudiam/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ type iamClient struct {

func newIamClient(credentialsJSON []byte, resourceName string) (*iamClient, error) {
ctx := context.Background()

cloudResourceManagerService, err := cloudresourcemanager.NewService(ctx, option.WithCredentialsJSON(credentialsJSON))
if err != nil {
return nil, err
Expand Down
7 changes: 0 additions & 7 deletions plugins/providers/gcs/http.go

This file was deleted.

1 change: 0 additions & 1 deletion plugins/providers/gitlab/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ func (p *provider) getClient(pc domain.ProviderConfig) (*gitlab.Client, error) {
return nil, fmt.Errorf("unable to decrypt credentials: %w", err)
}

// add trace for otel instrumentation
client, err := gitlab.NewClient(creds.AccessToken, gitlab.WithBaseURL(creds.Host))
if err != nil {
return nil, fmt.Errorf("unable to create gitlab client: %w", err)
Expand Down

0 comments on commit b83fef8

Please sign in to comment.