diff --git a/pkg/app/piped/executor/ecs/ecs.go b/pkg/app/piped/executor/ecs/ecs.go index 32ceb08055..60d9734752 100644 --- a/pkg/app/piped/executor/ecs/ecs.go +++ b/pkg/app/piped/executor/ecs/ecs.go @@ -448,7 +448,7 @@ func routing(ctx context.Context, in *executor.Input, platformProviderName strin currListenerRuleArns, err := client.GetListenerRuleArns(ctx, currListenerArns) if err != nil { - in.LogPersister.Errorf("Failed to get current active listeners: %v", err) + in.LogPersister.Errorf("Failed to get current active listener rule: %v", err) return false } diff --git a/pkg/app/piped/executor/ecs/rollback.go b/pkg/app/piped/executor/ecs/rollback.go index 87c76306ff..7a28211e12 100644 --- a/pkg/app/piped/executor/ecs/rollback.go +++ b/pkg/app/piped/executor/ecs/rollback.go @@ -158,8 +158,14 @@ func rollback(ctx context.Context, in *executor.Input, platformProviderName stri return false } - if err := client.ModifyListeners(ctx, currListenerArns, routingTrafficCfg); err != nil { - in.LogPersister.Errorf("Failed to routing traffic to PRIMARY variant: %v", err) + currListenerRuleArns, err := client.GetListenerRuleArns(ctx, currListenerArns) + if err != nil { + in.LogPersister.Errorf("Failed to get current active listener rule: %v", err) + return false + } + + if err := client.ModifyListenerOrRule(ctx, currListenerArns, currListenerRuleArns, routingTrafficCfg); err != nil { + in.LogPersister.Errorf("Failed to routing traffic to PRIMARY/CANARY variants: %v", err) return false } }