Skip to content

Conversation

@danielbotros
Copy link
Member

@danielbotros danielbotros commented Jan 20, 2026

Description

RSDK-12271 Check restart_allowed in agent on Windows

  • Removes runtime OS check for Windows that prevented checking restart_allowed of restart_status endpoint of viam-server

Testing

  • On a windows machine, ran Powershell as administrator
  • Cloned agent repo, pulled in branch
  • Built agent with go build -o viam-agent.exe ./cmd/viam-agent and created C:/etc/ directory with brand new machine's viam.json
  • Ran ./viam-agent.exe
  • In app, wrote this config to the machine (I observed the error log "maintenance_allowed key b is not a bool value" but this Slack message seems to suggest that anything that isn't explicitly "true" is interpreted as false, so I think this is fine for testing purposes)
{
  "agent": {
    "advanced_settings": {
      "viam_server_env": {}
    }
  },
  "maintenance": {
    "maintenance_allowed_key": "b",
    "sensor_name": "rdk:component:sensor/sensor1"
  },
  "components": [
    {
      "name": "sensor1",
      "api": "rdk:component:sensor",
      "model": "rdk:builtin:fake",
      "attributes": {}
    }
  ]
}
  • I then updated the viam_server_env setting with a random env var/value to trigger a restart, and I observed the log viam-server has NOT allowed a restart; will NOT restart suggesting agent on Windows is checking and respecting restart_allowed

I also tested that by undoinging these changes, restart_allowed was no longer respected and viam-server restarts anyway.

@danielbotros danielbotros changed the title Remove windows check [RSDK-12271] Check restart_allowed in agent on Windows Jan 27, 2026
@danielbotros danielbotros marked this pull request as ready for review January 27, 2026 21:56
@danielbotros danielbotros requested review from cheukt and jmatth January 27, 2026 21:56
@cheukt cheukt removed their request for review January 27, 2026 21:58
@cheukt
Copy link
Member

cheukt commented Jan 27, 2026

removing myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants