Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Implement the shipper gRPC server #76

Merged
merged 20 commits into from
Aug 9, 2022

Conversation

rdner
Copy link
Member

@rdner rdner commented Jul 13, 2022

All the endpoints are actually functioning now.

This PR has no validation for incoming events, this will be addressed in a follow up PR #79.

Related to #34

@rdner rdner self-assigned this Jul 13, 2022
@rdner rdner mentioned this pull request Jul 13, 2022
10 tasks
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 13, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-08-09T07:08:54.343+0000

  • Duration: 9 min 28 sec

Test stats 🧪

Test Results
Failed 0
Passed 28
Skipped 0
Total 28

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

All the endpoints are actually functioning now.
@rdner rdner force-pushed the grpc-server-implementation branch from cb65ee0 to 1638907 Compare July 13, 2022 12:51
server/server.go Outdated Show resolved Hide resolved
server/server.go Outdated Show resolved Hide resolved
server/server.go Outdated Show resolved Hide resolved
server/server.go Outdated Show resolved Hide resolved
server/server.go Outdated Show resolved Hide resolved
* Add server.Close to the signal processing
* Demote the queue full message to the debug level
* Add a channel closed channel for increased safety
server/server.go Show resolved Hide resolved
server/server.go Outdated Show resolved Hide resolved
server/server.go Outdated Show resolved Hide resolved
@rdner rdner marked this pull request as ready for review July 14, 2022 18:08
@rdner rdner requested a review from a team as a code owner July 14, 2022 18:08
@rdner rdner requested review from belimawr and removed request for a team July 14, 2022 18:08
Copy link
Contributor

@faec faec left a comment

Choose a reason for hiding this comment

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

Apologies that I'm suggesting some fairly drastic changes, but I think it would allow a much simpler implementation.

server/server.go Outdated Show resolved Hide resolved
server/config.go Outdated Show resolved Hide resolved
server/server.go Outdated Show resolved Hide resolved
@rdner rdner requested a review from faec July 19, 2022 12:04
server/notifications.go Outdated Show resolved Hide resolved
server/notifications.go Outdated Show resolved Hide resolved
server/notifications.go Outdated Show resolved Hide resolved
server/notifications.go Outdated Show resolved Hide resolved
server/server.go Outdated Show resolved Hide resolved
@rdner
Copy link
Member Author

rdner commented Jul 19, 2022

@faec @cmacknz I propose we work on the server implementation in iterations and take more reasonable approach: if something does not work or works slow – we investigate and adjust the implementation. This PR is not supposed to be a final frozen version of the server and I see a lot of nitpicking going on in the review that's blocking the very first implementation. I think switching to sync.Cond from channel subscription was a reasonable comment but I can't see why the rest of the comments would block us from merging this.

@faec
Copy link
Contributor

faec commented Jul 19, 2022

I can understand if you prefer another approach, but I don't think that removing several hundred lines of synchronization code is "nitpicking"... my point was rather that the first implementation should be smaller and simpler, since all the extra synchronization machinery isn't needed for any current use cases. I don't really think Craig's suggestions are nitpicking either, as some of the issues with the conditions and channels could let a single unresponsive client back up channels for the whole server...

@rdner
Copy link
Member Author

rdner commented Jul 19, 2022

@faec

I don't really think Craig's suggestions are nitpicking either, as some of the issues with the conditions and channels could let a single unresponsive client back up channels for the whole server...

That's exactly the reason why I addressed those concerns switching to sync.Cond, or you mean something else?

Okay, I understand your point and since it's a blocker from your perspective I'll address it once I'm back and then ask for another review. Just didn't want to block any related shipper work for almost 2 weeks.

server/config.go Outdated Show resolved Hide resolved
@cmacknz cmacknz requested a review from leehinman July 19, 2022 16:32
@cmacknz
Copy link
Member

cmacknz commented Jul 27, 2022

Decision made that PublishEvents should block: #84

This can be changed in a follow up PR if it is more convenient.

@rdner rdner requested a review from cmacknz August 8, 2022 15:53
@rdner
Copy link
Member Author

rdner commented Aug 8, 2022

@cmacknz @faec please have another look, everything should be addressed now.

Copy link
Member

@cmacknz cmacknz 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, left a few minor comments that I don't think are blocking.

Thanks for addressing all the feedback!

server/server.go Outdated Show resolved Hide resolved
server/server.go Show resolved Hide resolved
server/server.go Outdated Show resolved Hide resolved
Copy link
Contributor

@faec faec left a comment

Choose a reason for hiding this comment

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

One minor concern, otherwise looks good thanks!

* Return error when UUID does not match
* Send even 0 value for the persisted index
@rdner rdner requested review from cmacknz and faec August 9, 2022 07:28
@rdner rdner merged commit 230a013 into elastic:main Aug 9, 2022
@rdner rdner deleted the grpc-server-implementation branch August 9, 2022 07:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants