Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pkg/app/pipedv1/controller/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"sort"
"time"

"github.com/google/uuid"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"go.uber.org/atomic"
Expand Down Expand Up @@ -414,8 +415,7 @@ func (p *planner) buildPlan(ctx context.Context, runningDS, targetDS *common.Dep
// buildQuickSyncStages requests all plugins and returns quick sync stage
// from each plugins to build the deployment pipeline.
// NOTE:
// - For quick sync, we expect all stages given by plugins can be performed
// at once regradless its order (aka. no `Stage.Requires` specified)
// - For quick sync, we expect all stages given by plugins can be performed in random order.
// - Rollback stage will always be added as the trail.
func (p *planner) buildQuickSyncStages(ctx context.Context, cfg *config.GenericApplicationSpec) ([]*model.PipelineStage, error) {
var (
Expand All @@ -436,6 +436,7 @@ func (p *planner) buildQuickSyncStages(ctx context.Context, cfg *config.GenericA
return nil, err
}
for i := range res.Stages {
res.Stages[i].Id = uuid.New().String()
if res.Stages[i].Rollback {
rollbackStages = append(rollbackStages, res.Stages[i])
} else {
Expand Down Expand Up @@ -478,7 +479,6 @@ func (p *planner) buildPipelineSyncStages(ctx context.Context, cfg *config.Gener
}

stagesCfgPerPlugin[plg] = append(stagesCfgPerPlugin[plg], &deployment.BuildPipelineSyncStagesRequest_StageConfig{
Id: stageCfg.ID,
Name: stageCfg.Name.String(),
Desc: stageCfg.Desc,
Timeout: stageCfg.Timeout.Duration().String(),
Expand All @@ -503,6 +503,7 @@ func (p *planner) buildPipelineSyncStages(ctx context.Context, cfg *config.Gener
}

for i := range res.Stages {
res.Stages[i].Id = uuid.New().String()
if res.Stages[i].Rollback {
rollbackStages = append(rollbackStages, res.Stages[i])
} else {
Expand Down
Loading