Skip to content

Conversation

@michaellee1019
Copy link
Member

I tested hot reloading on an old machine mistakenly that did not yet support the tilde file path. It was on v75. I spent a bit trying to find the exact version, which should be v73 but the fact that it didn't work on v75 concerns me. Taking Tenzing's advice and enforcing that v90 has to be installed, which is the version that hot reloading with cloud build was introduced.

Grant also brought to my attention that service config is being added to parts with the old "type" field instead of "api". I made code changes to detect the shell service in either state, and now start adding shell service with the "api" field.

Testing

michaellee@ROBOT-MYHLX2FTJN working-wheel % viam module reload --cloud-build --part-id e1555e66-fa60-4cf6-a697-a0297124cc00
Error: Viam-server version 0.88.0 is not supported for hot reloading, please update to at least 0.90.0

Service config as a result (after deleting):

  "services": [
    {
      "name": "shell",
      "api": "rdk:service:shell",
      "attributes": {}
    }
  ],

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Oct 3, 2025
@michaellee1019
Copy link
Member Author

ping @gmulz @stuqdog @abe-winter. LMK if you have any concerns with the changes around requiring a min version.

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.

generally lgtm though I want to make sure this doesn't make it impossible to do a reload on a dev CLI build.

@michaellee1019 michaellee1019 added static-build Build static binaries from PR safe to test This pull request is marked safe to test from a trusted zone static-ignore-tests Build static binaries from PR and ignore tests and removed safe to test This pull request is marked safe to test from a trusted zone static-build Build static binaries from PR labels Oct 8, 2025
@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 8, 2025
@michaellee1019 michaellee1019 requested a review from stuqdog October 8, 2025 21:15
Copy link
Member

@abe-winter abe-winter left a comment

Choose a reason for hiding this comment

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

this is a very cool ergonomics feature

)
if slices.ContainsFunc(services, func(service ResourceMap) bool { return service["type"] == "shell" }) {
if slices.ContainsFunc(services, func(service ResourceMap) bool {
return service["type"] == "shell" || service["api"] == "rdk:service:shell"
Copy link
Member

Choose a reason for hiding this comment

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

guessing this is not wrong but for my learning, why?

Copy link
Member Author

@michaellee1019 michaellee1019 Oct 8, 2025

Choose a reason for hiding this comment

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

Lots of historical change. The type field was before the RDK supported modules. It was how the config told the RDK what builtin to run. When modules were released, we started supporting the new api field with a triple. For a long time afterwards, fleet would still write "type" and would not write the triple into config for builtins, even though it was converted to api and a triple in the config retriever. We changed that in fleet in the past year so the config is more WYSIWYG and less confusing with docs and seeing logs from the RDK. So at this point, its an upgrade to make sure all things which write config to the part, do so in the new way consistently

@michaellee1019 michaellee1019 merged commit c237803 into viamrobotics:main Oct 14, 2025
24 checks passed
@michaellee1019 michaellee1019 deleted the ml/reload-server-version branch October 14, 2025 14:42
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 static-ignore-tests Build static binaries from PR and ignore tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants