Skip to content

Commit ee8db9d

Browse files
authored
bump opamp version (#2569)
1 parent 29bafee commit ee8db9d

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

cmd/operator-opamp-bridge/agent/agent.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,17 @@ func (agent *Agent) generateCollectorHealth(selectorLabels map[string]string, na
174174
}
175175

176176
// onConnect is called when an agent is successfully connected to a server.
177-
func (agent *Agent) onConnect() {
177+
func (agent *Agent) onConnect(ctx context.Context) {
178178
agent.logger.V(3).Info("Connected to the server.")
179179
}
180180

181181
// onConnectFailed is called when an agent was unable to connect to a server.
182-
func (agent *Agent) onConnectFailed(err error) {
182+
func (agent *Agent) onConnectFailed(ctx context.Context, err error) {
183183
agent.logger.Error(err, "failed to connect to the server")
184184
}
185185

186186
// onError is called when an agent receives an error response from the server.
187-
func (agent *Agent) onError(err *protobufs.ServerErrorResponse) {
187+
func (agent *Agent) onError(ctx context.Context, err *protobufs.ServerErrorResponse) {
188188
agent.logger.Error(fmt.Errorf(err.GetErrorMessage()), "server returned an error response")
189189
}
190190

cmd/operator-opamp-bridge/agent/agent_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ type mockOpampClient struct {
121121
settings types.StartSettings
122122
}
123123

124+
func (m *mockOpampClient) RequestConnectionSettings(request *protobufs.ConnectionSettingsRequest) error {
125+
return nil
126+
}
127+
124128
func (m *mockOpampClient) Start(_ context.Context, settings types.StartSettings) error {
125129
m.settings = settings
126130
return nil

cmd/operator-opamp-bridge/logger/logger.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package logger
1616

1717
import (
18+
"context"
1819
"fmt"
1920

2021
"github.com/go-logr/logr"
@@ -31,10 +32,10 @@ func NewLogger(logger logr.Logger) *Logger {
3132
return &Logger{Logger: logger}
3233
}
3334

34-
func (l *Logger) Debugf(format string, v ...interface{}) {
35+
func (l *Logger) Debugf(ctx context.Context, format string, v ...interface{}) {
3536
l.Logger.V(4).Info(fmt.Sprintf(format, v...))
3637
}
3738

38-
func (l *Logger) Errorf(format string, v ...interface{}) {
39+
func (l *Logger) Errorf(ctx context.Context, format string, v ...interface{}) {
3940
l.Logger.V(0).Error(nil, fmt.Sprintf(format, v...))
4041
}

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require (
1717
github.com/mitchellh/mapstructure v1.5.0
1818
github.com/oklog/run v1.1.0
1919
github.com/oklog/ulid/v2 v2.1.0
20-
github.com/open-telemetry/opamp-go v0.10.0
20+
github.com/open-telemetry/opamp-go v0.12.0
2121
github.com/openshift/api v0.0.0-20240124164020-e2ce40831f2e
2222
github.com/operator-framework/operator-lib v0.12.0
2323
github.com/prometheus-operator/prometheus-operator v0.71.0
@@ -123,7 +123,7 @@ require (
123123
github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect
124124
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
125125
github.com/gophercloud/gophercloud v1.7.0 // indirect
126-
github.com/gorilla/websocket v1.5.0 // indirect
126+
github.com/gorilla/websocket v1.5.1 // indirect
127127
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect
128128
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
129129
github.com/hashicorp/consul/api v1.25.1 // indirect

go.sum

+4
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ github.com/gophercloud/gophercloud v1.7.0 h1:fyJGKh0LBvIZKLvBWvQdIgkaV5yTM3Jh9EY
335335
github.com/gophercloud/gophercloud v1.7.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM=
336336
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
337337
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
338+
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
339+
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
338340
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww=
339341
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A=
340342
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
@@ -516,6 +518,8 @@ github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
516518
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
517519
github.com/open-telemetry/opamp-go v0.10.0 h1:3PdhoKcKY1lPrfdXnsxeLlXluE+Xe1Uc/CpJ4I8uUJ0=
518520
github.com/open-telemetry/opamp-go v0.10.0/go.mod h1:Pfmm5EdWqZCG0dZAJjAinlra3yEpqK5StCblxpbEp6Q=
521+
github.com/open-telemetry/opamp-go v0.12.0 h1:N97R8BY5FfaB9SzG5pURrOfXQk7MT9a4RD8oERlii5o=
522+
github.com/open-telemetry/opamp-go v0.12.0/go.mod h1:bk3WZ4RjbVdzsHT3gaPZscUdGvoz9Bi2+AvG8/5X824=
519523
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
520524
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
521525
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=

0 commit comments

Comments
 (0)