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

[APP-5420] Add ListMachineFragments request and response #525

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

piokasar
Copy link
Contributor

@piokasar piokasar commented Jul 3, 2024

https://viam.atlassian.net/browse/APP-5420

For reference in the tech spec, this is why we are adding this api

@github-actions github-actions bot added the safe to test committer is a member of this org label Jul 3, 2024
@piokasar piokasar requested review from mcous and michaellee1019 and removed request for mcous July 3, 2024 14:25
Copy link
Member

@mcous mcous left a comment

Choose a reason for hiding this comment

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

One request!

@@ -774,6 +777,14 @@ message ListRobotsRequest {
string location_id = 1;
}

message GetTopLevelAndNestedFragmentsRequest {
string part_id = 1;
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yep - makes sense!

Copy link
Member

@michaellee1019 michaellee1019 Jul 11, 2024

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.

Copy link
Member

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 waterfall
  • repeated string fragment_ids - Allows the UI to request additional fragments as the user adds them

Copy link
Member

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;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks both!

@piokasar piokasar added the ready-for-protos add this when you want protos to compile on every commit label Jul 15, 2024
@piokasar piokasar removed the ready-for-protos add this when you want protos to compile on every commit label Jul 15, 2024
@piokasar piokasar changed the title [APP-5420] Add GetTopLevelAndNestedRobotPartFragments request and response [APP-5420] Add ListMachineFragments request and response Jul 15, 2024
@piokasar piokasar merged commit c1e93f0 into main Jul 15, 2024
3 checks passed
maxhorowitz added a commit that referenced this pull request Sep 16, 2024
* 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)
  ...
maxhorowitz added a commit that referenced this pull request Sep 16, 2024
* 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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protos-compiled safe to test committer is a member of this org
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants