Log when managed OS upgrades are enabled - #276
Merged
Cheuk (cheukt) merged 1 commit intoJul 28, 2026
Merged
Conversation
There was no positive log signal that managed upgrade mode was active. The only evidence was an upgrade actually running, which never happens on a device whose maintenance window has been closed since boot, so those devices looked identical to ones with upgrades turned off. Log the mode and check interval once when the background upgrade loop starts, on both Linux and Windows. Also split the message logged when apt unattended-upgrades is disabled. That branch is shared by the "disable" and managed modes, so the old text was ambiguous about whether anything would still install updates. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Daniel Botros (danielbotros)
approved these changes
Jul 28, 2026
Evan Dorsky (EvanDorsky)
pushed a commit
to EvanDorsky/viam-agent
that referenced
this pull request
Aug 3, 2026
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
There is no positive log signal that managed OS upgrade mode is active.
The other nearby signal,
Disabled OS auto-upgrades., made this worse: that branch inEnforceUpgradesis shared bydisableand the two managed modes, so the message read as "upgrades are off" in exactly the case where the agent had taken over installing them.Changes
New
logManagedUpgradesStartedhelper inmanaged_upgrades_common.go, called fromstartManagedUpgradeson both Linux and Windows once the interval is clamped:It lives in the common file so the two platforms can't drift, and logs the clamped interval rather than the raw config value.
Testing
go build/go vetclean for linux, windows, and darwin;go test ./utils/passes. No behavior change beyond logging.🤖 Generated with Claude Code