Skip to content

Commit

Permalink
fix: ensure state is available to var getter
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Dec 19, 2024
1 parent 41e3c47 commit 7884c6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func RunningPromotionsByArgoCDApplications(
dirStep := directives.PromotionStep{
Kind: step.Uses,
Alias: step.As,
Vars: step.Vars,
Config: step.Config.Raw,
}
// Build just enough context to extract the relevant config from the
Expand All @@ -168,7 +169,9 @@ func RunningPromotionsByArgoCDApplications(
Promotion: promo.Name,
Vars: promo.Spec.Vars,
}
vars, err := dirStep.GetVars(promoCtx, promoCtx.State)
// As we are not evaluating expressions in the entire config, we do not
// pass any state.
vars, err := dirStep.GetVars(promoCtx, promo.Status.GetState())
if err != nil {
logger.Error(
err,
Expand Down

0 comments on commit 7884c6e

Please sign in to comment.