Updates tailscale/tailscale#4136
High severity health warning = a system notification will appear, which can be quite disruptive to the user and cause unnecessary concern in the event of a temporary network issue.
Per design decision (@sonovawolf), the severity of all warnings but "network is down" should be tuned down to medium/low. ImpactsConnectivity should be set, to change the icon to an exclamation mark in some cases, but without a notification bubble.
I also tweaked the messaging for update-available, to reflect how each platform gets updates in different ways.
Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
@ -18,7 +21,11 @@ var updateAvailableWarnable = Register(&Warnable{
Title:"Update available",
Severity:SeverityLow,
Text:func(argsArgs)string{
returnfmt.Sprintf("An update from version %s to %s is available. Run `tailscale update` or `tailscale set --auto-update` to update.",args[ArgCurrentVersion],args[ArgAvailableVersion])
returnfmt.Sprintf("An update from version %s to %s is available.",args[ArgCurrentVersion],args[ArgAvailableVersion])
}else{
returnfmt.Sprintf("An update from version %s to %s is available. Run `tailscale update` or `tailscale set --auto-update` to update now.",args[ArgCurrentVersion],args[ArgAvailableVersion])
}
},
})
@ -26,9 +33,13 @@ var updateAvailableWarnable = Register(&Warnable{
returnfmt.Sprintf("An urgent security update from version %s to %s is available. Run `tailscale update` or `tailscale set --auto-update` to update now.",args[ArgCurrentVersion],args[ArgAvailableVersion])
returnfmt.Sprintf("A security update from version %s to %s is available.",args[ArgCurrentVersion],args[ArgAvailableVersion])
}else{
returnfmt.Sprintf("A security update from version %s to %s is available. Run `tailscale update` or `tailscale set --auto-update` to update now.",args[ArgCurrentVersion],args[ArgAvailableVersion])
}
},
})
@ -38,15 +49,15 @@ var unstableWarnable = Register(&Warnable{
Code:"is-using-unstable-version",
Title:"Using an unstable version",
Severity:SeverityLow,
Text:StaticMessage("This is an unstable version of Tailscale meant for testing and development purposes: please report any bugs to Tailscale."),
Text:StaticMessage("This is an unstable version of Tailscale meant for testing and development purposes. Please report any issues to Tailscale."),
})
// NetworkStatusWarnable is a Warnable that warns the user that the network is down.
varNetworkStatusWarnable=Register(&Warnable{
Code:"network-status",
Title:"Network down",
Severity:SeverityHigh,
Text:StaticMessage("Tailscale cannot connect because the network is down. (No network interface is up.)"),
Severity:SeverityMedium,
Text:StaticMessage("Tailscale cannot connect because the network is down. Check your Internet connection."),
ImpactsConnectivity:true,
})
@ -94,18 +105,19 @@ var notInMapPollWarnable = Register(&Warnable{
// noDERPHomeWarnable is a Warnable that warns the user that Tailscale doesn't have a home DERP.
varnoDERPHomeWarnable=Register(&Warnable{
Code:"no-derp-home",
Title:"No home relay server",
Severity:SeverityHigh,
DependsOn:[]*Warnable{NetworkStatusWarnable},
Text:StaticMessage("Tailscale could not connect to any relay server. Check your Internet connection."),
Code:"no-derp-home",
Title:"No home relay server",
Severity:SeverityMedium,
DependsOn:[]*Warnable{NetworkStatusWarnable},
Text:StaticMessage("Tailscale could not connect to any relay server. Check your Internet connection."),
ImpactsConnectivity:true,
})
// noDERPConnectionWarnable is a Warnable that warns the user that Tailscale couldn't connect to a specific DERP server.
varnoDERPConnectionWarnable=Register(&Warnable{
Code:"no-derp-connection",
Title:"Relay server unavailable",
Severity:SeverityHigh,
Severity:SeverityMedium,
DependsOn:[]*Warnable{NetworkStatusWarnable},
Text:func(argsArgs)string{
ifn:=args[ArgDERPRegionName];n!=""{
@ -114,6 +126,7 @@ var noDERPConnectionWarnable = Register(&Warnable{
returnfmt.Sprintf("Tailscale could not connect to the relay server with ID '%s'. Your Internet connection might be down, or the server might be temporarily unavailable.",args[ArgDERPRegionID])
}
},
ImpactsConnectivity:true,
})
// derpTimeoutWarnable is a Warnable that warns the user that Tailscale hasn't heard from the home DERP region for a while.
@ -135,7 +148,7 @@ var derpTimeoutWarnable = Register(&Warnable{
varderpRegionErrorWarnable=Register(&Warnable{
Code:"derp-region-error",
Title:"Relay server error",
Severity:SeverityMedium,
Severity:SeverityLow,
DependsOn:[]*Warnable{NetworkStatusWarnable},
Text:func(argsArgs)string{
returnfmt.Sprintf("The relay server #%v is reporting an issue: %v",args[ArgDERPRegionID],args[ArgError])
@ -146,7 +159,7 @@ var derpRegionErrorWarnable = Register(&Warnable{
varnoUDP4BindWarnable=Register(&Warnable{
Code:"no-udp4-bind",
Title:"Incoming connections may fail",
Severity:SeverityHigh,
Severity:SeverityMedium,
DependsOn:[]*Warnable{NetworkStatusWarnable},
Text:StaticMessage("Tailscale couldn't listen for incoming UDP connections."),