mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-02 01:51:59 +00:00
health: add warming-up warnable (#12553)
This commit is contained in:
@@ -41,11 +41,18 @@ func (w *Warnable) unhealthyState(ws *warningState) *UnhealthyState {
|
||||
text = w.Text(Args{})
|
||||
}
|
||||
|
||||
dependsOnWarnableCodes := make([]WarnableCode, len(w.DependsOn))
|
||||
dependsOnWarnableCodes := make([]WarnableCode, len(w.DependsOn), len(w.DependsOn)+1)
|
||||
for i, d := range w.DependsOn {
|
||||
dependsOnWarnableCodes[i] = d.Code
|
||||
}
|
||||
|
||||
if w != warmingUpWarnable {
|
||||
// Here we tell the frontend that all Warnables depend on warmingUpWarnable. GUIs will silence all warnings until all
|
||||
// their dependencies are healthy. This is a special case to prevent the GUI from showing a bunch of warnings when
|
||||
// the backend is still warming up.
|
||||
dependsOnWarnableCodes = append(dependsOnWarnableCodes, warmingUpWarnable.Code)
|
||||
}
|
||||
|
||||
return &UnhealthyState{
|
||||
WarnableCode: w.Code,
|
||||
Severity: w.Severity,
|
||||
|
||||
Reference in New Issue
Block a user