Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSDK-9223 Conditionally restart viam-server based on restart_status #42

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

benjirewis
Copy link
Member

@benjirewis benjirewis commented Nov 15, 2024

RSDK-9223

Modifies Update to check the restart_status HTTP endpoint of the viam-server subsystem when an update is available. If that endpoint indicates that an external restart is allowed, immediately restart the viam-server instance for an update.

Tested locally with an old viam-server (no exposed restart_status endpoint) and a new viam-server version (exposed restart_status endpoint.) Restarts and logs happen as (I) expected.

Will leave in "Draft" until the associated rdk PR is merged.

cc @viamrobotics/netcode

Copy link
Member

@Otterverse Otterverse left a comment

Choose a reason for hiding this comment

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

Looks good to me for the most part. Couple small things, but the main one is checking the http response status instead of waiting for json decode to fail.

Copy link
Member

@Otterverse Otterverse left a comment

Choose a reason for hiding this comment

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

LGTM (as soon as RDK updates and you can remove the go replace, of course)

@benjirewis
Copy link
Member Author

rdk v0.51.0 should be released tomorrow; will update then.

@benjirewis benjirewis marked this pull request as ready for review November 19, 2024 18:11
@benjirewis benjirewis merged commit bac8d66 into viamrobotics:main Nov 19, 2024
1 check passed
@benjirewis benjirewis deleted the use-restart-status-endpoint branch November 19, 2024 18:19
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.

4 participants