-
Notifications
You must be signed in to change notification settings - Fork 74
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
[APP-5420] Add ListMachineFragments request and response #525
[APP-5420] Add ListMachineFragments request and response #525
Conversation
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 request!
proto/viam/app/v1/app.proto
Outdated
@@ -774,6 +777,14 @@ message ListRobotsRequest { | |||
string location_id = 1; | |||
} | |||
|
|||
message GetTopLevelAndNestedFragmentsRequest { | |||
string part_id = 1; |
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.
Can we add a field to this request that allows the caller to specify additional fragment IDs? The user may have added more fragments locally but not yet saved, so the backend won't know about them yet, but it'd be great if the FE could stick to using a single endpoint to fetch all fragments relevant to the config
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.
ah yep - makes sense!
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 agree. I think instead of accepting both we only ask for a repeated string fragment_ids
Then we can pass both saved and unsaved fragmentIds in one. I think it results in less confusing API behavior to have some fragmentIDs internally looked up from the part and other ones passed in.
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.
Discussed in person, decided on:
string robot_id
- Allows the UI to the request all fragments in parallel with fetching the part configs, removing a request waterfallrepeated string fragment_ids
- Allows the UI to request additional fragments as the user adds them
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.
Agreed, I think to finalize this:
ListMachineFragmentsRequest {
// the machine_id used to filter fragments defined in a machine's parts. Also returns any fragments nested within the fragments defined in parts.
string machine_id = 1;
// additional fragment_ids to append to the response. useful when needing to view fragments that will be provisionally added to the machine alongside existing fragments.
repeated string additional_fragment_ids = 2;
}
message ListMachineFragmentsResponse{
repeated Fragment fragments = 1;
}
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.
thanks both!
* main: (22 commits) DATA-3094: Add CLI args to SubmitCustomTrainingJobRequest (#550) bump min golang version (#548) DATA-3054: Added UpdateBoundingBox (#547) RSDK-8595 update docs with new behavior (#546) APP-3604 build endpoints for external oauth and repos (#544) add last updated to fragment proto (#540) APP-5851: Add optional visibility field to `CreateFragmentRequest` (#543) APP-5314 - add dates and limit to GetRobotPartLogsRequest (#538) RSDK-7903 Add unhealthy state and error field (#539) RSDK-8381 add viam server version to API (#537) [APP-5417]: Undo APP-5417 (#536) [APP-5417]: Accommodate pagination for GetRobotPartHistory in api (#535) Data 2816/get training job logs (#534) DATA-2792 - Add URL to UpdateRegistryItemRequest, but make it optional (#532) RSDK-8228 Add config status to machine status API (#531) Add revision field to config (#530) [APP-5420] Add ListMachineFragments request and response (#525) [APP-5400]: Add GetFragmentHistory proto (#524) RSDK-7899 Add MachineStatus to RobotService (#527) RSDK-8083: add LogPatternConfig field to RobotConfig API (#526) ...
* main: (22 commits) DATA-3094: Add CLI args to SubmitCustomTrainingJobRequest (#550) bump min golang version (#548) DATA-3054: Added UpdateBoundingBox (#547) RSDK-8595 update docs with new behavior (#546) APP-3604 build endpoints for external oauth and repos (#544) add last updated to fragment proto (#540) APP-5851: Add optional visibility field to `CreateFragmentRequest` (#543) APP-5314 - add dates and limit to GetRobotPartLogsRequest (#538) RSDK-7903 Add unhealthy state and error field (#539) RSDK-8381 add viam server version to API (#537) [APP-5417]: Undo APP-5417 (#536) [APP-5417]: Accommodate pagination for GetRobotPartHistory in api (#535) Data 2816/get training job logs (#534) DATA-2792 - Add URL to UpdateRegistryItemRequest, but make it optional (#532) RSDK-8228 Add config status to machine status API (#531) Add revision field to config (#530) [APP-5420] Add ListMachineFragments request and response (#525) [APP-5400]: Add GetFragmentHistory proto (#524) RSDK-7899 Add MachineStatus to RobotService (#527) RSDK-8083: add LogPatternConfig field to RobotConfig API (#526) ...
https://viam.atlassian.net/browse/APP-5420
For reference in the tech spec, this is why we are adding this api