diff --git a/internal/sql/repository/DeploymentTemplateRepository.go b/internal/sql/repository/DeploymentTemplateRepository.go index c35df61721..07946e5f51 100644 --- a/internal/sql/repository/DeploymentTemplateRepository.go +++ b/internal/sql/repository/DeploymentTemplateRepository.go @@ -53,7 +53,7 @@ func (impl DeploymentTemplateRepositoryImpl) FetchDeploymentHistoryWithChartRefs limit := 15 query := "select p.id as pipeline_id, dth.id as deployment_template_history_id," + - " wfr.finished_on, wfr.status, ceco.chart_id, c.chart_version FROM cd_workflow_runner wfr" + + " wfr.finished_on, wfr.status, c.chart_ref_id, c.chart_version FROM cd_workflow_runner wfr" + " JOIN cd_workflow wf ON wf.id = wfr.cd_workflow_id JOIN pipeline p ON p.id = wf.pipeline_id" + " JOIN deployment_template_history dth ON dth.deployed_on = wfr.started_on " + "JOIN pipeline_config_override pco ON pco.cd_workflow_id = wf.id " + diff --git a/pkg/pipeline/WorkflowDagExecutor.go b/pkg/pipeline/WorkflowDagExecutor.go index 501834298b..848dc74eec 100644 --- a/pkg/pipeline/WorkflowDagExecutor.go +++ b/pkg/pipeline/WorkflowDagExecutor.go @@ -3852,7 +3852,7 @@ func (impl *WorkflowDagExecutorImpl) GetEnvOverrideByTriggerType(overrideRequest } //getting chart_ref by id _, span = otel.Tracer("orchestrator").Start(ctx, "chartRefRepository.FindByVersionAndName") - chartRefDto, err := impl.chartRefService.FindByVersionAndName(templateName, templateVersion) + chartRefDto, err := impl.chartRefService.FindByVersionAndName(templateVersion, templateName) span.End() if err != nil { impl.logger.Errorw("error in getting chartRef by version and name", "err", err, "version", templateVersion, "name", templateName)