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

go: Update all dependencies to latest #163

Merged
merged 1 commit into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bigquery/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ import (

"cloud.google.com/go/bigquery"
"cloud.google.com/go/civil"
cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
log "github.com/golang/glog"
"github.com/golang/protobuf/ptypes"
"github.com/google/go-containerregistry/pkg/name"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/google"
"github.com/google/go-containerregistry/pkg/v1/remote"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
"google.golang.org/protobuf/types/known/timestamppb"
)

Expand Down
2 changes: 1 addition & 1 deletion bigquery/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (
"testing"

"cloud.google.com/go/bigquery"
cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
log "github.com/golang/glog"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/types"
"google.golang.org/api/googleapi"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
"google.golang.org/protobuf/types/known/timestamppb"
)

Expand Down
2 changes: 1 addition & 1 deletion githubissues/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
log "github.com/golang/glog"

cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion githubissues/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"testing"
"text/template"

cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
)

const githubToken = "ghtABC="
Expand Down
52 changes: 31 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,36 @@ go 1.16
replace github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers => ./lib/notifiers

require (
cloud.google.com/go v0.81.0
cloud.google.com/go/bigquery v1.16.0
cloud.google.com/go/storage v1.14.0
github.com/antlr/antlr4 v0.0.0-20210404160547-4dfacf63e228 // indirect
github.com/docker/cli v20.10.5+incompatible // indirect
github.com/docker/docker v20.10.5+incompatible // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2
github.com/google/cel-go v0.7.3
github.com/google/go-cmp v0.5.5
github.com/google/go-containerregistry v0.4.1
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/slack-go/slack v0.8.2
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 // indirect
golang.org/x/text v0.3.6 // indirect
google.golang.org/api v0.43.0
google.golang.org/genproto v0.0.0-20210825212027-de86158e7fda
google.golang.org/protobuf v1.27.1
cloud.google.com/go v0.110.0
cloud.google.com/go/bigquery v1.51.0
cloud.google.com/go/cloudbuild v1.9.0
cloud.google.com/go/compute v1.19.1 // indirect
cloud.google.com/go/iam v1.0.0 // indirect
cloud.google.com/go/secretmanager v1.10.0
cloud.google.com/go/storage v1.30.1
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1 // indirect
github.com/apache/thrift v0.18.1 // indirect
github.com/docker/cli v23.0.4+incompatible // indirect
github.com/docker/docker v23.0.4+incompatible // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/glog v1.1.1
github.com/golang/protobuf v1.5.3
github.com/google/cel-go v0.14.0
github.com/google/flatbuffers v23.3.3+incompatible // indirect
github.com/google/go-cmp v0.5.9
github.com/google/go-containerregistry v0.14.0
github.com/gorilla/websocket v1.5.0 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/slack-go/slack v0.12.2
github.com/stoewer/go-strcase v1.3.0 // indirect
golang.org/x/crypto v0.8.0 // indirect
golang.org/x/exp v0.0.0-20230420155640-133eef4313cb // indirect
golang.org/x/tools v0.8.0 // indirect
google.golang.org/api v0.119.0
google.golang.org/protobuf v1.30.0
gopkg.in/yaml.v2 v2.4.0
gotest.tools/v3 v3.0.3 // indirect
k8s.io/client-go v0.20.5
k8s.io/client-go v0.27.1
)
1,477 changes: 1,239 additions & 238 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion googlechat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
log "github.com/golang/glog"
chat "google.golang.org/api/chat/v1"

cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion googlechat/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
import (
"testing"

cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/google/go-cmp/cmp"
chat "google.golang.org/api/chat/v1"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
)

func TestWriteMessage(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion http/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"strings"
"text/template"

cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
log "github.com/golang/glog"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion lib/notifiers/jsonpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"sync"

cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"k8s.io/client-go/third_party/forked/golang/template"
"k8s.io/client-go/util/jsonpath"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/notifiers/jsonpath_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"testing"

cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/google/go-cmp/cmp"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
)

func TestNewResolver(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions lib/notifiers/notifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ import (
"strings"
"time"

cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
secretmanager "cloud.google.com/go/secretmanager/apiv1"
smpb "cloud.google.com/go/secretmanager/apiv1/secretmanagerpb"
"cloud.google.com/go/storage"
log "github.com/golang/glog"
"github.com/golang/protobuf/proto"
"github.com/google/cel-go/cel"
"github.com/google/cel-go/checker/decls"
smpb "google.golang.org/genproto/googleapis/cloud/secretmanager/v1"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
"google.golang.org/protobuf/encoding/protojson"
"gopkg.in/yaml.v2"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/notifiers/notifiers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ import (

"github.com/golang/protobuf/ptypes"

cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/golang/protobuf/proto"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/testing/protocmp"
"google.golang.org/protobuf/types/known/timestamppb"
Expand Down
52 changes: 28 additions & 24 deletions samples/logging-sample/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,54 @@
package main

import (
"context"
"fmt"
"context"
"fmt"

cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
log "github.com/golang/glog"
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
"github.com/golang/protobuf/proto"
cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
log "github.com/golang/glog"
"github.com/golang/protobuf/proto"
)

// [END cloudbuild_logging_sample_imports]

// [START cloudbuild_logging_sample_main_func]
func main() {
if err := notifiers.Main(new(logger)); err != nil {
log.Fatalf("fatal error: %v", err)
}
if err := notifiers.Main(new(logger)); err != nil {
log.Fatalf("fatal error: %v", err)
}
}

// [END cloudbuild_logging_sample_main_func]

// [START cloudbuild_logging_sample_struct]
type logger struct {
filter notifiers.EventFilter
filter notifiers.EventFilter
}

// [END cloudbuild_logging_sample_struct]

// [START cloudbuild_logging_sample_setup_notify]
func (h *logger) SetUp(_ context.Context, cfg *notifiers.Config, _ notifiers.SecretGetter, _ notifiers.BindingResolver) error {
prd, err := notifiers.MakeCELPredicate(cfg.Spec.Notification.Filter)
if err != nil {
return fmt.Errorf("failed to create CELPredicate: %w", err)
}
h.filter = prd
return nil
prd, err := notifiers.MakeCELPredicate(cfg.Spec.Notification.Filter)
if err != nil {
return fmt.Errorf("failed to create CELPredicate: %w", err)
}
h.filter = prd
return nil
}

func (h *logger) SendNotification(ctx context.Context, build *cbpb.Build) error {
// Include custom functionality here.
// This example logs the build.
if h.filter.Apply(ctx, build) {
log.V(1).Infof("printing build\n%s", proto.MarshalTextString(build))
} else {
log.V(1).Infof("build (%q, %q) did NOT match CEL filter", build.ProjectId, build.Id)
}
// Include custom functionality here.
// This example logs the build.
if h.filter.Apply(ctx, build) {
log.V(1).Infof("printing build\n%s", proto.MarshalTextString(build))
} else {
log.V(1).Infof("build (%q, %q) did NOT match CEL filter", build.ProjectId, build.Id)
}

return nil
return nil
}

// [END cloudbuild_logging_sample_setup_notify]
// [END cloudbuild_logging_sample_main]
2 changes: 1 addition & 1 deletion slack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"fmt"
"text/template"

cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
log "github.com/golang/glog"
"github.com/slack-go/slack"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion slack/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"testing"
"text/template"

cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
"github.com/google/go-cmp/cmp"
"github.com/slack-go/slack"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
)

func TestWriteMessage(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion smtp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"net/smtp"
"strings"

cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
log "github.com/golang/glog"
"github.com/golang/protobuf/proto"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion smtp/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"testing"
"text/template"

cbpb "cloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb"
"github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers"
"github.com/google/go-cmp/cmp"
cbpb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
"gopkg.in/yaml.v2"
)

Expand Down