From c504a72e6041a03038c9483cd5bba11802a4a9b5 Mon Sep 17 00:00:00 2001 From: Jiaxin Yan Date: Mon, 20 Jan 2025 12:10:27 +0800 Subject: [PATCH] failed will not return error for redis --- api/pkg/apis/v1alpha1/vendors/solution-vendor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/pkg/apis/v1alpha1/vendors/solution-vendor.go b/api/pkg/apis/v1alpha1/vendors/solution-vendor.go index adbbe0159..082c5eadb 100644 --- a/api/pkg/apis/v1alpha1/vendors/solution-vendor.go +++ b/api/pkg/apis/v1alpha1/vendors/solution-vendor.go @@ -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 }, @@ -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) @@ -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(),