Skip to content

Conversation

@michaellee1019
Copy link
Member

@michaellee1019 michaellee1019 commented Nov 19, 2025

The reload commands had a bug where it directly references arg.PartID instead of partId variable. Earlier in the code path the partId variable is resolved from either --part-id or --cloud-config. Also added unit tests to ensure we don't break in the future.

Found a similar issue with restart. Its a bit more of a edge case because I doubt anyone will restart with --cloud-config (in this case you would just kill the viam-server you have running locally), but felt like the consistency is nice.

Testing

michaellee@ROBOT-MYHLX2FTJN control-groups % viam module reload --cloud-config ~/Downloads/viam-animatedartvs-main.json 
 …  Preparing for build...
 ✓     → Module is registered (0s)                                                                                                                                                                                          
 ✓     → Source code archive created (0s)                                                                                                                                                                                   
 ✓     → Source code uploaded (1s)                                                                                                                                                                                          
 ✓  Prepared for build (2s)
 …  Building...
 ✓     → Build started (ID: a6fea04d-69e2-445c-9612-6b1613a7d66d) (5s)                                                                                                                                                      
 ✓     → Spin up environment (30s)                                                                                                                                                                                          
 ✓     → Install dependencies (2s)                                                                                                                                                                                          
 ✓     → Build module (44s)                                                                                                                                                                                                 
 ✓     → Uploading artifacts (8s)                                                                                                                                                                                           
 ✓  Built (1m29s)
 …  Reloading to part...
 ✓     → Build artifact downloaded (3s)                                                                                                                                                                                     
 ✓     → Shell service already exists (0s)                                                                                                                                                                                  
 ✓     → Package uploaded (6s)                                                                                                                                                                                              
 ✓     → Module added to part (0s)                                                                                                                                                                                          
 ✓  Reloaded to part (9s)

michaellee@ROBOT-MYHLX2FTJN control-groups % viam module restart --cloud-config ~/Downloads/viam-animatedartvs-main.json 

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Nov 19, 2025
@michaellee1019 michaellee1019 changed the title RSDK-12450: Fix --cloud-config arg RSDK-12450: Fix --cloud-config arg in reload command Nov 19, 2025
@michaellee1019 michaellee1019 marked this pull request as ready for review November 19, 2025 22:58
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.

lgtm, thanks for catching/fixing!

@michaellee1019 michaellee1019 merged commit 6172273 into viamrobotics:main Nov 20, 2025
18 checks passed
@michaellee1019 michaellee1019 deleted the ml/fix-cloud-config-arg branch November 20, 2025 19:06
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