Skip to content

Commit

Permalink
fix: added missing clusterConfig in releaseIdentifier request (#4359)
Browse files Browse the repository at this point in the history
* added missing clusterConfig in releaseIdentifier request

* remove duplicate logic
  • Loading branch information
gireesh-devtron committed Dec 6, 2023
1 parent 3dd2630 commit b886994
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 0 additions & 9 deletions api/helm-app/HelmAppService.go
Original file line number Diff line number Diff line change
Expand Up @@ -846,16 +846,7 @@ func (impl *HelmAppServiceImpl) TemplateChart(ctx context.Context, templateChart
return response, nil
}
func (impl *HelmAppServiceImpl) GetNotes(ctx context.Context, request *InstallReleaseRequest) (string, error) {
clusterId := int(request.ReleaseIdentifier.ClusterConfig.ClusterId)
config, err := impl.GetClusterConf(clusterId)
var notesTxt string
if err != nil {
impl.logger.Errorw("error in fetching cluster detail", "clusterId", clusterId, "err", err)
return notesTxt, err
}

request.ReleaseIdentifier.ClusterConfig = config

response, err := impl.helmAppClient.GetNotes(ctx, request)
if err != nil {
impl.logger.Errorw("error in fetching chart", "err", err)
Expand Down
8 changes: 8 additions & 0 deletions pkg/appStore/deployment/service/InstalledAppService.go
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,14 @@ func (impl *InstalledAppServiceImpl) FindNotesForArgoApplication(installedAppId,
},
}

clusterId := installedAppVerison.InstalledApp.Environment.ClusterId
config, err := impl.helmAppService.GetClusterConf(clusterId)
if err != nil {
impl.logger.Errorw("error in fetching cluster detail", "clusterId", clusterId, "err", err)
return "", appName, err
}
installReleaseRequest.ReleaseIdentifier.ClusterConfig = config

notes, err = impl.helmAppService.GetNotes(context.Background(), installReleaseRequest)
if err != nil {
impl.logger.Errorw("error in fetching notes", "err", err)
Expand Down

0 comments on commit b886994

Please sign in to comment.