This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user