Skip to content

[APP-18037] cli: succeed module reload when GetMachineStatus has no module status - #6638

Merged
Michael Lee (michaellee1019) merged 6 commits into
mainfrom
cursor/fix-reload-package-before-build-done
Oct 16, 2026
Merged

Michael Lee (michaellee1019) merged 6 commits into
mainfrom
cursor/fix-reload-package-before-build-done

Conversation

@michaellee1019

@michaellee1019 Michael Lee (michaellee1019) commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Newest CLI polls GetMachineStatus.modules after viam module reload and confirms that the module has restarted after the code is swapped. That field was added in viam-server 1.1.0.
  • On older machines (e.g. 0.130.0) the reload already applies, but the CLI waited 5 minutes and exited as a failure (config applied: true, module state: not found) because module status is not implemented.
  • As a workaround for now (can be removed after some time): If the config timestamp has moved and modules stays empty, treat the reload as complete after a short grace period (or immediately if GetMachineStatus is Unimplemented).

Test plan

  • viam module reload against a viam-server older than 1.1.0: wait should finish with a warning instead of a 5m timeout
  • viam module reload against current viam-server: still waits until the named module is ready/unhealthy

Made with Cursor

Module status landed in viam-server 1.1.0. Older machines still apply
the reload, but the CLI waited 5 minutes and reported a timeout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Oct 12, 2026
@michaellee1019 Michael Lee (michaellee1019) changed the title cli: succeed module reload when GetMachineStatus has no module status [APP-18037] cli: succeed module reload when GetMachineStatus has no module status Oct 12, 2026
1.0.x GetMachineStatus often leaves Config.LastUpdated stale, so the
empty-modules grace never started and the CLI hung for five minutes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 Oct 16, 2026
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
@michaellee1019
Michael Lee (michaellee1019) requested a review from a team as a code owner October 16, 2026 18:53
@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 Oct 16, 2026
…e status.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 Oct 16, 2026
Printing a warning while the progress spinner is active left a leftover
waiting line after the wait step completed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 Oct 16, 2026

@stuqdog Ethan (stuqdog) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm!

@michaellee1019

Copy link
Copy Markdown
Member Author

Thanks for the review! I just finished the latest round of manual testing:
Screenshot 2026-10-16 at 4 10 47 PM

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 Oct 16, 2026
@michaellee1019
Michael Lee (michaellee1019) merged commit 27fe9b8 into main Oct 16, 2026
22 checks passed
@michaellee1019
Michael Lee (michaellee1019) deleted the cursor/fix-reload-package-before-build-done branch October 16, 2026 20:30
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