-
Notifications
You must be signed in to change notification settings - Fork 13
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
added instancesdk.Get() feature and its gRPC API #1075
Conversation
c7e4ec5
to
eb97c3c
Compare
package api; | ||
|
||
service Instance { | ||
rpc Get (GetInstanceRequest) returns (GetInstanceResponse) {} |
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.
rpc Get (GetInstanceRequest) returns (GetInstanceResponse) {} | |
rpc Get (GetInstanceRequest) returns (definition.Instance) {} |
I really recommend to directly returning the Instance definition. That's the directly on the new API. Simpler is better.
Check:
engine/protobuf/api/execution.proto
Lines 9 to 15 in acc3e08
service Execution { | |
// Get returns a single Execution specified in a request. | |
rpc Get(GetExecutionRequest) returns (definition.Execution) {} | |
// Stream returns a stream of executions that satisfy criteria | |
// specified in a request. | |
rpc Stream(StreamExecutionRequest) returns (stream definition.Execution) {} |
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, CreateInstanceResponse
should be replaced also by the instance proto definition:
engine/protobuf/api/instance.proto
Lines 15 to 18 in acc3e08
message CreateInstanceResponse { | |
string hash = 1; // Service's instance hash. | |
string serviceHash = 2; // Service's bare hash. | |
} |
monday task: https://mesg.monday.com/boards/231078139/pulses/231079102/posts/361694557
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.
I really recommend to directly returning the Instance definition. That's the directly on the new API. Simpler is better.
Check:
engine/protobuf/api/execution.proto
Lines 9 to 15 in acc3e08
service Execution { // Get returns a single Execution specified in a request. rpc Get(GetExecutionRequest) returns (definition.Execution) {} // Stream returns a stream of executions that satisfy criteria // specified in a request. rpc Stream(StreamExecutionRequest) returns (stream definition.Execution) {}
I don't agree with this one as discussed before but I can commit the changes as you like, if you prefer that way.
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.
Let's reach consensus on the forum: https://forum.mesg.com/t/standardisation-of-the-grpc-apis/320
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,
CreateInstanceResponse
should be replaced also by the instance proto definition:
engine/protobuf/api/instance.proto
Lines 15 to 18 in acc3e08
message CreateInstanceResponse { string hash = 1; // Service's instance hash. string serviceHash = 2; // Service's bare hash. } monday task: https://mesg.monday.com/boards/231078139/pulses/231079102/posts/361694557
done
depends on #1074