feat: flag Ubuntu phased updates and leave them out of pending counts
Agent Release / build (push) Successful in 3m36s
Agent Release / msi (push) Successful in 2m30s

apt lists phased updates as upgradable, but an upgrade defers them until the
host is selected. A simulated upgrade names them; they are reported with the
phased flag (vantage-shared v0.6.0) and not counted in pending_after.
This commit is contained in:
2026-09-15 14:55:33 +00:00
parent b5b9775d2b
commit f552006318
8 changed files with 151 additions and 6 deletions
+2 -2
View File
@@ -120,12 +120,12 @@ func reportPendingUpdates(cfg *config.Config) int {
}
list := make([]pb.PackageUpdate, len(pkgs))
for i, p := range pkgs {
list[i] = pb.PackageUpdate{Name: p.Name, CurrentVersion: p.CurrentVersion, NewVersion: p.NewVersion}
list[i] = pb.PackageUpdate{Name: p.Name, CurrentVersion: p.CurrentVersion, NewVersion: p.NewVersion, Phased: p.Phased}
}
client, err := grpcclient.New(cfg.ServerURL, cfg.TLS)
if err != nil {
log.Printf("post-apply report dial: %v", err)
return len(pkgs)
return updates.CountInstallable(pkgs)
}
defer client.Close()
if err := client.ReportUpdates(cfg.ServerID, cfg.AgentToken, list); err != nil {