Skip to content

App 16855: Wire in UploadDataFromPath through RobotService#6102

Open
angelapredolac wants to merge 6 commits into
mainfrom
APP-16855
Open

App 16855: Wire in UploadDataFromPath through RobotService#6102
angelapredolac wants to merge 6 commits into
mainfrom
APP-16855

Conversation

@angelapredolac

Copy link
Copy Markdown
Member

Jira Ticket: Wire in UploadDataFromPath through RobotService

Summary
This wires the new UploadDataFromPath API through the RobotService (client, server, and robot interface) as a stub. The endpoint accepts a file or directory path plus optional upload metadata, routes the request from the robot to its configured data manager service, and returns aggregate upload results. The actual on-device upload logic lives in the data manager and is intentionally left for the follow-up ticket; this PR establishes the full request/response plumbing so that ticket only needs to implement the builtin's UploadDataFromPath method.
This is part of the on-robot data manager upload API (APP-15562). It depends on the api proto PR (#5917) and currently pins go.viam.com/api to that branch's commit; the final version bump to a released tag will happen once the api PR merges.

Changes

  • Added UploadDataFromPath to the robot.LocalRobot interface (robot/robot.go).
  • Implemented it on localRobot (robot/impl/local_robot.go): looks up the configured data manager via datamanager.NamesFromRobot / FromProvider, type-asserts it to a private dataFromPathUploader interface, and delegates. Returns a clear error when no data manager is configured, or when the data manager doesn't yet support the method (the stub state — the type assertion fails until the implementation ticket lands).
  • Added the gRPC server handler (robot/server/server.go) mapping request → robot → response.
  • Added the RobotClient.UploadDataFromPath Go SDK method (robot/client/client.go).
  • Updated the inject.Robot test mock with a UploadDataFromPathFunc field and delegating method (testutils/inject/robot.go) so it satisfies the updated interface.
  • Bumped go.viam.com/api to the proto branch (pseudo-version) so the new generated symbols resolve.

Testing
Unit Testing:

  • Server (robot/server/server_test.go): asserts the handler reads path/upload_metadata off the request, maps all five response fields back, and surfaces errors to the caller.
  • Client (robot/client/client_test.go): full client↔server gRPC round trip, asserting request fields cross the wire and the response unpacks correctly.
  • Local robot (robot/impl/local_robot_test.go): covers the "no data manager configured" guard and the "data manager does not support upload" stub path.

Manual Testing: N/A (no real upload behavior yet).

Notes

  • This is the wiring layer only; no upload logic. The follow-up PR adds the builtin data manager's UploadDataFromPath implementation and is stacked on this branch.
  • go.mod currently references the api proto branch. Before this merges: api PR merges → tag → go get go.viam.com/api@ → drop to released version.

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jun 10, 2026
Comment thread robot/client/client.go Outdated
Comment thread robot/client/client.go Outdated
Comment thread robot/impl/local_robot.go Outdated
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jun 12, 2026
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jun 12, 2026
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test This pull request is marked safe to test from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants