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

rcvOpampConnectionSettings doesn't report conn offer reject errors to Server #185

Open
srikanthccv opened this issue Jul 4, 2023 · 0 comments

Comments

@srikanthccv
Copy link
Member

The OnOpampConnectionSettings callback documents if the connection fails with the new setting, the offer will be rejected, and the error will be reported to Server.

// If OnOpampConnectionSettings returns nil and then the caller will
// attempt to reconnect to the OpAMP Server using the new settings.
// If the connection fails the settings will be rejected and an error will
// be reported to the Server. If the connection succeeds the new settings
// will be used by the client from that moment on.

This rcvOpampConnectionSettings doesn't appear to report the error to Server here

func (r *receivedProcessor) rcvOpampConnectionSettings(ctx context.Context, settings *protobufs.ConnectionSettingsOffers) {
if settings == nil || settings.Opamp == nil {
return
}
if r.hasCapability(protobufs.AgentCapabilities_AgentCapabilities_AcceptsOpAMPConnectionSettings) {
err := r.callbacks.OnOpampConnectionSettings(ctx, settings.Opamp)
if err == nil {
// TODO: verify connection using new settings.
r.callbacks.OnOpampConnectionSettingsAccepted(settings.Opamp)
}
} else {
r.logger.Debugf("Ignoring Opamp, agent does not have AcceptsOpAMPConnectionSettings capability")
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant