Skip to content

Commit

Permalink
chore(api): remove redundant setter from Promotion (#1897)
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Apr 27, 2024
1 parent eb75e27 commit 14522e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions api/v1alpha1/promotion_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,6 @@ func (p *PromotionStatus) WithPhase(phase PromotionPhase) *PromotionStatus {
return status
}

// WithFreight returns a copy of PromotionStatus with the given freight
func (p *PromotionStatus) WithFreight(freight *FreightReference) *PromotionStatus {
status := p.DeepCopy()
status.Freight = freight
return status
}

// +kubebuilder:object:root=true

// PromotionList contains a list of Promotion
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/promotions/promotions.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ func (r *reconciler) promote(
if err != nil {
return nil, err
}
newStatus = newStatus.WithFreight(&nextFreight)
newStatus.Freight = &nextFreight

logger.Debugf("promotion %s", newStatus.Phase)

Expand Down

0 comments on commit 14522e0

Please sign in to comment.