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

Log network activity in rVASP #145

Merged
merged 6 commits into from
Sep 1, 2023
Merged

Log network activity in rVASP #145

merged 6 commits into from
Sep 1, 2023

Conversation

pdamodaran
Copy link
Collaborator

This PR resolves SC-20306 that asked to log network activity in rVASP. This includes calls to Search, Lookup, and KeyExchanage. This is currently pulling from the main branch of the directory repo.

@pdamodaran pdamodaran requested a review from pdeziel August 25, 2023 22:35
@pdamodaran
Copy link
Collaborator Author

looks like the tests are failing - I will need to look into these.

Copy link
Collaborator

@pdeziel pdeziel left a comment

Choose a reason for hiding this comment

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

Glad you were able to import the package, I had a comment about one more thing we need to add to ensure that the activity handler starts up.

go.mod Outdated Show resolved Hide resolved
@@ -40,6 +41,8 @@ func (s *Server) fetchSigningKey(peer *peers.Peer) (key *rsa.PublicKey, err erro
}

if peer.SigningKey() == nil {
// send key exchange activity to network activity handler
activity.KeyExchange().Add()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! We will also need to add a call to activity.Start() when we're starting the rVASP server, (in New() of rvasp.go).

Copy link
Collaborator

@pdeziel pdeziel left a comment

Choose a reason for hiding this comment

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

Looks good, I had one small thing we should address but then we can merge this in.

@@ -88,6 +89,7 @@ func New(conf *config.Config) (s *Server, err error) {
s.peers.Connect(grpc.WithTransportCredentials(insecure.NewCredentials()))
}
s.updates = NewUpdateManager()
activity.Start(conf.Activity)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't this return an error? If so, it should be handled like the other service errors here so that we're not confused if there's bad configuration and it doesn't start.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point - I have made the change

@pdamodaran pdamodaran merged commit ca8c5d8 into main Sep 1, 2023
@pdamodaran pdamodaran deleted the sc-20306 branch September 1, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants