fix: roll back release sets atomically
CI / test (push) Failing after 29s

This commit is contained in:
m
2026-08-30 13:55:01 +03:00
parent d120cc0958
commit 78a39ec011
3 changed files with 20 additions and 1 deletions
+3
View File
@@ -210,6 +210,9 @@ func (l *Lifeboat) PromoteSet() bool {
l.Current.Set = &set
l.Current.LastKnownGood = true
l.CandidateReleaseSet = nil
// The promoted ReleaseSet is now the stable target. Leaving header-canary
// mode active would keep an obsolete candidate route in the public proxy.
l.TrafficMode = TrafficStable
return l.setSetUpstreams(&set, nil)
}
+3
View File
@@ -156,6 +156,9 @@ func TestReleaseSetPromotionRetainsPreviousStableForRollback(t *testing.T) {
if !l.RecordSet(observation) || !l.PromoteSet() {
t.Fatal("promotion failed")
}
if l.TrafficMode != supervisor.TrafficStable {
t.Fatalf("promoted ReleaseSet traffic=%s, want stable", l.TrafficMode)
}
if l.RollbackTargetReleaseSet == nil || l.RollbackTargetReleaseSet.Revision != "r1" {
t.Fatalf("rollback target=%+v", l.RollbackTargetReleaseSet)
}