-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add transport implementation for agent #734
Conversation
1e575b5
to
77e83f2
Compare
77e83f2
to
0121413
Compare
Codecov Report
@@ Coverage Diff @@
## main #734 +/- ##
==========================================
- Coverage 56.31% 51.90% -4.41%
==========================================
Files 28 32 +4
Lines 1243 1441 +198
==========================================
+ Hits 700 748 +48
- Misses 511 650 +139
- Partials 32 43 +11
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
4e40e68
to
fb1d172
Compare
service WorkflowService { | ||
// Stream creates a stream that will receive workflows intended for the agent identified | ||
// by the StreamWorkflowsRequest.agent_id. | ||
rpc StreamWorkflows(StreamWorkflowsRequest) returns (stream StreamWorkflowsResponse) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought this was interesting. Its from the Buf website. https://buf.build/docs/best-practices/style-guide#recommendations
"While controversial, our recommendation is to avoid streaming RPCs. While they certainly have specific use cases that make them extremely valuable, on the whole they generally cause a lot of problems, push RPC framework logic up the stack, and usually prevent developing more reliable architectures."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, would you me open to a name change here? maybe StreamWorkflows
-> GetWorkflows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought this was interesting. Its from the Buf website. buf.build/docs/best-practices/style-guide#recommendations
I'm familiar with this but chose to ignore it because the alternatives I thought about have tradeoffs I wanted to avoid right now. The options I came up with include: (1) polling from the agent to the server for workflows; (2) launching a server in the agent and have the tink-server (now a confusing name) issue unary calls to run workflows.
I wasn't fond of polling even with HTTP2s sticky connections and I wanted to, initially at least, avoid the complexity of launching a server and dealing with the agent going offline etc.
I very open to adopting a different approach and welcome more ideas. Long term I'm interested in migrating to the agent containing a server even though its more complex.
Also, would you me open to a name change here? maybe StreamWorkflows -> GetWorkflows
Yes, no problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one loosely held suggestion for a name change. other than that all good. Thanks for all the work on this!
Signed-off-by: Chris Doherty <chris.doherty4@gmail.com>
fb1d172
to
d857726
Compare
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 9a45f7b |
Builds on #730.
The new agent requires a transport to retrieve workflows. The initial transport to be implemented is gRPC as its worked well for the tink-worker (the agents predecessor).
The transport is responsible for connecting to the Tink Server, identifying the node by submitting the nodes unique identifier and subsequently passing along workflows. Unlike the Tink Worker implementation, this transport provides a mechanism for publishing workflow events. The events are what provides insight into the progression of the workflow and are ultimately used by the Tink Server to update the workflow object in Kubernetes.