Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions pkg/bean/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,9 @@ const (
NOT_YET_DELETED Status = "Not yet deleted"
)

const RELEASE_NOT_EXIST = "release not exist"
const NOT_FOUND = "not found"

func (a CdPatchAction) String() string {
return [...]string{"CREATE", "DELETE", "CD_UPDATE"}[a]
}
Expand Down
8 changes: 7 additions & 1 deletion pkg/pipeline/PipelineBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,8 @@ func (impl *PipelineBuilderImpl) FetchDeletedApp(ctx context.Context,
if err != nil {
impl.logger.Errorw("error in getting application detail", "err", err, "deploymentAppName", deploymentAppName)
}
if err != nil && strings.Contains(err.Error(), "not found") {

if err != nil && checkAppReleaseNotExist(err) {
successfulPipelines = impl.appendToDeploymentChangeStatusList(
successfulPipelines,
pipeline,
Expand Down Expand Up @@ -1942,3 +1943,8 @@ func (impl *PipelineBuilderImpl) buildResponses() []bean.ResponseSchemaObject {
responseSchemaObjects = append(responseSchemaObjects, response401)
return responseSchemaObjects
}

func checkAppReleaseNotExist(err error) bool {
// RELEASE_NOT_EXIST check for helm App and NOT_FOUND check for argo app
return strings.Contains(err.Error(), bean.NOT_FOUND) || strings.Contains(err.Error(), bean.RELEASE_NOT_EXIST)
}