CLI should check if uploaded modules include meta.json

Description

Steps to reproduce :

  1. Create a module with a first_run script.

  2. Create a .tar.gz file containing the module’s executable and first_run script inside it. Make sure both files match what’s written in meta.json.

  3. Upload the module with the CLI.

  4. Add this module to your machine

 Expected behavior :

 The first_run script runs

Actual behavior :

You get this line in the logs:

2025-04-03T20:40:44.710Z INFO rdk.modmanager.first_run config/module.go:293 meta.json does not exist, skipping first run {"module":"might-not-matter"}

I think the thing to change is that the call to viam module upload should fail if the .tar.gz file does not contain meta.json. (or, use the meta.json from viam module update without needing a copy in your .tar.gz at all, which is how I assumed this all worked).

Workaround : ( if available)

Include your meta.json inside your .tar.gz file, I think? I’m trying this now…

Robot Logs : (see above)

Docs changes clarification

None

Activity

Show:

Details

Assignee

Team

NetCode

Priority

Reporter

PagerDuty

Created April 3, 2025 at 8:48 PM
Updated April 3, 2025 at 8:48 PM

Flag notifications