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

test: Ensure agent client starts #5112

Merged
merged 1 commit into from Aug 31, 2023

Conversation

jesse-c
Copy link
Member

@jesse-c jesse-c commented Aug 30, 2023

What this PR does / why we need it:

I've also added some comments based on my understanding of the code. Along with this, I've added another assertion to the tests, and also made the code more readable.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

The readability changes are purely imho and I'm not beholden to them.

@jesse-c jesse-c self-assigned this Aug 30, 2023
@jesse-c jesse-c requested a review from agrski August 30, 2023 16:00
@@ -24,19 +24,19 @@ import (
"time"

"github.com/envoyproxy/go-control-plane/pkg/cache/v3"
serverv3 "github.com/envoyproxy/go-control-plane/pkg/server/v3"
envoyServerControlPlaneV3 "github.com/envoyproxy/go-control-plane/pkg/server/v3"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explanation: The numbering was confusing

}

err = as.StartGrpcServer(allowPlaintxt, agentPort, agentMtlsPort)
if err != nil {
log.Fatalf("Failed to start agent grpc server %s", err.Error())
log.WithError(err).Fatalf("Failed to start agent gRPC server")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explanation: Everywhere else used WithError

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explanation: A mix of spelling and grammatical improvements

@@ -677,8 +679,9 @@ func (c *Client) sendModelEventError(
event agent.ModelEventMessage_Event,
err error,
) {
c.logger.WithError(err).Errorf("Failed to load model, sending error to scheduler")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explanation: Extra verbose logging that was helpful to me when investigating an issue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explanation: This change, and the similar ones below, were reported by structcheck

I've also added some comments based on my understanding of the code.
@jesse-c jesse-c merged commit ff7ded7 into SeldonIO:v2 Aug 31, 2023
4 of 5 checks passed
@jesse-c jesse-c deleted the test-agent-client-comments branch August 31, 2023 13:14
adriangonz pushed a commit that referenced this pull request Sep 1, 2023
I've also added some comments based on my understanding of the code.
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

Successfully merging this pull request may close these issues.

None yet

2 participants