Skip to content

Commit b33032c

Browse files
took merge from develop
2 parents bf7c4bc + cb7f9ac commit b33032c

File tree

109 files changed

+4266
-2153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+4266
-2153
lines changed

Diff for: .github/ISSUE_TEMPLATE/bug.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "🐛 Bug Report"
22
description: "Submit a bug report to help us improve"
33
title: "Bug: "
4-
labels: [bug]
4+
labels: ["bug", "needs-triage"]
55
assignees: ["prakarsh-dt","vikramdevtron"]
66
projects: ["Devtron Features Prioritization"]
77
body:

Diff for: .github/ISSUE_TEMPLATE/documentation.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "📚 Documentation"
22
description: "Report an issue related to documentation"
33
assignees: ["ashokdevtron","prakarsh-dt"]
44
title: "Doc: "
5-
labels: [documentation]
5+
labels: ["documentation", "needs-triage"]
66
projects: ["Devtron Features Prioritization"]
77
body:
88
- type: markdown

Diff for: .github/ISSUE_TEMPLATE/feature.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🚀 Feature
22
description: "Submit a proposal for a new feature"
33
title: "Feature: "
4-
labels: ["enhancement"]
4+
labels: ["enhancement", "needs-triage"]
55
assignees: ["prakarsh-dt","nishant-d","abhibhaw"]
66
projects: ["Devtron Features Prioritization"]
77
body:

Diff for: .github/semantic.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ types:
1111
- doc
1212
- release
1313
- misc
14+
- sync

Diff for: .github/workflows/pr-issue-validator.yaml

+18-16
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- 'main'
1212
- 'release-**'
1313
- 'develop'
14+
- 'hotfix-v0**'
1415
# paths-ignore:
1516
# - 'docs/**'
1617
# - '.github/'
@@ -53,7 +54,7 @@ jobs:
5354
5455
set -x
5556
# Skip validation for documentation or chore PRs
56-
if [[ "$TITLE" =~ ^(doc:|docs:|chore:|misc:|Release:|release:) ]]; then
57+
if [[ "$TITLE" =~ ^(doc:|docs:|chore:|misc:|Release:|release:|Sync:|sync:) ]]; then
5758
echo "Skipping validation for docs/chore PR."
5859
echo "PR NUMBER-: $PRNUM "
5960
gh pr edit $PRNUM --remove-label "PR:Issue-verification-failed"
@@ -140,32 +141,33 @@ jobs:
140141
--header "authorization: Bearer ${{ secrets.GH_PR_VALIDATOR_TOKEN }}" \
141142
"$issue_api_url"| jq '.state'|tr -d \")
142143
fi
143-
echo "Issue Status: $issue_status"
144-
144+
echo "Issue Number : $issue_num Status: $issue_status"
145145
# Check if the issue is still open.
146-
if [[ "$issue_status" == open ]]; then
147-
echo "Issue #$issue_num is opened."
146+
# if [[ "$issue_status" == open ]]; then
147+
# echo "Issue #$issue_num is opened."
148148
if [[ $forked == true ]]; then
149149
echo "PR:Ready-to-Review, exiting gracefully"
150150
exit 0
151151
fi
152152
# Remove the 'Issue-verification-failed' label (if present) and add 'Ready-to-Review'.
153153
gh pr edit $PRNUM --remove-label "PR:Issue-verification-failed"
154154
gh pr edit $PRNUM --add-label "PR:Ready-to-Review"
155-
else
156-
echo "Issue #$issue_num is closed. Please link an open issue to proceed."
157-
if [[ $forked == true ]]; then
158-
echo "PR:Ready-to-Review, exiting gracefully"
159-
exit 0
160-
fi
155+
echo "PR:Ready-to-Review, exiting gracefully"
156+
exit 0
157+
# else
158+
# echo "Issue #$issue_num is closed. Please link an open issue to proceed."
159+
# if [[ $forked == true ]]; then
160+
# echo "PR:Ready-to-Review, exiting gracefully"
161+
# exit 0
162+
# fi
161163
# Add a comment to the PR indicating the issue is not linked correctly.
162-
gh pr comment $PRNUM --body "PR is linked to a closed issue. Please link an open issue to proceed."
164+
# gh pr comment $PRNUM --body "PR is linked to a closed issue. Please link an open issue to proceed."
163165

164166
# Add the 'Issue-verification-failed' label and remove 'Ready-to-Review'.
165-
gh pr edit $PRNUM --add-label "PR:Issue-verification-failed"
166-
gh pr edit $PRNUM --remove-label "PR:Ready-to-Review"
167-
exit 1
168-
fi
167+
# gh pr edit $PRNUM --add-label "PR:Issue-verification-failed"
168+
# gh pr edit $PRNUM --remove-label "PR:Ready-to-Review"
169+
# exit 1
170+
#fi
169171
else
170172
echo "Issue not found. Invalid URL or issue number."
171173
# Add a comment to the PR indicating the issue is not linked correctly.

Diff for: App.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package main
1919
import (
2020
"context"
2121
"crypto/tls"
22+
"errors"
2223
"fmt"
2324
"github.com/devtron-labs/common-lib/middlewares"
2425
pubsub "github.com/devtron-labs/common-lib/pubsub-lib"
@@ -137,7 +138,7 @@ func (app *App) Start() {
137138
err = server.ListenAndServe()
138139
}
139140
//err := http.ListenAndServe(fmt.Sprintf(":%d", port), auth.Authorizer(app.Enforcer, app.sessionManager)(app.MuxRouter.Router))
140-
if err != nil {
141+
if err != nil && !errors.Is(err, http.ErrServerClosed) {
141142
app.Logger.Errorw("error in startup", "err", err)
142143
os.Exit(2)
143144
}

Diff for: CHANGELOG/release-notes-v1.1.0.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
## v1.1.0
2+
3+
## Bugs
4+
- fix: Changes in labels of ref chart 4.20 (#6178)
5+
- fix: Fix cd-trigger-plugin (#6203)
6+
- fix: Bulk edit fix for global override (#6193)
7+
- fix: Panic handling for get workflow logs (#6168)
8+
- fix: User permissions not merging on same environments (#6167)
9+
- fix: Secret masking fix (#6136)
10+
- fix: Delete git repo without pipeline config (#6148)
11+
- fix: All modules installation fix (#6140)
12+
- fix: Update sql fix buildx (#6096)
13+
## Enhancements
14+
- feat: Support to trigger with same hash in CD trigger plugin (#6205)
15+
- feat: Patch merge strategy for cm cs and dt (#6115)
16+
- feat: Adds Github actions to add the label using slash command (#6126)
17+
- feat: Fetch all non deprecated plugins in list (#6135)
18+
- feat: Node k8s permissions (#6123)
19+
- feat: App details refactoring (#6104)
20+
## Others
21+
- misc: Main sync develop 20dec (#6210)
22+
- misc: migration for mandatory tag (#6208)
23+
- chore: Read service for team (#6201)
24+
- chore: Oss ent triggerService changes (#6189)
25+
- misc: Release candidate v0.25.0 (#6194)
26+
- chore: Panic fix (#6188)
27+
- chore: Panic fix installed app read service (#6185)
28+
- chore: Runtime params variable refactorings (#6183)
29+
- misc: Asset for plugin (#6184)
30+
- chore: Updating deployment status start and end time (#6171)
31+
- misc: Main sync develop 16dec (#6182)
32+
- chore: Adding logs in deployment trigger flow (#6180)
33+
- misc: Added cd workflow runner read service (#6175)
34+
- misc: Added the token that contains the permissions to read the org members (#6164)
35+
- misc: Refactor-plugin-images migrations (#6108)
36+
- misc: Addign new plugins images (#6145)
37+
- misc: Updated authenticator to c3254b79e386 (#6144)
38+
- misc: Adding pr validator for fork prs as gh command will not work (#6143)
39+
- misc: Adding validation for public repo (#6137)
40+
- misc: Update pull_request_template.md (#6134)
41+
- misc: Authenticator panic fix (#6131)
42+
- misc: Bulk update cm/cs name reference update fix (#6130)
43+
- misc: Cluster, project, environment read and beans (#6067)
44+
- chore: Use certificates data when InsecureSkipTLSVerify is false for a cluster in case of external run CI (#6100)
45+
- misc: main sync develop nov18 (#6107)
46+
- chore: Implemented Rbac enforcer in batch (#6103)
47+
- misc: Update pr-issue-validator.yaml (#6086)
48+
- misc: Sql query fixes (#6097)
49+
- misc: Kubecon 2024 oss sync (#6094)
50+
- chore: Depandabot fixes (#6070)
51+
- misc: Handler error while while helm deployment (#6082)
52+
53+

Diff for: Wire.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ import (
8282
"github.com/devtron-labs/devtron/client/argocdServer/certificate"
8383
cluster2 "github.com/devtron-labs/devtron/client/argocdServer/cluster"
8484
"github.com/devtron-labs/devtron/client/argocdServer/connection"
85+
"github.com/devtron-labs/devtron/client/argocdServer/repoCredsK8sClient"
8586
repocreds "github.com/devtron-labs/devtron/client/argocdServer/repocreds"
8687
repository2 "github.com/devtron-labs/devtron/client/argocdServer/repository"
8788
session2 "github.com/devtron-labs/devtron/client/argocdServer/session"
89+
"github.com/devtron-labs/devtron/client/argocdServer/version"
8890
"github.com/devtron-labs/devtron/client/cron"
8991
"github.com/devtron-labs/devtron/client/dashboard"
9092
eClient "github.com/devtron-labs/devtron/client/events"
@@ -117,7 +119,6 @@ import (
117119
repository9 "github.com/devtron-labs/devtron/pkg/appStore/installedApp/repository"
118120
deployment3 "github.com/devtron-labs/devtron/pkg/appStore/installedApp/service/FullMode/deployment"
119121
"github.com/devtron-labs/devtron/pkg/appWorkflow"
120-
"github.com/devtron-labs/devtron/pkg/argoRepositoryCreds"
121122
"github.com/devtron-labs/devtron/pkg/asyncProvider"
122123
"github.com/devtron-labs/devtron/pkg/attributes"
123124
"github.com/devtron-labs/devtron/pkg/build"
@@ -167,7 +168,6 @@ import (
167168
workflow3 "github.com/devtron-labs/devtron/pkg/workflow"
168169
"github.com/devtron-labs/devtron/pkg/workflow/dag"
169170
util2 "github.com/devtron-labs/devtron/util"
170-
"github.com/devtron-labs/devtron/util/argo"
171171
cron2 "github.com/devtron-labs/devtron/util/cron"
172172
"github.com/devtron-labs/devtron/util/rbac"
173173
"github.com/google/wire"
@@ -449,8 +449,8 @@ func InitializeApp() (*App, error) {
449449
wire.Bind(new(repository8.ImageTaggingRepository), new(*repository8.ImageTaggingRepositoryImpl)),
450450
imageTagging.NewImageTaggingServiceImpl,
451451
wire.Bind(new(imageTagging.ImageTaggingService), new(*imageTagging.ImageTaggingServiceImpl)),
452-
argocdServer.NewVersionServiceImpl,
453-
wire.Bind(new(argocdServer.VersionService), new(*argocdServer.VersionServiceImpl)),
452+
version.NewVersionServiceImpl,
453+
wire.Bind(new(version.VersionService), new(*version.VersionServiceImpl)),
454454

455455
router.NewGitProviderRouterImpl,
456456
wire.Bind(new(router.GitProviderRouter), new(*router.GitProviderRouterImpl)),
@@ -801,9 +801,9 @@ func InitializeApp() (*App, error) {
801801

802802
connection.NewArgoCDConnectionManagerImpl,
803803
wire.Bind(new(connection.ArgoCDConnectionManager), new(*connection.ArgoCDConnectionManagerImpl)),
804-
argo.NewArgoUserServiceImpl,
805-
wire.Bind(new(argo.ArgoUserService), new(*argo.ArgoUserServiceImpl)),
806-
//util2.GetEnvironmentVariables,
804+
//argo.NewArgoUserServiceImpl,
805+
//wire.Bind(new(argo.ArgoUserService), new(*argo.ArgoUserServiceImpl)),
806+
////util2.GetEnvironmentVariables,
807807
// AuthWireSet,
808808

809809
cron.NewCdApplicationStatusUpdateHandlerImpl,
@@ -950,8 +950,8 @@ func InitializeApp() (*App, error) {
950950
common.NewDeploymentConfigServiceImpl,
951951
wire.Bind(new(common.DeploymentConfigService), new(*common.DeploymentConfigServiceImpl)),
952952

953-
argoRepositoryCreds.NewRepositorySecret,
954-
wire.Bind(new(argoRepositoryCreds.RepositorySecret), new(*argoRepositoryCreds.RepositorySecretImpl)),
953+
repoCredsK8sClient.NewRepositorySecret,
954+
wire.Bind(new(repoCredsK8sClient.RepositoryCreds), new(*repoCredsK8sClient.RepositorySecretImpl)),
955955

956956
repocreds.NewServiceClientImpl,
957957
wire.Bind(new(repocreds.ServiceClient), new(*repocreds.ServiceClientImpl)),

Diff for: api/appStore/InstalledAppRestHandler.go

+9-14
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"github.com/devtron-labs/devtron/pkg/appStore/installedApp/service/FullMode/resource"
2828
util3 "github.com/devtron-labs/devtron/pkg/appStore/util"
2929
"github.com/devtron-labs/devtron/pkg/bean"
30+
"github.com/devtron-labs/devtron/pkg/cluster/read"
3031
"gopkg.in/go-playground/validator.v9"
3132
"net/http"
3233
"reflect"
@@ -50,7 +51,6 @@ import (
5051
"github.com/devtron-labs/devtron/pkg/auth/user"
5152
"github.com/devtron-labs/devtron/pkg/cluster"
5253
"github.com/devtron-labs/devtron/util"
53-
"github.com/devtron-labs/devtron/util/argo"
5454
"github.com/devtron-labs/devtron/util/rbac"
5555
"github.com/devtron-labs/devtron/util/response"
5656
"github.com/go-pg/pg"
@@ -88,11 +88,11 @@ type InstalledAppRestHandlerImpl struct {
8888
appStoreDeploymentService service.AppStoreDeploymentService
8989
appStoreDeploymentDBService service.AppStoreDeploymentDBService
9090
helmAppClient client.HelmAppClient
91-
argoUserService argo.ArgoUserService
9291
cdApplicationStatusUpdateHandler cron.CdApplicationStatusUpdateHandler
9392
installedAppRepository repository.InstalledAppRepository
9493
appCrudOperationService app2.AppCrudOperationService
9594
installedAppDeploymentTypeChangeService deploymentTypeChange.InstalledAppDeploymentTypeChangeService
95+
clusterReadService read.ClusterReadService
9696
}
9797

9898
func NewInstalledAppRestHandlerImpl(Logger *zap.SugaredLogger, userAuthService user.UserService,
@@ -102,11 +102,13 @@ func NewInstalledAppRestHandlerImpl(Logger *zap.SugaredLogger, userAuthService u
102102
chartGroupService chartGroup.ChartGroupService, validator *validator.Validate, clusterService cluster.ClusterService,
103103
acdServiceClient application.ServiceClient, appStoreDeploymentService service.AppStoreDeploymentService,
104104
appStoreDeploymentDBService service.AppStoreDeploymentDBService,
105-
helmAppClient client.HelmAppClient, argoUserService argo.ArgoUserService,
105+
helmAppClient client.HelmAppClient,
106+
106107
cdApplicationStatusUpdateHandler cron.CdApplicationStatusUpdateHandler,
107108
installedAppRepository repository.InstalledAppRepository,
108109
appCrudOperationService app2.AppCrudOperationService,
109-
installedAppDeploymentTypeChangeService deploymentTypeChange.InstalledAppDeploymentTypeChangeService) *InstalledAppRestHandlerImpl {
110+
installedAppDeploymentTypeChangeService deploymentTypeChange.InstalledAppDeploymentTypeChangeService,
111+
clusterReadService read.ClusterReadService) *InstalledAppRestHandlerImpl {
110112
return &InstalledAppRestHandlerImpl{
111113
Logger: Logger,
112114
userAuthService: userAuthService,
@@ -122,11 +124,11 @@ func NewInstalledAppRestHandlerImpl(Logger *zap.SugaredLogger, userAuthService u
122124
appStoreDeploymentService: appStoreDeploymentService,
123125
appStoreDeploymentDBService: appStoreDeploymentDBService,
124126
helmAppClient: helmAppClient,
125-
argoUserService: argoUserService,
126127
cdApplicationStatusUpdateHandler: cdApplicationStatusUpdateHandler,
127128
installedAppRepository: installedAppRepository,
128129
appCrudOperationService: appCrudOperationService,
129130
installedAppDeploymentTypeChangeService: installedAppDeploymentTypeChangeService,
131+
clusterReadService: clusterReadService,
130132
}
131133
}
132134
func (handler *InstalledAppRestHandlerImpl) FetchAppOverview(w http.ResponseWriter, r *http.Request) {
@@ -550,7 +552,7 @@ func (impl *InstalledAppRestHandlerImpl) DefaultComponentInstallation(w http.Res
550552
return
551553
}
552554
impl.Logger.Errorw("request payload, DefaultComponentInstallation", "clusterId", clusterId)
553-
cluster, err := impl.clusterService.FindById(clusterId)
555+
cluster, err := impl.clusterReadService.FindById(clusterId)
554556
if err != nil {
555557
impl.Logger.Errorw("service err, DefaultComponentInstallation", "error", err, "clusterId", clusterId)
556558
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
@@ -648,13 +650,6 @@ func (handler *InstalledAppRestHandlerImpl) DeleteArgoInstalledAppWithNonCascade
648650
return
649651
}
650652
//rback block ends here
651-
acdToken, err := handler.argoUserService.GetLatestDevtronArgoCdUserToken()
652-
if err != nil {
653-
handler.Logger.Errorw("error in getting acd token", "err", err)
654-
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
655-
return
656-
}
657-
ctx := context.WithValue(r.Context(), "token", acdToken)
658653
request := &appStoreBean.InstallAppVersionDTO{}
659654
request.InstalledAppId = installedAppId
660655
request.AppName = installedApp.AppName
@@ -668,7 +663,7 @@ func (handler *InstalledAppRestHandlerImpl) DeleteArgoInstalledAppWithNonCascade
668663
request.Namespace = installedApp.Namespace
669664
request.AcdPartialDelete = true
670665

671-
request, err = handler.appStoreDeploymentService.DeleteInstalledApp(ctx, request)
666+
request, err = handler.appStoreDeploymentService.DeleteInstalledApp(r.Context(), request)
672667
if err != nil {
673668
handler.Logger.Errorw("service err, DeleteInstalledApp", "err", err, "installAppId", installedAppId)
674669
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)

0 commit comments

Comments
 (0)