Skip to content

Conversation

allisonschiang
Copy link
Contributor

If the error in mod.client.RemoveResource() is a ErrNotConnected (which is returned by invoke() in conn.go), it means that the modules are disconnected. These changes will ignore that error, which makes sense because if the module is disconnected from restarting/failing, the resources are already removed and it hasn't failed. This function calls the mod.client.RemoveResource() defined in the viam.api repo

Test results
TestCrashedModelReregisteredAfterRecovery with addition of t.FailNow():

JobManager is shutting down.
    /Users/allison.chiang/Documents/Code/rdk/robot/impl/utils.go:42: Expected: nil
        Actual:   'error removing modular resource for closure: not connected, resource_name: rdk:component:generic/h'

after these changes

    /Users/allison.chiang/Documents/Code/rdk/robot/impl/jobmanager.go:110: 2025-10-06T17:40:45.611-0400       INFO    TestCrashedModuleModelReregisteredAfterRecovery.job_manager   jobmanager/jobmanager.go:110    JobManager is shutting down.
--- FAIL: TestCrashedModuleModelReregisteredAfterRecovery (3.32s)

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Oct 6, 2025
@allisonschiang allisonschiang requested a review from jmatth October 7, 2025 13:57
@allisonschiang allisonschiang merged commit e9e347e into viamrobotics:main Oct 16, 2025
18 checks passed
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