Skip to content

Commit

Permalink
failed will not return error for redis
Browse files Browse the repository at this point in the history
  • Loading branch information
yanjiaxin534 committed Jan 20, 2025
1 parent d233804 commit c504a72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/pkg/apis/v1alpha1/vendors/solution-vendor.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ func (e *SolutionVendor) Init(config vendors.VendorConfig, factories []managers.
err := e.handleStepResult(ctx, event)
if err != nil {
log.ErrorfCtx(ctx, "V(Solution): Failed to handle step result: %v", err)
return err
}
return err
},
Expand All @@ -147,7 +146,7 @@ func (e *SolutionVendor) handleDeploymentPlan(ctx context.Context, event v1alpha
return err
}

planState := e.createPlanState(planEnvelope)
planState := e.createPlanState(ctx, planEnvelope)
lockName := api_utils.GenerateKeyLockName(planState.Namespace, planState.Deployment.Instance.ObjectMeta.Name)
e.SolutionManager.KeyLockProvider.TryLock(lockName)
log.InfoCtx(ctx, "begin to save summary for %s", planEnvelope.PlanId)
Expand Down Expand Up @@ -212,11 +211,12 @@ func (e *SolutionVendor) publishStepResult(ctx context.Context, target string, p
Timestamp: time.Now(),
Error: errorString,
},
Context: ctx,
})
}

// create inital plan state
func (e *SolutionVendor) createPlanState(planEnvelope PlanEnvelope) *PlanState {
func (e *SolutionVendor) createPlanState(ctx context.Context, planEnvelope PlanEnvelope) *PlanState {
return &PlanState{
PlanId: planEnvelope.PlanId,
StartTime: time.Now(),
Expand Down

0 comments on commit c504a72

Please sign in to comment.