Skip to content
Merged
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
14 changes: 8 additions & 6 deletions pkg/chart/ChartService.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,6 @@ func (impl *ChartServiceImpl) UpdateAppOverride(ctx context.Context, templateReq
return nil, err
}

err = impl.updateChartLocationForEnvironmentConfigs(newCtx, templateRequest.AppId, templateRequest.ChartRefId, templateRequest.UserId, template.ChartVersion)
if err != nil {
impl.logger.Errorw("error in updating chart location in env overrides", "appId", templateRequest.AppId, "err", err)
return nil, err
}

} else {
return nil, nil
}
Expand Down Expand Up @@ -725,6 +719,14 @@ func (impl *ChartServiceImpl) UpdateAppOverride(ctx context.Context, templateReq
return nil, err
}

if currentLatestChart.Id != 0 && currentLatestChart.Id != templateRequest.Id {
err = impl.updateChartLocationForEnvironmentConfigs(newCtx, templateRequest.AppId, templateRequest.ChartRefId, templateRequest.UserId, template.ChartVersion)
if err != nil {
impl.logger.Errorw("error in updating chart location in env overrides", "appId", templateRequest.AppId, "err", err)
return nil, err
}
}

appLevelMetricsUpdateReq := &bean.DeployedAppMetricsRequest{
EnableMetrics: templateRequest.IsAppMetricsEnabled,
AppId: templateRequest.AppId,
Expand Down
Loading