-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: deployment pipeline partially delete. #2950
Conversation
…talled app, added new request for paritally delete
…cd-app-partially-delete
@@ -401,6 +404,12 @@ func (handler *InstalledAppRestHandlerImpl) FetchAppDetailsForInstalledApp(w htt | |||
} | |||
handler.Logger.Infow("request payload, FetchAppDetailsForInstalledApp, app store", "installedAppId", installedAppId, "envId", envId) | |||
|
|||
err = handler.installedAppService.CheckAppExistsByInstalledAppId(installedAppId) | |||
if err == pg.ErrNoRows { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid this check in rest handler, handle it in service layer.
@@ -425,16 +434,33 @@ func (handler *InstalledAppRestHandlerImpl) FetchAppDetailsForInstalledApp(w htt | |||
} | |||
//rback block ends here | |||
if len(appDetail.AppName) > 0 && len(appDetail.EnvironmentName) > 0 { | |||
handler.fetchResourceTree(w, r, &appDetail) | |||
err = handler.fetchResourceTree(w, r, &appDetail) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move this logic at service layer
@@ -355,6 +356,20 @@ func (handler AppListingRestHandlerImpl) FetchAppDetails(w http.ResponseWriter, | |||
common.WriteJsonResp(w, err, nil, http.StatusBadRequest) | |||
return | |||
} | |||
pipelines, err := handler.pipelineRepository.FindActiveByAppIdAndEnvironmentId(appId, envId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to move this logic in service
# Conflicts: # api/restHandler/AppListingRestHandler.go # internal/sql/repository/pipelineConfig/PipelineRepository.go # pkg/app/AppService.go # pkg/bean/app.go # pkg/pipeline/GitopsOrHelmOption_test.go # pkg/pipeline/PipelineBuilder.go # wire_gen.go
SonarCloud Quality Gate failed.
|
Description
Fixing case where deletion get stuck, the argo app is not actually deleted but it is deleted at devtron side. This causes error when user tries to recreate the pipeline.
Fixes #2746
tech doc: https://docs.google.com/document/d/1XrOChkOvShkpk0oNr-BqXT4jerOizgSza1Xw6naSN9E/edit
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:
Does this PR introduce a user-facing change?