From ffa9caca8be654106c599bd52e8a7d429ed4bfce Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Fri, 13 Sep 2024 14:17:42 +1000 Subject: [PATCH] fix: hang on redeployment fixes: #2655 --- backend/controller/dal/dal.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/controller/dal/dal.go b/backend/controller/dal/dal.go index 8a1898cdd4..7f790ccaaa 100644 --- a/backend/controller/dal/dal.go +++ b/backend/controller/dal/dal.go @@ -394,7 +394,7 @@ func (d *DAL) CreateDeployment(ctx context.Context, language string, moduleSchem } defer tx.CommitOrRollback(ctx, &err) - existingDeployment, err := d.checkForExistingDeployments(ctx, tx, moduleSchema, artefacts) + existingDeployment, err := tx.checkForExistingDeployments(ctx, tx, moduleSchema, artefacts) if err != nil { return model.DeploymentKey{}, err } else if !existingDeployment.IsZero() { @@ -663,7 +663,7 @@ func (d *DAL) ReplaceDeployment(ctx context.Context, newDeploymentKey model.Depl if err != nil { return fmt.Errorf("replace deployment failed to set new deployment replicas from %v to %v: %w", oldDeployment.Key, newDeploymentKey, libdal.TranslatePGError(err)) } - err = d.deploymentWillDeactivate(ctx, oldDeployment.Key) + err = tx.deploymentWillDeactivate(ctx, oldDeployment.Key) if err != nil { return fmt.Errorf("replace deployment failed willDeactivate trigger from %v to %v: %w", oldDeployment.Key, newDeploymentKey, libdal.TranslatePGError(err)) }