-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ipn/ipnlocal: periodically run auto-updates when "offline" #12118
base: main
Are you sure you want to change the base?
Conversation
ipn/ipnlocal/autoupdate.go
Outdated
// Copyright (c) Tailscale Inc & AUTHORS | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
package ipnlocal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need all this code on, say, iOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also skip it on App Store macOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split the file with build constraints.
Note that these auto-updates won't start on nodes that don't set AutoUpdate.Apply
in prefs, which can only be set on platforms that support auto-updates (so, not iOS/Android/non-standalone macOS/etc). So this is mostly about excluding additional compiled code in the final binary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also skip it on macsys. Sparkle already does its own automatic updates thing in the background regardless of whether the network extension is running. Admins can set up their own update check interval via MDM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excluded darwin
from the build constraints.
I just realized we don't implement auto-updates even for standalone macOS installs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with platform exemptions.
ipn/ipnlocal/autoupdate.go
Outdated
// Copyright (c) Tailscale Inc & AUTHORS | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
package ipnlocal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also skip it on App Store macOS.
a8548c8
to
bae37ff
Compare
When the client is disconnected from control for any reason (typically just turned off), we should still attempt to update if auto-updates are enabled. This may help users who turn tailscale on infrequently for accessing resources. RELNOTE: Apply auto-updates even if the node is down or disconnected from the coordination server. Updates #12117 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
bae37ff
to
a41d01b
Compare
@bradfitz @agottardo PTAL |
When the client is disconnected from control for any reason (typically just turned off), we should still attempt to update if auto-updates are enabled. This may help users who turn tailscale on infrequently for accessing resources.
Updates #12117