Skip to content

Commit

Permalink
chore: move log call to serve directives and mechanisms
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddeco committed Sep 18, 2024
1 parent 790c320 commit abf22ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/controller/promotions/promotions.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,6 @@ func (r *reconciler) promote(
if err := r.promoMechanisms.Promote(ctx, stage, workingPromo); err != nil {
return nil, err

Check warning on line 512 in internal/controller/promotions/promotions.go

View check run for this annotation

Codecov / codecov/patch

internal/controller/promotions/promotions.go#L511-L512

Added lines #L511 - L512 were not covered by tests
}

logger.Debug("promotion", "phase", workingPromo.Status.Phase)
} else {

Check warning on line 514 in internal/controller/promotions/promotions.go

View check run for this annotation

Codecov / codecov/patch

internal/controller/promotions/promotions.go#L514

Added line #L514 was not covered by tests
// If the Promotion has steps, execute them in sequence.
var steps []directives.Step
Expand All @@ -523,6 +521,7 @@ func (r *reconciler) promote(
Config: step.GetConfig(),
})

Check warning on line 522 in internal/controller/promotions/promotions.go

View check run for this annotation

Codecov / codecov/patch

internal/controller/promotions/promotions.go#L516-L522

Added lines #L516 - L522 were not covered by tests
}

status, err := r.directivesEngine.Execute(ctx, directives.PromotionContext{
Project: stageNamespace,
Stage: stageName,
Expand All @@ -540,6 +539,8 @@ func (r *reconciler) promote(
}
}

logger.Debug("promotion", "phase", workingPromo.Status.Phase)

if workingPromo.Status.Phase == kargoapi.PromotionPhaseSucceeded {
// Trigger re-verification of the Stage if the promotion succeeded and
// this is a re-promotion of the same Freight.
Expand Down

0 comments on commit abf22ae

Please sign in to comment.