diff --git a/internal/api/promote_downstream_v1alpha1.go b/internal/api/promote_downstream_v1alpha1.go index 1ab805b9f..b0838a109 100644 --- a/internal/api/promote_downstream_v1alpha1.go +++ b/internal/api/promote_downstream_v1alpha1.go @@ -134,9 +134,12 @@ func (s *server) PromoteDownstream( createdPromos := make([]*kargoapi.Promotion, 0, len(downstreams)) for _, downstream := range downstreams { newPromo := kargo.NewPromotion(ctx, downstream, freight.Name) - if downstream.Spec.PromotionMechanisms == nil { // nolint: staticcheck + // nolint: staticcheck + if downstream.Spec.PromotionMechanisms == nil && + downstream.Spec.PromotionTemplate != nil && + len(downstream.Spec.PromotionTemplate.Spec.Steps) == 0 { // Avoid creating a Promotion if the downstream Stage has no - // PromotionMechanisms, and is a "control flow" Stage. + // PromotionMechanisms, and no promotion steps and is a "control flow" Stage. continue } if err := s.createPromotionFn(ctx, &newPromo); err != nil { diff --git a/ui/src/features/project/pipelines/nodes/stage-node.tsx b/ui/src/features/project/pipelines/nodes/stage-node.tsx index 620205d94..d1611ce7d 100644 --- a/ui/src/features/project/pipelines/nodes/stage-node.tsx +++ b/ui/src/features/project/pipelines/nodes/stage-node.tsx @@ -185,7 +185,8 @@ export const StageNode = ({ {action !== FreightTimelineAction.ManualApproval && action !== FreightTimelineAction.PromoteFreight && ( <> - {(stage.spec?.promotionMechanisms || stage.spec?.promotionTemplate) && ( + {(stage.spec?.promotionMechanisms || + !!stage.spec?.promotionTemplate?.spec?.steps?.length) && (