From f126b3accb8412eb568ec0c4cbd52a0816b0409b Mon Sep 17 00:00:00 2001 From: Ash-exp Date: Thu, 1 May 2025 03:17:41 +0530 Subject: [PATCH 01/14] fix: rest handler missing return statements --- api/appStore/deployment/AppStoreDeploymentRestHandler.go | 4 ++++ api/appStore/deployment/CommonDeploymentRestHandler.go | 1 + api/auth/user/UserAuthHandler.go | 1 + api/helm-app/HelmAppRestHandler.go | 2 ++ api/k8s/application/k8sApplicationRestHandler.go | 1 + api/restHandler/BatchOperationRestHandler.go | 1 + api/restHandler/BulkUpdateRestHandler.go | 7 +++++++ api/restHandler/GitOpsConfigRestHandler.go | 1 + api/restHandler/ImageScanRestHandler.go | 7 +++++++ api/restHandler/PolicyRestHandler.go | 1 + api/restHandler/ReleaseMetricsRestHandler.go | 1 + api/restHandler/WebhookEventHandler.go | 1 + api/restHandler/app/appList/AppListingRestHandler.go | 2 ++ .../app/pipeline/configure/BuildPipelineRestHandler.go | 2 ++ 14 files changed, 32 insertions(+) diff --git a/api/appStore/deployment/AppStoreDeploymentRestHandler.go b/api/appStore/deployment/AppStoreDeploymentRestHandler.go index 08bb4f43a5..9aa316460c 100644 --- a/api/appStore/deployment/AppStoreDeploymentRestHandler.go +++ b/api/appStore/deployment/AppStoreDeploymentRestHandler.go @@ -539,6 +539,7 @@ func (handler AppStoreDeploymentRestHandlerImpl) UpdateProjectHelmApp(w http.Res if err != nil { handler.Logger.Errorw("error in decoding app id", "err", err) common.WriteJsonResp(w, err, "error in decoding app id", http.StatusBadRequest) + return } // this rbac object checks that whether user have permission to change current project. rbacObjectForCurrentProject, rbacObjectForCurrentProject2 := handler.enforcerUtilHelm.GetHelmObjectByClusterIdNamespaceAndAppName(appIdentifier.ClusterId, appIdentifier.Namespace, appIdentifier.ReleaseName) @@ -555,6 +556,7 @@ func (handler AppStoreDeploymentRestHandlerImpl) UpdateProjectHelmApp(w http.Res if err != nil { handler.Logger.Errorw("service err, InstalledAppId", "err", err, "InstalledAppId", request.InstalledAppId) common.WriteJsonResp(w, fmt.Errorf("Unable to fetch installed app details"), nil, http.StatusBadRequest) + return } if installedApp.IsVirtualEnvironment { rbacObjectForCurrentProject, _ := handler.enforcerUtilHelm.GetAppRBACNameByInstalledAppId(request.InstalledAppId) @@ -580,8 +582,10 @@ func (handler AppStoreDeploymentRestHandlerImpl) UpdateProjectHelmApp(w http.Res if err != nil { handler.Logger.Errorw("error in updating project for helm apps", "err", err) common.WriteJsonResp(w, err, "error in updating project", http.StatusBadRequest) + return } else { handler.Logger.Errorw("Helm App project update") common.WriteJsonResp(w, nil, "Project Updated", http.StatusOK) + return } } diff --git a/api/appStore/deployment/CommonDeploymentRestHandler.go b/api/appStore/deployment/CommonDeploymentRestHandler.go index 2365082183..e3ee4fba45 100644 --- a/api/appStore/deployment/CommonDeploymentRestHandler.go +++ b/api/appStore/deployment/CommonDeploymentRestHandler.go @@ -268,6 +268,7 @@ func (handler *CommonDeploymentRestHandlerImpl) RollbackApplication(w http.Respo appOfferingMode, installedAppDto, err := handler.getAppOfferingMode(installedAppId, *request.HAppId) if err != nil { common.WriteJsonResp(w, err, "bad request", http.StatusBadRequest) + return } installedAppDto.UserId = userId //rbac block starts from here diff --git a/api/auth/user/UserAuthHandler.go b/api/auth/user/UserAuthHandler.go index 56c575e7ca..daba9d2334 100644 --- a/api/auth/user/UserAuthHandler.go +++ b/api/auth/user/UserAuthHandler.go @@ -70,6 +70,7 @@ func (handler UserAuthHandlerImpl) LoginHandler(w http.ResponseWriter, r *http.R if err != nil { handler.logger.Errorw("request err, LoginHandler", "err", err, "payload", up) common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } err = handler.validator.Struct(up) diff --git a/api/helm-app/HelmAppRestHandler.go b/api/helm-app/HelmAppRestHandler.go index a21cf730ff..bb4343a530 100644 --- a/api/helm-app/HelmAppRestHandler.go +++ b/api/helm-app/HelmAppRestHandler.go @@ -191,6 +191,7 @@ func (handler *HelmAppRestHandlerImpl) Hibernate(w http.ResponseWriter, r *http. appType, err = strconv.Atoi(appTypeString) if err != nil { common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } } @@ -282,6 +283,7 @@ func (handler *HelmAppRestHandlerImpl) UnHibernate(w http.ResponseWriter, r *htt appType, err = strconv.Atoi(appTypeString) if err != nil { common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } } token := r.Header.Get("token") diff --git a/api/k8s/application/k8sApplicationRestHandler.go b/api/k8s/application/k8sApplicationRestHandler.go index dd68e18e15..644830a36c 100644 --- a/api/k8s/application/k8sApplicationRestHandler.go +++ b/api/k8s/application/k8sApplicationRestHandler.go @@ -729,6 +729,7 @@ func (handler *K8sApplicationRestHandlerImpl) requestValidationAndRBAC(w http.Re if err != nil { handler.logger.Errorw(bean2.AppIdDecodingError, "err", err, "appIdentifier", request.AppIdentifier) common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } valid, err := handler.argoApplicationReadService.ValidateArgoResourceRequest(r.Context(), appIdentifier, request.K8sRequest) if err != nil || !valid { diff --git a/api/restHandler/BatchOperationRestHandler.go b/api/restHandler/BatchOperationRestHandler.go index ff50ba96a4..fd598e5725 100644 --- a/api/restHandler/BatchOperationRestHandler.go +++ b/api/restHandler/BatchOperationRestHandler.go @@ -94,6 +94,7 @@ func (handler BatchOperationRestHandlerImpl) Operate(w http.ResponseWriter, r *h if workflow.Destination.App == nil || len(*workflow.Destination.App) == 0 { common.WriteJsonResp(w, errors.New("app name cannot be empty"), nil, http.StatusBadRequest) + return } rbacString := handler.enforcerUtil.GetProjectAdminRBACNameBYAppName(*workflow.Destination.App) if ok := handler.enforcer.Enforce(token, casbin.ResourceApplications, casbin.ActionCreate, rbacString); !ok { diff --git a/api/restHandler/BulkUpdateRestHandler.go b/api/restHandler/BulkUpdateRestHandler.go index 61b65644b7..423a069341 100644 --- a/api/restHandler/BulkUpdateRestHandler.go +++ b/api/restHandler/BulkUpdateRestHandler.go @@ -181,22 +181,26 @@ func (handler BulkUpdateRestHandlerImpl) GetImpactedAppsName(w http.ResponseWrit ok := handler.CheckAuthForImpactedObjects(deploymentTemplateImpactedApp.AppId, deploymentTemplateImpactedApp.EnvId, appResourceObjects, envResourceObjects, token) if !ok { common.WriteJsonResp(w, fmt.Errorf("unauthorized user"), "Unauthorized User", http.StatusForbidden) + return } } for _, configMapImpactedApp := range impactedApps.ConfigMap { ok := handler.CheckAuthForImpactedObjects(configMapImpactedApp.AppId, configMapImpactedApp.EnvId, appResourceObjects, envResourceObjects, token) if !ok { common.WriteJsonResp(w, fmt.Errorf("unauthorized user"), "Unauthorized User", http.StatusForbidden) + return } } for _, secretImpactedApp := range impactedApps.Secret { ok := handler.CheckAuthForImpactedObjects(secretImpactedApp.AppId, secretImpactedApp.EnvId, appResourceObjects, envResourceObjects, token) if !ok { common.WriteJsonResp(w, fmt.Errorf("unauthorized user"), "Unauthorized User", http.StatusForbidden) + return } } common.WriteJsonResp(w, err, impactedApps, http.StatusOK) } + func (handler BulkUpdateRestHandlerImpl) CheckAuthForBulkUpdate(AppId int, EnvId int, AppName string, rbacObjects map[int]string, token string) bool { resourceName := rbacObjects[AppId] if ok := handler.enforcer.Enforce(token, casbin.ResourceApplications, casbin.ActionUpdate, resourceName); !ok { @@ -236,18 +240,21 @@ func (handler BulkUpdateRestHandlerImpl) BulkUpdate(w http.ResponseWriter, r *ht ok := handler.CheckAuthForBulkUpdate(deploymentTemplateImpactedApp.AppId, deploymentTemplateImpactedApp.EnvId, deploymentTemplateImpactedApp.AppName, rbacObjects, token) if !ok { common.WriteJsonResp(w, fmt.Errorf("unauthorized user"), "Unauthorized User", http.StatusForbidden) + return } } for _, configMapImpactedApp := range impactedApps.ConfigMap { ok := handler.CheckAuthForBulkUpdate(configMapImpactedApp.AppId, configMapImpactedApp.EnvId, configMapImpactedApp.AppName, rbacObjects, token) if !ok { common.WriteJsonResp(w, fmt.Errorf("unauthorized user"), "Unauthorized User", http.StatusForbidden) + return } } for _, secretImpactedApp := range impactedApps.Secret { ok := handler.CheckAuthForBulkUpdate(secretImpactedApp.AppId, secretImpactedApp.EnvId, secretImpactedApp.AppName, rbacObjects, token) if !ok { common.WriteJsonResp(w, fmt.Errorf("unauthorized user"), "Unauthorized User", http.StatusForbidden) + return } } diff --git a/api/restHandler/GitOpsConfigRestHandler.go b/api/restHandler/GitOpsConfigRestHandler.go index 0511b8204f..1f70424635 100644 --- a/api/restHandler/GitOpsConfigRestHandler.go +++ b/api/restHandler/GitOpsConfigRestHandler.go @@ -312,6 +312,7 @@ func (impl GitOpsConfigRestHandlerImpl) GitOpsValidator(w http.ResponseWriter, r if err != nil && !errors.Is(err, moduleErr.ModuleNotFoundError) { impl.logger.Errorw("error in getting argo module", "error", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) + return } detailedErrorGitOpsConfigResponse := impl.gitOpsConfigService.GitOpsValidateDryRun(argoModule.IsInstalled(), &bean) common.WriteJsonResp(w, nil, detailedErrorGitOpsConfigResponse, http.StatusOK) diff --git a/api/restHandler/ImageScanRestHandler.go b/api/restHandler/ImageScanRestHandler.go index b0f386f50e..b19c92efc9 100644 --- a/api/restHandler/ImageScanRestHandler.go +++ b/api/restHandler/ImageScanRestHandler.go @@ -198,6 +198,7 @@ func (impl ImageScanRestHandlerImpl) FetchExecutionDetail(w http.ResponseWriter, if err != nil { impl.logger.Errorw("request err, FetchExecutionDetail", "err", err, "imageScanDeployInfoIdS", imageScanDeployInfoIdS) common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } } artifactIdS := v.Get("artifactId") @@ -206,6 +207,7 @@ func (impl ImageScanRestHandlerImpl) FetchExecutionDetail(w http.ResponseWriter, if err != nil { impl.logger.Errorw("request err, FetchExecutionDetail", "err", err, "artifactIdS", artifactIdS) common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } } appIds := v.Get("appId") @@ -214,6 +216,7 @@ func (impl ImageScanRestHandlerImpl) FetchExecutionDetail(w http.ResponseWriter, if err != nil { impl.logger.Errorw("request err, FetchExecutionDetail", "err", err, "appIds", appIds) common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } } envIds := v.Get("envId") @@ -222,6 +225,7 @@ func (impl ImageScanRestHandlerImpl) FetchExecutionDetail(w http.ResponseWriter, if err != nil { impl.logger.Errorw("request err, FetchExecutionDetail", "err", err, "envIds", envIds) common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } } image := v.Get("image") @@ -266,6 +270,7 @@ func (impl ImageScanRestHandlerImpl) FetchExecutionDetail(w http.ResponseWriter, } } else { common.WriteJsonResp(w, fmt.Errorf("unauthorized user"), "Unauthorized User", http.StatusForbidden) + return } //RBAC } else { @@ -285,6 +290,7 @@ func (impl ImageScanRestHandlerImpl) FetchMinScanResultByAppIdAndEnvId(w http.Re if err != nil { impl.logger.Errorw("request err, FetchMinScanResultByAppIdAndEnvId", "err", err, "appIds", appIds) common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } request.AppId = appId } @@ -294,6 +300,7 @@ func (impl ImageScanRestHandlerImpl) FetchMinScanResultByAppIdAndEnvId(w http.Re if err != nil { impl.logger.Errorw("request err, FetchMinScanResultByAppIdAndEnvId", "err", err, "envIds", envIds) common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } request.EnvId = envId } diff --git a/api/restHandler/PolicyRestHandler.go b/api/restHandler/PolicyRestHandler.go index 33c6e4d114..2678207843 100644 --- a/api/restHandler/PolicyRestHandler.go +++ b/api/restHandler/PolicyRestHandler.go @@ -218,6 +218,7 @@ func (impl PolicyRestHandlerImpl) GetPolicy(w http.ResponseWriter, r *http.Reque if err != nil { impl.logger.Errorw("request err, GetPolicy", "err", err, "id", id) common.WriteJsonResp(w, err, nil, http.StatusBadRequest) + return } req.Id = ids } diff --git a/api/restHandler/ReleaseMetricsRestHandler.go b/api/restHandler/ReleaseMetricsRestHandler.go index a2d9169ca9..f9de1c48c2 100644 --- a/api/restHandler/ReleaseMetricsRestHandler.go +++ b/api/restHandler/ReleaseMetricsRestHandler.go @@ -124,6 +124,7 @@ func (impl *ReleaseMetricsRestHandlerImpl) ResetDataForAllAppEnvironment(w http. if err != nil { impl.logger.Errorw("service err, ResetDataForAllAppEnvironment", "err", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) + return } for _, pipeline := range pipelines { appRbacObject := impl.enforcerUtil.GetAppRBACNameByAppId(pipeline.AppId) diff --git a/api/restHandler/WebhookEventHandler.go b/api/restHandler/WebhookEventHandler.go index a765373d48..922a53ad8f 100644 --- a/api/restHandler/WebhookEventHandler.go +++ b/api/restHandler/WebhookEventHandler.go @@ -142,5 +142,6 @@ func (impl WebhookEventHandlerImpl) OnWebhookEvent(w http.ResponseWriter, r *htt if err != nil { impl.logger.Errorw("Error while handling webhook in git-sensor", "err", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) + return } } diff --git a/api/restHandler/app/appList/AppListingRestHandler.go b/api/restHandler/app/appList/AppListingRestHandler.go index 3862d4c4b9..f2d450a236 100644 --- a/api/restHandler/app/appList/AppListingRestHandler.go +++ b/api/restHandler/app/appList/AppListingRestHandler.go @@ -346,6 +346,7 @@ func (handler AppListingRestHandlerImpl) FetchAppsByEnvironmentV2(w http.Respons if err != nil { handler.logger.Errorw("service err, FetchAppsByEnvironment", "err", err, "payload", fetchAppListingRequest) common.WriteJsonResp(w, err, "", http.StatusInternalServerError) + return } } @@ -370,6 +371,7 @@ func (handler AppListingRestHandlerImpl) FetchAppsByEnvironmentV2(w http.Respons if err != nil { handler.logger.Errorw("service err, FetchAppsByEnvironment", "err", err, "payload", fetchAppListingRequest) common.WriteJsonResp(w, err, "", http.StatusInternalServerError) + return } appContainerResponse := AppView.AppContainerResponse{ diff --git a/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go b/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go index 13b61730e3..c7d11e12aa 100644 --- a/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go +++ b/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go @@ -876,8 +876,10 @@ func (handler *PipelineConfigRestHandlerImpl) GetCiPipelineMin(w http.ResponseWr if util.IsErrNoRows(err) { err = &util.ApiError{Code: "404", HttpStatusCode: http.StatusNotFound, UserMessage: "no data found"} common.WriteJsonResp(w, err, nil, http.StatusOK) + return } else { common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) + return } } common.WriteJsonResp(w, nil, ciPipelines, http.StatusOK) From 674837b4ba3fe5d37b8ddb547d8043d9dfb60187 Mon Sep 17 00:00:00 2001 From: Satyam Soni <94950988+satyampsoni@users.noreply.github.com> Date: Mon, 5 May 2025 13:33:16 +0100 Subject: [PATCH 02/14] chore: update auto-label.yml (#6372) * Update auto-label.yml * Update auto-label.yml * outsiders can't add labels --- .github/workflows/auto-label.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml index 00b822dd7b..5114ad3190 100644 --- a/.github/workflows/auto-label.yml +++ b/.github/workflows/auto-label.yml @@ -1,4 +1,4 @@ -name: Devtron-auto-labeller +name: Devtron-auto-labeler on: issue_comment: @@ -25,11 +25,11 @@ jobs: ISSUE_NUMBER=$(jq -r '.issue.number // .pull_request.number' "$GITHUB_EVENT_PATH") COMMENT_AUTHOR=$(jq -r '.comment.user.login' "$GITHUB_EVENT_PATH") - ORG_NAME="satyam-tests" + ORG_NAME="devtron-labs" # Check if the person is authorized to add labels - curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com/orgs/$ORG_NAME/members/$COMMENT_AUTHOR" > /dev/null - if [[ $? -ne 0 ]]; then + RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GH_TOKEN" "https://api.github.com/orgs/$ORG_NAME/members/$COMMENT_AUTHOR") + if [[ "$RESPONSE" -ne 204 ]]; then gh issue comment "$ISSUE_NUMBER" --body "Hi @$COMMENT_AUTHOR, you must be a member of the organization '$ORG_NAME' to add or remove labels." echo "User '$COMMENT_AUTHOR' is not a member of the organization '$ORG_NAME'. Exiting." exit 1 @@ -53,7 +53,7 @@ jobs: fi fi - # Remove Label Logic + # Removes Label Logic if [[ "$COMMENT_BODY" =~ ^/remove[[:space:]](.+)$ ]]; then LABEL_NAME_TO_REMOVE=$(echo "$COMMENT_BODY" | sed -n 's|/remove ||p') @@ -64,4 +64,4 @@ jobs: else echo "The label '$LABEL_NAME_TO_REMOVE' is not attached to issue #$ISSUE_NUMBER." fi - fi \ No newline at end of file + fi From 7ca1d48377cac319dec35a74939369e265b98eab Mon Sep 17 00:00:00 2001 From: kartik-579 Date: Tue, 6 May 2025 17:12:35 +0530 Subject: [PATCH 03/14] fix for incorrect artifact list coming in rollback when only one trigger is made --- .../pipeline/configure/DeploymentPipelineRestHandler.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go b/api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go index 89f95436ed..4a94fff0b5 100644 --- a/api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go +++ b/api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go @@ -1418,11 +1418,8 @@ func (handler *PipelineConfigRestHandlerImpl) GetArtifactsForRollback(w http.Res // rbac for edit tags access var ciArtifactResponse bean.CiArtifactResponse triggerAccess := handler.enforcer.Enforce(token, casbin.ResourceApplications, casbin.ActionTrigger, object) - if handler.pipelineRestHandlerEnvConfig.UseArtifactListApiV2 { - ciArtifactResponse, err = handler.pipelineBuilder.FetchArtifactForRollbackV2(cdPipelineId, app.Id, offset, limit, searchString, app, deploymentPipeline) - } else { - ciArtifactResponse, err = handler.pipelineBuilder.FetchArtifactForRollback(cdPipelineId, app.Id, offset, limit, searchString) - } + + ciArtifactResponse, err = handler.pipelineBuilder.FetchArtifactForRollbackV2(cdPipelineId, app.Id, offset, limit, searchString, app, deploymentPipeline) if err != nil { handler.Logger.Errorw("service err, GetArtifactsForRollback", "err", err, "cdPipelineId", cdPipelineId) From 635250e43b79669bd5429cb21e501b3243564db2 Mon Sep 17 00:00:00 2001 From: kartik-579 Date: Tue, 6 May 2025 17:24:23 +0530 Subject: [PATCH 04/14] removed redundant function: --- pkg/pipeline/AppArtifactManager.go | 77 ------------------------------ 1 file changed, 77 deletions(-) diff --git a/pkg/pipeline/AppArtifactManager.go b/pkg/pipeline/AppArtifactManager.go index 16b1678d49..bc653f9478 100644 --- a/pkg/pipeline/AppArtifactManager.go +++ b/pkg/pipeline/AppArtifactManager.go @@ -212,83 +212,6 @@ func (impl *AppArtifactManagerImpl) BuildArtifactsForCIParent(cdPipelineId int, return ciArtifacts, nil } -func (impl *AppArtifactManagerImpl) FetchArtifactForRollback(cdPipelineId, appId, offset, limit int, searchString string) (bean2.CiArtifactResponse, error) { - var deployedCiArtifacts []bean2.CiArtifactBean - var deployedCiArtifactsResponse bean2.CiArtifactResponse - - cdWfrs, err := impl.cdWorkflowRepository.FetchArtifactsByCdPipelineId(cdPipelineId, bean.CD_WORKFLOW_TYPE_DEPLOY, offset, limit, searchString) - if err != nil { - impl.logger.Errorw("error in getting artifacts for rollback by cdPipelineId", "err", err, "cdPipelineId", cdPipelineId) - return deployedCiArtifactsResponse, err - } - var ids []int32 - for _, item := range cdWfrs { - ids = append(ids, item.TriggeredBy) - } - userEmails := make(map[int32]string) - users, err := impl.userService.GetByIds(ids) - if err != nil { - impl.logger.Errorw("unable to fetch users by ids", "err", err, "ids", ids) - } - for _, item := range users { - userEmails[item.Id] = item.EmailId - } - - imageTagsDataMap, err := impl.imageTaggingService.GetTagsDataMapByAppId(appId) - if err != nil { - impl.logger.Errorw("error in getting image tagging data with appId", "err", err, "appId", appId) - return deployedCiArtifactsResponse, err - } - artifactIds := make([]int, 0) - - for _, cdWfr := range cdWfrs { - ciArtifact := &repository.CiArtifact{} - if cdWfr.CdWorkflow != nil && cdWfr.CdWorkflow.CiArtifact != nil { - ciArtifact = cdWfr.CdWorkflow.CiArtifact - } - if ciArtifact == nil { - continue - } - mInfo, err := parseMaterialInfo([]byte(ciArtifact.MaterialInfo), ciArtifact.DataSource) - if err != nil { - mInfo = []byte("[]") - impl.logger.Errorw("error in parsing ciArtifact material info", "err", err, "ciArtifact", ciArtifact) - } - userEmail := userEmails[cdWfr.TriggeredBy] - deployedCiArtifacts = append(deployedCiArtifacts, bean2.CiArtifactBean{ - Id: ciArtifact.Id, - Image: ciArtifact.Image, - MaterialInfo: mInfo, - DeployedTime: formatDate(cdWfr.StartedOn, bean2.LayoutRFC3339), - WfrId: cdWfr.Id, - DeployedBy: userEmail, - }) - artifactIds = append(artifactIds, ciArtifact.Id) - } - imageCommentsDataMap, err := impl.imageTaggingService.GetImageCommentsDataMapByArtifactIds(artifactIds) - if err != nil { - impl.logger.Errorw("error in getting GetImageCommentsDataMapByArtifactIds", "err", err, "appId", appId, "artifactIds", artifactIds) - return deployedCiArtifactsResponse, err - } - - for i, _ := range deployedCiArtifacts { - if imageTaggingResp := imageTagsDataMap[deployedCiArtifacts[i].Id]; imageTaggingResp != nil { - deployedCiArtifacts[i].ImageReleaseTags = imageTaggingResp - } - if imageCommentResp := imageCommentsDataMap[deployedCiArtifacts[i].Id]; imageCommentResp != nil { - deployedCiArtifacts[i].ImageComment = imageCommentResp - } - } - - deployedCiArtifactsResponse.CdPipelineId = cdPipelineId - if deployedCiArtifacts == nil { - deployedCiArtifacts = []bean2.CiArtifactBean{} - } - deployedCiArtifactsResponse.CiArtifacts = deployedCiArtifacts - - return deployedCiArtifactsResponse, nil -} - func (impl *AppArtifactManagerImpl) FetchArtifactForRollbackV2(cdPipelineId, appId, offset, limit int, searchString string, app *bean2.CreateAppDTO, deploymentPipeline *pipelineConfig.Pipeline) (bean2.CiArtifactResponse, error) { var deployedCiArtifactsResponse bean2.CiArtifactResponse imageTagsDataMap, err := impl.imageTaggingService.GetTagsDataMapByAppId(appId) From d27c90c5cbec8c06ce999d1e49a230d259386dc2 Mon Sep 17 00:00:00 2001 From: kartik-579 Date: Tue, 6 May 2025 17:24:47 +0530 Subject: [PATCH 05/14] wip --- pkg/pipeline/AppArtifactManager.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/pipeline/AppArtifactManager.go b/pkg/pipeline/AppArtifactManager.go index bc653f9478..8349f5d8f7 100644 --- a/pkg/pipeline/AppArtifactManager.go +++ b/pkg/pipeline/AppArtifactManager.go @@ -40,9 +40,6 @@ import ( type AppArtifactManager interface { RetrieveArtifactsByCDPipelineV2(pipeline *pipelineConfig.Pipeline, stage bean.WorkflowType, artifactListingFilterOpts *bean.ArtifactsListFilterOptions) (*bean2.CiArtifactResponse, error) - //FetchArtifactForRollback : - FetchArtifactForRollback(cdPipelineId, appId, offset, limit int, searchString string) (bean2.CiArtifactResponse, error) - FetchArtifactForRollbackV2(cdPipelineId, appId, offset, limit int, searchString string, app *bean2.CreateAppDTO, deploymentPipeline *pipelineConfig.Pipeline) (bean2.CiArtifactResponse, error) BuildArtifactsForCdStage(pipelineId int, stageType bean.WorkflowType, ciArtifacts []bean2.CiArtifactBean, artifactMap map[int]int, parent bool, limit int, parentCdId int) ([]bean2.CiArtifactBean, map[int]int, int, string, error) From fd1c3990cec0bcbeb9ca49abe02c4ea78a094967 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 7 May 2025 15:25:50 +0530 Subject: [PATCH 06/14] configurable ucid for enterprise (#6553) --- charts/devtron/templates/configmap-secret.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/charts/devtron/templates/configmap-secret.yaml b/charts/devtron/templates/configmap-secret.yaml index efe2d36e9f..5039d292db 100644 --- a/charts/devtron/templates/configmap-secret.yaml +++ b/charts/devtron/templates/configmap-secret.yaml @@ -376,4 +376,16 @@ data: {{- end }} {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} +{{- if $.Values.devtronEnterprise.enabled }} +--- +apiVersion: v1 +data: +{{- if or $.Values.UCID $.Values.ucid }} + UCID: {{ $.Values.UCID | default $.Values.ucid }} +{{- end }} +kind: ConfigMap +metadata: + name: devtron-ucid + namespace: devtroncd +{{- end }} From c0d3426a4c87f729c89b01d575b12a1913b34faa Mon Sep 17 00:00:00 2001 From: kartik-579 <84493919+kartik-579@users.noreply.github.com> Date: Wed, 7 May 2025 15:39:54 +0530 Subject: [PATCH 07/14] idempotent pipeline timeline sql change (#6554) --- scripts/sql/32903500_alter_pipeline_timeline.up.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/sql/32903500_alter_pipeline_timeline.up.sql b/scripts/sql/32903500_alter_pipeline_timeline.up.sql index 63f65ef5f6..69e1269eda 100644 --- a/scripts/sql/32903500_alter_pipeline_timeline.up.sql +++ b/scripts/sql/32903500_alter_pipeline_timeline.up.sql @@ -1,3 +1,3 @@ -CREATE INDEX "idx_pipeline_status_timeline_cd_workflow_runner_id" ON pipeline_status_timeline USING BTREE ("cd_workflow_runner_id"); +CREATE INDEX IF NOT EXISTS "idx_pipeline_status_timeline_cd_workflow_runner_id" ON pipeline_status_timeline USING BTREE ("cd_workflow_runner_id"); -CREATE INDEX "idx_pipeline_status_timeline_installed_app_version_history_id" ON pipeline_status_timeline USING BTREE ("installed_app_version_history_id"); +CREATE INDEX IF NOT EXISTS "idx_pipeline_status_timeline_installed_app_version_history_id" ON pipeline_status_timeline USING BTREE ("installed_app_version_history_id"); From 0ceea38e6c47f31174b956726dbd8581e110eb22 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Wed, 7 May 2025 15:57:58 +0530 Subject: [PATCH 08/14] Updated Chart.yaml (#6555) --- charts/devtron/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/devtron/Chart.yaml b/charts/devtron/Chart.yaml index 33e6cbfbc5..0c12090ba7 100644 --- a/charts/devtron/Chart.yaml +++ b/charts/devtron/Chart.yaml @@ -11,7 +11,7 @@ keywords: - argocd - Hyperion engine: gotpl -version: 0.22.90 +version: 0.22.91 sources: - https://github.com/devtron-labs/charts dependencies: From 77f8b8a8ed0a07717730d4e6fc661850565f8426 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Thu, 8 May 2025 12:03:07 +0530 Subject: [PATCH 09/14] misc: updated ucid-cm and added prehook (#6557) * updated ucid-cm and added prehook * Update Chart.yaml * Update configmap-secret.yaml --- charts/devtron/Chart.yaml | 2 +- charts/devtron/templates/configmap-secret.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/charts/devtron/Chart.yaml b/charts/devtron/Chart.yaml index 0c12090ba7..42647cd02b 100644 --- a/charts/devtron/Chart.yaml +++ b/charts/devtron/Chart.yaml @@ -11,7 +11,7 @@ keywords: - argocd - Hyperion engine: gotpl -version: 0.22.91 +version: 0.22.92 sources: - https://github.com/devtron-labs/charts dependencies: diff --git a/charts/devtron/templates/configmap-secret.yaml b/charts/devtron/templates/configmap-secret.yaml index 5039d292db..04b79f4e52 100644 --- a/charts/devtron/templates/configmap-secret.yaml +++ b/charts/devtron/templates/configmap-secret.yaml @@ -378,14 +378,16 @@ data: {{- end }} {{- end }} {{- if $.Values.devtronEnterprise.enabled }} +{{- if or $.Values.UCID $.Values.ucid }} --- apiVersion: v1 data: -{{- if or $.Values.UCID $.Values.ucid }} UCID: {{ $.Values.UCID | default $.Values.ucid }} -{{- end }} kind: ConfigMap metadata: name: devtron-ucid namespace: devtroncd + annotations: + "helm.sh/hook": pre-install +{{- end }} {{- end }} From b6c99ce6dbf3b26ffd55754afc25899ac91f4a8d Mon Sep 17 00:00:00 2001 From: Vikram Singh Date: Thu, 8 May 2025 12:51:43 +0530 Subject: [PATCH 10/14] vendor update for packet 35 --- go.mod | 4 ++-- go.sum | 8 ++++---- vendor/modules.txt | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index dc1ed31c63..9cf9b8da74 100644 --- a/go.mod +++ b/go.mod @@ -307,8 +307,8 @@ require ( replace ( github.com/argoproj/argo-workflows/v3 v3.5.13 => github.com/devtron-labs/argo-workflows/v3 v3.5.13 - github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250507060105-0a50d1fb1d87 - github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250507060105-0a50d1fb1d87 + github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250508071415-beab8643ef22 + github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250508071415-beab8643ef22 github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5 k8s.io/api => k8s.io/api v0.29.7 diff --git a/go.sum b/go.sum index 5944601282..c7bc2a46c2 100644 --- a/go.sum +++ b/go.sum @@ -829,10 +829,10 @@ github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc h1:VRRKCwnzq github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/devtron-labs/argo-workflows/v3 v3.5.13 h1:3pINq0gXOSeTw2z/vYe+j80lRpSN5Rp/8mfQORh8SmU= github.com/devtron-labs/argo-workflows/v3 v3.5.13/go.mod h1:/vqxcovDPT4zqr4DjR5v7CF8ggpY1l3TSa2CIG3jmjA= -github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250507060105-0a50d1fb1d87 h1:NFTsfTiKgd/slAOeFgzgdCYuwLhJ5AI+V77jugQqvmw= -github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250507060105-0a50d1fb1d87/go.mod h1:FfaLDXN1ZXxyRpnskBqVIYkpkWDCzBmDgIO9xqLnxdQ= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250507060105-0a50d1fb1d87 h1:2JMHVB3eYBeukA0qIw7L9bvRn3o8vmxcVtQGAr94rxE= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250507060105-0a50d1fb1d87/go.mod h1:zkNShlkcHxsmnL0gKNbs0uyRL8lZonGKr5Km63uTLI0= +github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250508071415-beab8643ef22 h1:Eli2aNwOnwvA5MgCxYtO4kqJ0f6DeK3NJ2GQiFJJ9BQ= +github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250508071415-beab8643ef22/go.mod h1:FfaLDXN1ZXxyRpnskBqVIYkpkWDCzBmDgIO9xqLnxdQ= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250508071415-beab8643ef22 h1:zGAASPlhYqEetPLnnhm58+QAJXdzoAcMojQVr+8dFTo= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250508071415-beab8643ef22/go.mod h1:zkNShlkcHxsmnL0gKNbs0uyRL8lZonGKr5Km63uTLI0= github.com/devtron-labs/go-bitbucket v0.9.60-beta h1:VEx1jvDgdtDPS6A1uUFoaEi0l1/oLhbr+90xOwr6sDU= github.com/devtron-labs/go-bitbucket v0.9.60-beta/go.mod h1:GnuiCesvh8xyHeMCb+twm8lBR/kQzJYSKL28ZfObp1Y= github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e h1:U6UdYbW8a7xn5IzFPd8cywjVVPfutGJCudjePAfL/Hs= diff --git a/vendor/modules.txt b/vendor/modules.txt index 74cbb06ee4..dd7edae493 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -472,7 +472,7 @@ github.com/davecgh/go-spew/spew # github.com/deckarep/golang-set v1.8.0 ## explicit; go 1.17 github.com/deckarep/golang-set -# github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250507060105-0a50d1fb1d87 +# github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250508071415-beab8643ef22 ## explicit; go 1.21 github.com/devtron-labs/authenticator/apiToken github.com/devtron-labs/authenticator/client @@ -480,7 +480,7 @@ github.com/devtron-labs/authenticator/jwt github.com/devtron-labs/authenticator/middleware github.com/devtron-labs/authenticator/oidc github.com/devtron-labs/authenticator/password -# github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250507060105-0a50d1fb1d87 +# github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250508071415-beab8643ef22 ## explicit; go 1.21 github.com/devtron-labs/common-lib/async github.com/devtron-labs/common-lib/blob-storage @@ -2352,8 +2352,8 @@ xorm.io/xorm/log xorm.io/xorm/names xorm.io/xorm/schemas xorm.io/xorm/tags -# github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250507060105-0a50d1fb1d87 -# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250507060105-0a50d1fb1d87 +# github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250508071415-beab8643ef22 +# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250508071415-beab8643ef22 # github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 # github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5 # k8s.io/api => k8s.io/api v0.29.7 From 0c5717ac26d821a3180a36da1c9838bb8b1f7cc7 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Thu, 8 May 2025 17:47:16 +0530 Subject: [PATCH 11/14] misc: Updated the release creation action to create tag as well (#6439) * Update create-release.yml * Updated chart-sync.yaml * Update chart-sync.yaml * Update create-release.yml * Update chart-sync.yaml * Update chart-sync.yaml * Update create-release.yml * Update create-release.yml --- .github/workflows/create-release.yml | 72 +++++++++++++++++++++------- 1 file changed, 54 insertions(+), 18 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 14d1400a59..4510e750a8 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -1,18 +1,50 @@ -# This workflow is used to create a github release from last tag pushed +# This workflow is used to create tag and Release for OSS name: Create Release # Controls when the action will run. Workflow runs when manually triggered using the UI # or on push in charts directory of main branch. on: - workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "create-release" + + create-release-tag: + runs-on: ubuntu-latest + + env: + GITHUB_TOKENS: ${{ secrets.GH_SYSTEMSDT_TOKEN }} + GIT_CONFIG_EMAIL: ${{ secrets.GH_SYSTEMSDT_EMAIL }} + GIT_CONFIG_NAME: ${{ secrets.GH_SYSTEMSDT_USERNAME }} + GIT_USERNAME: ${{ secrets.GH_SYSTEMSDT_USERNAME }} + GIT_REPO: ${{ github.repository }} + REPO: https://github.com/devtron-labs/devtron + RELEASE_BRANCH: "main" + + steps: + + - name: Configure Git + run: | + echo $GITHUB_TOKENS > tokens.txt + gh auth login --with-token < tokens.txt + git config --global user.email "$GIT_CONFIG_EMAIL" + git config --global user.name "$GIT_CONFIG_NAME" + + - name: Clone repository and create tag + run: | + mkdir preci && cd preci + gh repo clone "$REPO" + cd $(basename "$REPO") + git checkout $RELEASE_BRANCH + git pull origin $RELEASE_BRANCH + NEXT_RELEASE_VERSION=v$(curl -s https://raw.githubusercontent.com/devtron-labs/charts/refs/heads/main/charts/devtron/Chart.yaml | grep 'appVersion' | awk '{print $2}') + # Create and push tag + git tag $NEXT_RELEASE_VERSION + git push -f https://$GIT_USERNAME:$GITHUB_TOKENS@github.com/$GIT_REPO $NEXT_RELEASE_VERSION + create-release: - # The type of runner that the job will run on + needs: create-release-tag runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job @@ -20,14 +52,19 @@ jobs: # Runs series of commands to create a release - name: create-release run: | - RELEASE_FILE_CONTENTS=$(curl -L -s "https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${RELEASE_BRANCH}/manifests/release.txt" ) - RELEASE_TYPE=$(echo $RELEASE_FILE_CONTENTS | awk '{print $1}') FILE_NAME=${FILE_NAME:=releasenotes.md} echo $RELEASE_TYPE echo $GITHUB_REPOSITORY + echo $RELEASE_BRANCH + version=$(curl -s https://raw.githubusercontent.com/devtron-labs/devtron/refs/heads/main/charts/devtron/Chart.yaml | grep "appVersion" | awk -F ': ' '{print $2}' ) + if [[ "$version" == *"-rc"* ]]; then + RELEASE_TYPE="beta" + else + RELEASE_TYPE="minor" + fi gh repo clone $GITHUB_REPOSITORY cd devtron - if [[ "$RELEASE_TYPE" == "stable" ]] + if [[ "$RELEASE_TYPE" == "major" || "$RELEASE_TYPE" == "minor" || "$RELEASE_TYPE" == "patch" ]] then tag=$(git tag --sort=committerdate | tail -1) echo $tag @@ -39,11 +76,9 @@ jobs: git config --global user.name "$GIT_CONFIG_NAME" rm -f $FILE_NAME touch $FILE_NAME - echo "## Bugs" > beta-releasenotes.md echo "## Enhancements" >> beta-releasenotes.md - echo "## Documentation" >> beta-releasenotes.md + echo "## Bugs" > beta-releasenotes.md echo "## Others" >> beta-releasenotes.md - echo "beta -1 $tag" > manifests/release.txt git add . git commit -am "Updated release-notes files" git push -f https://${GIT_CONFIG_NAME}:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY} release-bot @@ -52,9 +87,8 @@ jobs: git checkout -b release-bot git config --global user.email "$GIT_CONFIG_EMAIL" git config --global user.name "$GIT_CONFIG_NAME" - echo "## Bugs" > beta-releasenotes.md echo "## Enhancements" >> beta-releasenotes.md - echo "## Documentation" >> beta-releasenotes.md + echo "## Bugs" > beta-releasenotes.md echo "## Others" >> beta-releasenotes.md git add . git commit -am "Created release-notes files" @@ -62,16 +96,20 @@ jobs: echo "Not creating release due to beta" fi env: + RELEASE_BRANCH: "main" GH_TOKEN: ${{ secrets.GH_SYSTEMSDT_TOKEN }} - RELEASE_BRANCH: ${{ secrets.RELEASE_BRANCH }} GIT_CONFIG_NAME: ${{ vars.GH_SYSTEMSDT_USERNAME }} GIT_CONFIG_EMAIL: ${{ secrets.GH_SYSTEMSDT_EMAIL }} # Send notification on discord - name: discord-notify run: | - RELEASE_FILE_CONTENTS=$(curl -L -s "https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${RELEASE_BRANCH}/manifests/release.txt" ) - RELEASE_TYPE=$(echo $RELEASE_FILE_CONTENTS | awk '{print $1}') - if [[ "$RELEASE_TYPE" == "stable" ]] + version=$(curl -s https://raw.githubusercontent.com/devtron-labs/devtron/refs/heads/main/charts/devtron/Chart.yaml | grep "appVersion" | awk -F ': ' '{print $2}' ) + if [[ "$version" == *"-rc"* ]]; then + RELEASE_TYPE="beta" + else + RELEASE_TYPE="minor" + fi + if [[ "$RELEASE_TYPE" == "major" || "$RELEASE_TYPE" == "minor" || "$RELEASE_TYPE" == "patch" ]] then sudo apt install python3 python3-pip -y pip install discord-webhook @@ -84,5 +122,3 @@ jobs: then echo "Not sending notification due to beta" fi - env: - RELEASE_BRANCH: ${{ secrets.RELEASE_BRANCH }} From 0477a6ab21bcae28b5d097d9e1325d3a38218121 Mon Sep 17 00:00:00 2001 From: systemsdt <129372406+systemsdt@users.noreply.github.com> Date: Thu, 8 May 2025 18:00:07 +0530 Subject: [PATCH 12/14] release: PR for v1.5.1 (#6563) * Updated release-notes files * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated release notes * Updated latest image of devtron in devtron * Update devtron-images.txt.source * Updated latest image of hyperion in devtron * Update devtron-images.txt.source * Update beta-releasenotes.md * Updated the version in scripts --------- Co-authored-by: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> --- CHANGELOG/release-notes-v1.5.1.md | 6 ++++ charts/devtron/Chart.yaml | 2 +- charts/devtron/devtron-bom.yaml | 6 ++-- charts/devtron/values.yaml | 6 ++-- devtron-images.txt.source | 4 +-- manifests/install/devtron-installer.yaml | 2 +- manifests/installation-script | 2 +- manifests/release.txt | 2 +- releasenotes.md | 36 ++---------------------- 9 files changed, 21 insertions(+), 45 deletions(-) create mode 100644 CHANGELOG/release-notes-v1.5.1.md diff --git a/CHANGELOG/release-notes-v1.5.1.md b/CHANGELOG/release-notes-v1.5.1.md new file mode 100644 index 0000000000..fb6c27b636 --- /dev/null +++ b/CHANGELOG/release-notes-v1.5.1.md @@ -0,0 +1,6 @@ +## v1.5.1 + +## Bugs +- fix: stack manager page break on server api giving internal server error (#6556) + + diff --git a/charts/devtron/Chart.yaml b/charts/devtron/Chart.yaml index 42647cd02b..2dcb873a1c 100644 --- a/charts/devtron/Chart.yaml +++ b/charts/devtron/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: devtron-operator -appVersion: 1.5.0 +appVersion: 1.5.1 description: Chart to configure and install Devtron. Devtron is a Kubernetes Orchestration system. keywords: - Devtron diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index c5a3cebb09..7799e0c877 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -10,7 +10,7 @@ global: containerRegistry: "quay.io/devtron" extraManifests: [] installer: - release: "v1.5.0" + release: "v1.5.1" registry: "" image: "inception" tag: "473deaa4-185-21582" @@ -40,8 +40,8 @@ components: healthPort: 8080 devtron: registry: "" - image: "hyperion:e2daf69a-280-32104" - cicdImage: "devtron:e2daf69a-434-32096" + image: "hyperion:e4fc95a9-280-32767" + cicdImage: "devtron:e4fc95a9-434-32763" imagePullPolicy: IfNotPresent customOverrides: {} podSecurityContext: diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index c254e73d51..82e65a1e65 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -28,7 +28,7 @@ global: extraManifests: [] installer: repo: "devtron-labs/devtron" - release: "v1.5.0" + release: "v1.5.1" registry: "" image: inception tag: 473deaa4-185-21582 @@ -87,8 +87,8 @@ components: healthPort: 8080 devtron: registry: "" - image: "hyperion:e2daf69a-280-32104" - cicdImage: "devtron:e2daf69a-434-32096" + image: "hyperion:e4fc95a9-280-32767" + cicdImage: "devtron:e4fc95a9-434-32763" imagePullPolicy: IfNotPresent customOverrides: {} healthPort: 8080 diff --git a/devtron-images.txt.source b/devtron-images.txt.source index 6f420f5094..6367726db9 100644 --- a/devtron-images.txt.source +++ b/devtron-images.txt.source @@ -1,6 +1,6 @@ quay.io/devtron/image-scanner:c49b4aa5-141-32102 quay.io/devtron/inception:473deaa4-185-21582 -quay.io/devtron/hyperion:e2daf69a-280-32104 +quay.io/devtron/hyperion:e4fc95a9-280-32767 public.ecr.aws/docker/library/redis:7.0.5-alpine quay.io/argoproj/argocd:v2.5.2 quay.io/argoproj/workflow-controller:v3.4.3 @@ -11,7 +11,7 @@ quay.io/devtron/chart-sync:c49b4aa5-836-32103 quay.io/devtron/curl:7.73.0 quay.io/devtron/dashboard:0fc42ac3-690-32105 quay.io/devtron/devtron-utils:dup-chart-repo-v1.1.0 -quay.io/devtron/devtron:e67c3b76-434-30101 +quay.io/devtron/devtron:e4fc95a9-434-32763 quay.io/devtron/ci-runner:c49b4aa5-138-32101 quay.io/devtron/dex:v2.30.2 quay.io/devtron/git-sensor:c49b4aa5-200-32099 diff --git a/manifests/install/devtron-installer.yaml b/manifests/install/devtron-installer.yaml index e7c5b98414..5a61704349 100644 --- a/manifests/install/devtron-installer.yaml +++ b/manifests/install/devtron-installer.yaml @@ -4,4 +4,4 @@ metadata: name: installer-devtron namespace: devtroncd spec: - url: https://raw.githubusercontent.com/devtron-labs/devtron/v1.5.0/manifests/installation-script + url: https://raw.githubusercontent.com/devtron-labs/devtron/v1.5.1/manifests/installation-script diff --git a/manifests/installation-script b/manifests/installation-script index 08922660ec..d8f38c6909 100644 --- a/manifests/installation-script +++ b/manifests/installation-script @@ -1,4 +1,4 @@ -LTAG="v1.5.0"; +LTAG="v1.5.1"; REPO_RAW_URL="https://raw.githubusercontent.com/devtron-labs/devtron/"; log("executed devtron setup installation"); diff --git a/manifests/release.txt b/manifests/release.txt index 7444c53000..0de219bacc 100644 --- a/manifests/release.txt +++ b/manifests/release.txt @@ -1 +1 @@ -stable -1 v1.5.0 +beta -1 v1.5.0 diff --git a/releasenotes.md b/releasenotes.md index c716ae1779..fb6c27b636 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -1,36 +1,6 @@ - -====CRITICAL UPGRADE NOTICE - POSTGRES 11 TO 14==== +## v1.5.1 -IMPORTANT: This upgrade requires planned downtime -Before proceeding with the upgrade to version 1.5.0, please: - -1. Review the [Upgrade Guide](https://docs.devtron.ai/upgrade/devtron-upgrade-1.5.0) for all prerequisites. - -2. Deploy the [Devtron-Backup Chart](https://docs.devtron.ai/install/devtron-backup). - -3. Verify at least one successful backup has been completed. - -WARNING: Your Devtron will be unavailable during the entire prerequisite process until successful completion. - -For questions or assistance, our team is available on [Discord](https://discord.devtron.ai/). - +## Bugs +- fix: stack manager page break on server api giving internal server error (#6556) -## v1.5.0 -## Enhancements -- feat: Config Approval bypass v1 (for cm, cs and deployment template) (#6493) -- feat: Licensing changes (#6474) -## Bugs -- fix: Added support for IAM role S3 blob client (#6521) -- fix: Making tx independent of git sensor call (#6519) -- fix: Sql query memory issue (#6516) -- fix: Grafana data-source get API (#6503) -- fix: Made triggeredBy for CI & CD uniform (#6489) -- fix: HPA permission denied error (#6485) -- fix: Force abort for pre/post cd (#6475) -- fix: Optimisation in workflow status api (#6473) -- fix: Let user delete the container reg if the ref app was deleted (#6464) -## Others -- misc: Update the descriptions of env variables (#6499) -- misc: Patch api for user attribute (#6490) -- chore: Nil implementations fixed for user attribute in telemetry (#6497) From b98c0c330955451da1ffc5eee3b208126a827107 Mon Sep 17 00:00:00 2001 From: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com> Date: Thu, 8 May 2025 18:46:36 +0530 Subject: [PATCH 13/14] Update create-release.yml (#6564) --- .github/workflows/create-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 4510e750a8..936c32a766 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -76,8 +76,8 @@ jobs: git config --global user.name "$GIT_CONFIG_NAME" rm -f $FILE_NAME touch $FILE_NAME - echo "## Enhancements" >> beta-releasenotes.md - echo "## Bugs" > beta-releasenotes.md + echo "## Enhancements" > beta-releasenotes.md + echo "## Bugs" >> beta-releasenotes.md echo "## Others" >> beta-releasenotes.md git add . git commit -am "Updated release-notes files" @@ -87,8 +87,8 @@ jobs: git checkout -b release-bot git config --global user.email "$GIT_CONFIG_EMAIL" git config --global user.name "$GIT_CONFIG_NAME" - echo "## Enhancements" >> beta-releasenotes.md - echo "## Bugs" > beta-releasenotes.md + echo "## Enhancements" > beta-releasenotes.md + echo "## Bugs" >> beta-releasenotes.md echo "## Others" >> beta-releasenotes.md git add . git commit -am "Created release-notes files" From ba2928ec735061e2104d195d51809dfc945709b9 Mon Sep 17 00:00:00 2001 From: Vikram Singh Date: Tue, 13 May 2025 13:02:07 +0530 Subject: [PATCH 14/14] vendor update develop --- go.mod | 4 ++-- go.sum | 8 ++++---- vendor/modules.txt | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 9cf9b8da74..2c6a817b62 100644 --- a/go.mod +++ b/go.mod @@ -307,8 +307,8 @@ require ( replace ( github.com/argoproj/argo-workflows/v3 v3.5.13 => github.com/devtron-labs/argo-workflows/v3 v3.5.13 - github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250508071415-beab8643ef22 - github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250508071415-beab8643ef22 + github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250513072902-f8dc68360b7e + github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250513072902-f8dc68360b7e github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5 k8s.io/api => k8s.io/api v0.29.7 diff --git a/go.sum b/go.sum index c7bc2a46c2..02c54553f2 100644 --- a/go.sum +++ b/go.sum @@ -829,10 +829,10 @@ github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc h1:VRRKCwnzq github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/devtron-labs/argo-workflows/v3 v3.5.13 h1:3pINq0gXOSeTw2z/vYe+j80lRpSN5Rp/8mfQORh8SmU= github.com/devtron-labs/argo-workflows/v3 v3.5.13/go.mod h1:/vqxcovDPT4zqr4DjR5v7CF8ggpY1l3TSa2CIG3jmjA= -github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250508071415-beab8643ef22 h1:Eli2aNwOnwvA5MgCxYtO4kqJ0f6DeK3NJ2GQiFJJ9BQ= -github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250508071415-beab8643ef22/go.mod h1:FfaLDXN1ZXxyRpnskBqVIYkpkWDCzBmDgIO9xqLnxdQ= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250508071415-beab8643ef22 h1:zGAASPlhYqEetPLnnhm58+QAJXdzoAcMojQVr+8dFTo= -github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250508071415-beab8643ef22/go.mod h1:zkNShlkcHxsmnL0gKNbs0uyRL8lZonGKr5Km63uTLI0= +github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250513072902-f8dc68360b7e h1:drzFWo268a6d1nG3vrmripZQew0GVQ0MbcGWN08BW2o= +github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250513072902-f8dc68360b7e/go.mod h1:FfaLDXN1ZXxyRpnskBqVIYkpkWDCzBmDgIO9xqLnxdQ= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250513072902-f8dc68360b7e h1:oUUWj4//3Scw0lH+L37jch5u+CPMpYTaTVWZfuh5bi8= +github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250513072902-f8dc68360b7e/go.mod h1:zkNShlkcHxsmnL0gKNbs0uyRL8lZonGKr5Km63uTLI0= github.com/devtron-labs/go-bitbucket v0.9.60-beta h1:VEx1jvDgdtDPS6A1uUFoaEi0l1/oLhbr+90xOwr6sDU= github.com/devtron-labs/go-bitbucket v0.9.60-beta/go.mod h1:GnuiCesvh8xyHeMCb+twm8lBR/kQzJYSKL28ZfObp1Y= github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e h1:U6UdYbW8a7xn5IzFPd8cywjVVPfutGJCudjePAfL/Hs= diff --git a/vendor/modules.txt b/vendor/modules.txt index dd7edae493..20e79a7ac1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -472,7 +472,7 @@ github.com/davecgh/go-spew/spew # github.com/deckarep/golang-set v1.8.0 ## explicit; go 1.17 github.com/deckarep/golang-set -# github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250508071415-beab8643ef22 +# github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250513072902-f8dc68360b7e ## explicit; go 1.21 github.com/devtron-labs/authenticator/apiToken github.com/devtron-labs/authenticator/client @@ -480,7 +480,7 @@ github.com/devtron-labs/authenticator/jwt github.com/devtron-labs/authenticator/middleware github.com/devtron-labs/authenticator/oidc github.com/devtron-labs/authenticator/password -# github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250508071415-beab8643ef22 +# github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250513072902-f8dc68360b7e ## explicit; go 1.21 github.com/devtron-labs/common-lib/async github.com/devtron-labs/common-lib/blob-storage @@ -2352,8 +2352,8 @@ xorm.io/xorm/log xorm.io/xorm/names xorm.io/xorm/schemas xorm.io/xorm/tags -# github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250508071415-beab8643ef22 -# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250508071415-beab8643ef22 +# github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250513072902-f8dc68360b7e +# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250513072902-f8dc68360b7e # github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127 # github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5 # k8s.io/api => k8s.io/api v0.29.7