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

RSDK-6740 local tarball support #34

Merged
merged 7 commits into from
Jun 3, 2024
Merged

RSDK-6740 local tarball support #34

merged 7 commits into from
Jun 3, 2024

Conversation

abe-winter
Copy link
Member

@abe-winter abe-winter commented May 30, 2024

What changed

  • remove the 'droid module hack' logic for mod.sh, where it copies around module.jar in local development mode
  • the pushModuleAdb gradle task now builds a tarball and adb pushes it to /sdcard/Download/project-dir-name
  • drop a partial meta.json next to the tarball. this is a local tarball quirk that is likely to change once the remote reloading feature lands

Why

The droid module hack did not survive the merge of the droid-apk mega-branch. (Local tarballs are the new, more general, droid module hack). This change is necessary to support local development of android modules with upstream RDK.

Logs

This is with RDK 0.1.0-240530-b2716c1-f16396e.

Things we care about are:

  1. it installed the local package (i.e. unpacked a tarball)
  2. the destination folder doesn't have a version (because it's local)
  3. registered an API + started successfully

5/30/2024, 6:55:29 PM info robot_server impl/local_robot.go:1228 Robot (re)configured
5/30/2024, 6:55:29 PM info robot_server.modmanager modmanager/manager.go:254 Modules successfully added modules [local-tar-droid]
5/30/2024, 6:55:29 PM info robot_server.modmanager modmanager/manager.go:342 Module successfully added module local-tar-droid
5/30/2024, 6:55:29 PM info robot_server.modmanager modmanager/manager.go:1147 Registering component API and model from module module local-tar-droidAPI rdk:component:genericmodel viam:generic:mygeneric
5/30/2024, 6:55:28 PM warn robot_server.modmanager utils/ticker.go:22 Waiting for module to complete startup and registration module local-tar-droid
5/30/2024, 6:55:28 PM warn robot_server.modmanager modmanager/manager.go:1021 Unable to create PeerConnection with module. Ignoring. err unexpected end of JSON input
5/30/2024, 6:55:27 PM info robot_server.modmanager modmanager/manager.go:991 Waiting for module to respond to ready request module local-tar-droid
5/30/2024, 6:55:26 PM info robot_server.modmanager modmanager/manager.go:1091 Starting up module module local-tar-droid
5/30/2024, 6:55:26 PM warn robot_server.modmanager modmanager/manager.go:1059 VIAM_MODULE_ROOT was not passed to module. Defaulting to module's working directory module local-tar-droiddir /data/user/0/com.viam.rdk.fgservice/cache/.viam/packages-local/data/module/synthetic-local-tar-droid-
5/30/2024, 6:55:26 PM info robot_server.modmanager modmanager/manager.go:318 Creating data directory "/data/user/0/com.viam.rdk.fgservice/cache/.viam/module-data/82ab5e48-2419-4097-bcda-b68aa58ee19e/local-tar-droid" for module "local-tar-droid"
5/30/2024, 6:55:26 PM info robot_server.modmanager modmanager/manager.go:237 Now adding module module local-tar-droid
5/30/2024, 6:55:26 PM info robot_server impl/local_robot.go:1183 (Re)configuring robot
5/30/2024, 6:55:26 PM info robot_server packages/local_package_manager.go:173 Local package sync complete after 1.730958454s
5/30/2024, 6:55:24 PM info robot_server packages/local_package_manager.go:142 Local package changes have been detected, starting sync

@abe-winter abe-winter requested a review from a team as a code owner May 30, 2024 23:12
@abe-winter abe-winter requested review from njooma and stuqdog May 30, 2024 23:12
Copy link
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

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

Looks cleaner, but this is all still a hack to me lol

Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

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

Don't fully understand it but it seems to work and that's good enough for me!

@abe-winter abe-winter merged commit fcd3fa4 into main Jun 3, 2024
3 checks passed
@abe-winter abe-winter deleted the local-tarballs branch June 3, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants