Skip to content

Commit 871d201

Browse files
committed
bump grpc to 1.60.1, reconnect idle connections
Signed-off-by: Joe Lanford <[email protected]>
1 parent 6b6e3fb commit 871d201

File tree

151 files changed

+10605
-4434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+10605
-4434
lines changed

Diff for: go.mod

+7-9
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ require (
3636
github.com/spf13/pflag v1.0.5
3737
github.com/stretchr/testify v1.8.4
3838
golang.org/x/net v0.17.0
39-
golang.org/x/sync v0.3.0
39+
golang.org/x/sync v0.4.0
4040
golang.org/x/time v0.3.0
41-
google.golang.org/grpc v1.59.0
41+
google.golang.org/grpc v1.60.1
4242
gopkg.in/yaml.v2 v2.4.0
4343
helm.sh/helm/v3 v3.12.2
4444
k8s.io/api v0.27.7
@@ -57,8 +57,6 @@ require (
5757
sigs.k8s.io/kind v0.20.0
5858
)
5959

60-
replace google.golang.org/grpc => google.golang.org/grpc v1.40.0
61-
6260
require (
6361
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
6462
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
@@ -218,17 +216,17 @@ require (
218216
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect
219217
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
220218
golang.org/x/mod v0.12.0 // indirect
221-
golang.org/x/oauth2 v0.12.0 // indirect
219+
golang.org/x/oauth2 v0.13.0 // indirect
222220
golang.org/x/sys v0.14.0 // indirect
223221
golang.org/x/term v0.13.0 // indirect
224222
golang.org/x/text v0.13.0 // indirect
225223
golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect
226224
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
227225
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
228-
google.golang.org/appengine v1.6.7 // indirect
229-
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
230-
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
231-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
226+
google.golang.org/appengine v1.6.8 // indirect
227+
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect
228+
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect
229+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
232230
google.golang.org/protobuf v1.31.0 // indirect
233231
gopkg.in/inf.v0 v0.9.1 // indirect
234232
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect

Diff for: go.sum

+57-18
Large diffs are not rendered by default.

Diff for: pkg/controller/registry/grpc/source.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import (
99
"time"
1010

1111
"github.com/operator-framework/operator-registry/pkg/client"
12-
1312
"github.com/sirupsen/logrus"
1413
"golang.org/x/net/http/httpproxy"
1514
"golang.org/x/net/proxy"
1615
"google.golang.org/grpc"
1716
"google.golang.org/grpc/connectivity"
17+
"google.golang.org/grpc/credentials/insecure"
18+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1819

1920
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/registry"
20-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2121
)
2222

2323
type SourceMeta struct {
@@ -147,7 +147,7 @@ func getEnvAny(names ...string) string {
147147
}
148148

149149
func grpcConnection(address string) (*grpc.ClientConn, error) {
150-
dialOptions := []grpc.DialOption{grpc.WithInsecure()}
150+
dialOptions := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())}
151151
proxyURL, err := grpcProxyURL(address)
152152
if err != nil {
153153
return nil, err
@@ -228,6 +228,11 @@ func (s *SourceStore) watch(ctx context.Context, key registry.CatalogKey, source
228228
s.sources[key] = *src
229229
s.sourcesLock.Unlock()
230230

231+
// always try to reconnect if the connection goes idle
232+
if newState == connectivity.Idle {
233+
source.Conn.Connect()
234+
}
235+
231236
// notify subscriber
232237
s.notify <- SourceState{Key: key, State: newState}
233238
}

Diff for: pkg/package-server/client/fakes/fake_list_bundles_client.go

+25-25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)