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

ipn/ipnlocal: periodically run auto-updates when "offline" #12118

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

awly
Copy link
Contributor

@awly awly commented May 13, 2024

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

Comment on lines 1 to 6
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

package ipnlocal
Copy link
Member

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@noncombatant noncombatant left a 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.

Comment on lines 1 to 6
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

package ipnlocal
Copy link
Contributor

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.

ipn/ipnlocal/local.go Outdated Show resolved Hide resolved
@awly awly requested a review from bradfitz May 14, 2024 13:35
@awly awly force-pushed the awly/offline-auto-updates branch 5 times, most recently from a8548c8 to bae37ff Compare May 14, 2024 17:13
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>
@awly awly force-pushed the awly/offline-auto-updates branch from bae37ff to a41d01b Compare May 14, 2024 17:22
@awly awly requested a review from agottardo May 17, 2024 23:25
@awly
Copy link
Contributor Author

awly commented May 30, 2024

@bradfitz @agottardo PTAL

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.

None yet

4 participants