fix: address review findings for self-update (#15)

This commit is contained in:
2026-10-13 12:06:49 +02:00
parent fe4aca2883
commit aec21d23d9
25 changed files with 365 additions and 126 deletions
-15
View File
@@ -31,21 +31,6 @@ const MinPinnedRefVersion = 3
// update in a helper container nor resume it after restarting.
const MinSelfUpdateVersion = 4
// SelfUpdateLabelPrefix starts the names of the labels on the helper
// container that finishes an agent's self-update. The new agent finds the
// helper by them, and the inventory skips containers that carry them.
const SelfUpdateLabelPrefix = "se.shcizo.package-updater.self-update."
// Labels on a self-update helper container.
const (
LabelSelfUpdateJob = SelfUpdateLabelPrefix + "job"
LabelSelfUpdateRef = SelfUpdateLabelPrefix + "ref"
LabelSelfUpdateStarted = SelfUpdateLabelPrefix + "started"
LabelSelfUpdateProject = SelfUpdateLabelPrefix + "project"
LabelSelfUpdateService = SelfUpdateLabelPrefix + "service"
LabelSelfUpdateOutput = SelfUpdateLabelPrefix + "output"
)
// MaxJobOutput caps the job output an agent keeps and the master stores, in
// bytes. Only the tail is kept. With JSON escaping (worst case 6 bytes per
// byte) a JobResult carrying this much output still fits the 1 MiB read limit.