Skip to content

Commit

Permalink
Send StageIndex to plugins (#5231)
Browse files Browse the repository at this point in the history
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
  • Loading branch information
Warashi authored Sep 26, 2024
1 parent 1886645 commit 997339c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/app/pipedv1/controller/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,9 @@ func (p *planner) buildQuickSyncStages(ctx context.Context, cfg *config.GenericA
rollbackStages = []*model.PipelineStage{}
rollback = *cfg.Planner.AutoRollback
)
for _, plg := range p.plugins {
res, err := plg.BuildQuickSyncStages(ctx, &deployment.BuildQuickSyncStagesRequest{Rollback: rollback})
// TODO: Consider how to define the order of plugins.
for i, plg := range p.plugins {
res, err := plg.BuildQuickSyncStages(ctx, &deployment.BuildQuickSyncStagesRequest{StageIndex: int32(i), Rollback: rollback})
if err != nil {
return nil, fmt.Errorf("failed to build quick sync stage deployment (%w)", err)
}
Expand Down

0 comments on commit 997339c

Please sign in to comment.