Skip to content

Commit 69084a0

Browse files
committed
Merge remote-tracking branch 'origin/develop' into chart-service-refactoring
2 parents cd3973f + c9cab70 commit 69084a0

File tree

321 files changed

+39508
-1723
lines changed

Some content is hidden

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

321 files changed

+39508
-1723
lines changed

CHANGELOG/release-notes-v1.7.0.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## v1.7.0
2+
3+
## Enhancements
4+
- feat: Added Cronjob chart 1-6-0 (#6650)
5+
- feat: wf logs (#6606)
6+
- feat: Enable selection of all CI pipelines at once when the Environment filter is applied in Notifications (#6526)
7+
## Bugs
8+
- fix: app workflow cd pipleine check (#6658)
9+
- fix: panic fixes on concurrent delete request (#6657)
10+
- fix: panic fix on concurrent deletion request (#6644)
11+
- fix: duplicate entries in deployment history without override (#6637)
12+
- fix: overriden pipeline ids filtering in case of material deletion (#6636)
13+
- fix: prevent deletion of git material used in overridden CI templates (#6633)
14+
- fix: ea mode fixes (#6624)
15+
- fix: stack Manager issues (#6619)
16+
- fix: Change ci to webhook fix (#6626)
17+
- fix: oci chart deployment values.yaml and requirement.yaml not compatible (#6620)
18+
- fix: panic fix installedApp type timeline update (#6614)
19+
- fix: workflow getting incorrectly deleted in case of webhook and unreachable cluster's cd pipeline (#6602)
20+
- fix: add safety checks to prevent index-out-of-range panics in CdHandler (#6597)
21+
- fix: reverted telemetry connection error (#6587)
22+
- fix: anomalies in deployment status timeline (#6569)
23+
- fix: scoped var complex type resolution not working in patch type overrides (#6572)
24+
## Others
25+
- chore: when a cluster event occurs, create config map instead of secret (#6607)
26+
- chore: Gpu workload chart (#6608)
27+
- misc: update sample dockerfiles use non-root user (UID 2002) and base images (#6512)
28+
- misc: wire in EA (#6616)
29+
- chore: removed multi-arch section from readme (#6613)
30+
- chore: git sensor grpc lb policy change (#6610)
31+
- misc: go routines wrapped into panic safe function (#6589)
32+
- chore: http transport service refactoring (#6592)
33+
- misc: GetConfigDBObj in tx (#6584)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
all: fetch-all-env build
44

5-
TARGET_BRANCH?=main
5+
TARGET_BRANCH?=develop
66
TAG?=$(shell bash -c 'git log --pretty=format:'%h' -n 1')
77
FLAGS=
88
ENVVAR=

Wire.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ import (
9393
"github.com/devtron-labs/devtron/client/cron"
9494
"github.com/devtron-labs/devtron/client/dashboard"
9595
eClient "github.com/devtron-labs/devtron/client/events"
96+
"github.com/devtron-labs/devtron/client/fluxcd"
9697
"github.com/devtron-labs/devtron/client/gitSensor"
9798
"github.com/devtron-labs/devtron/client/grafana"
9899
"github.com/devtron-labs/devtron/client/lens"
@@ -223,6 +224,7 @@ func InitializeApp() (*App, error) {
223224
policyGovernance.PolicyGovernanceWireSet,
224225
resourceScan.ScanningResultWireSet,
225226
executor.ExecutorWireSet,
227+
fluxcd.DeploymentWireSet,
226228
// -------wireset end ----------
227229
// -------
228230
gitSensor.GetConfig,
@@ -754,6 +756,10 @@ func InitializeApp() (*App, error) {
754756

755757
deployment3.NewFullModeDeploymentServiceImpl,
756758
wire.Bind(new(deployment3.FullModeDeploymentService), new(*deployment3.FullModeDeploymentServiceImpl)),
759+
760+
deployment3.NewFullModeFluxDeploymentServiceImpl,
761+
wire.Bind(new(deployment3.FullModeFluxDeploymentService), new(*deployment3.FullModeFluxDeploymentServiceImpl)),
762+
757763
// util2.NewGoJsonSchemaCustomFormatChecker,
758764

759765
//history starts

api/fluxApplication/FluxApplicationRestHandler.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ func (handler *FluxApplicationRestHandlerImpl) ListFluxApplications(w http.Respo
4545
var clusterIds []int
4646
var err error
4747

48+
noStream := v.Get("noStream") == "true"
49+
4850
//handling when the clusterIds string is empty ,it will not support the
4951
if len(clusterIdString) == 0 {
5052
handler.logger.Errorw("error in getting cluster ids", "error", err, "clusterIds", clusterIds)
@@ -57,7 +59,7 @@ func (handler *FluxApplicationRestHandlerImpl) ListFluxApplications(w http.Respo
5759
return
5860
}
5961
handler.logger.Debugw("extracted ClusterIds successfully ", "clusterIds", clusterIds)
60-
handler.fluxApplicationService.ListFluxApplications(r.Context(), clusterIds, w)
62+
handler.fluxApplicationService.ListFluxApplications(r.Context(), clusterIds, noStream, w)
6163
}
6264

6365
func (handler *FluxApplicationRestHandlerImpl) GetApplicationDetail(w http.ResponseWriter, r *http.Request) {

api/helm-app/gRPC/applist.pb.go

Lines changed: 655 additions & 633 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/helm-app/gRPC/applist.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ message FluxAppDetail{
8686
FluxApplication fluxApplication=1;
8787
FluxAppStatusDetail FluxAppStatusDetail = 2;
8888
ResourceTreeResponse resourceTreeResponse =3;
89+
string applicationStatus = 4;
90+
string lastObservedGeneration = 5;
8991
}
9092

9193
message FluxAppStatusDetail{

api/restHandler/ImageScanRestHandler.go

Lines changed: 45 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/devtron-labs/devtron/pkg/policyGovernance/security/imageScanning"
2424
securityBean "github.com/devtron-labs/devtron/pkg/policyGovernance/security/imageScanning/bean"
2525
security2 "github.com/devtron-labs/devtron/pkg/policyGovernance/security/imageScanning/repository"
26+
"github.com/devtron-labs/devtron/util/sliceUtil"
2627
"net/http"
2728
"strconv"
2829

@@ -104,6 +105,45 @@ func (impl ImageScanRestHandlerImpl) ScanExecutionList(w http.ResponseWriter, r
104105
return
105106
}
106107
token := r.Header.Get("token")
108+
isSuperAdmin := false
109+
if ok := impl.enforcer.Enforce(token, casbin.ResourceGlobal, casbin.ActionGet, "*"); ok {
110+
isSuperAdmin = true
111+
}
112+
var ids []int
113+
if isSuperAdmin {
114+
ids = sliceUtil.NewSliceFromFuncExec(filteredDeployInfoList, func(item *security2.ImageScanDeployInfo) int {
115+
return item.Id
116+
})
117+
} else {
118+
ids, err = impl.getAuthorisedImageScanDeployInfoIds(token, filteredDeployInfoList)
119+
if err != nil {
120+
impl.logger.Errorw("error in getting authorised image scan deploy info ids", "err", err)
121+
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
122+
return
123+
}
124+
}
125+
126+
if len(ids) == 0 {
127+
responseList := make([]*securityBean.ImageScanHistoryResponse, 0)
128+
common.WriteJsonResp(w, nil, &securityBean.ImageScanHistoryListingResponse{ImageScanHistoryResponse: responseList}, http.StatusOK)
129+
return
130+
}
131+
132+
results, err := impl.imageScanService.FetchScanExecutionListing(request, ids)
133+
if err != nil {
134+
impl.logger.Errorw("service err, ScanExecutionList", "err", err, "payload", request)
135+
if util.IsErrNoRows(err) {
136+
responseList := make([]*securityBean.ImageScanHistoryResponse, 0)
137+
common.WriteJsonResp(w, nil, &securityBean.ImageScanHistoryListingResponse{ImageScanHistoryResponse: responseList}, http.StatusOK)
138+
} else {
139+
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
140+
}
141+
return
142+
}
143+
common.WriteJsonResp(w, err, results, http.StatusOK)
144+
}
145+
146+
func (impl ImageScanRestHandlerImpl) getAuthorisedImageScanDeployInfoIds(token string, filteredDeployInfoList []*security2.ImageScanDeployInfo) ([]int, error) {
107147
var ids []int
108148
var appRBACObjects []string
109149
var envRBACObjects []string
@@ -119,8 +159,8 @@ func (impl ImageScanRestHandlerImpl) ScanExecutionList(w http.ResponseWriter, r
119159

120160
appObjects, envObjects, appIdtoApp, envIdToEnv, err := impl.enforcerUtil.GetAppAndEnvRBACNamesByAppAndEnvIds(IdToAppEnvPairs)
121161
if err != nil {
122-
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
123-
return
162+
impl.logger.Errorw("error in getting app and env rbac objects", "err", err)
163+
return nil, err
124164
}
125165

126166
for _, item := range filteredDeployInfoList {
@@ -136,8 +176,8 @@ func (impl ImageScanRestHandlerImpl) ScanExecutionList(w http.ResponseWriter, r
136176
} else if item.ScanObjectMetaId > 0 && (item.ObjectType == ObjectTypePod) {
137177
environments, err := impl.environmentService.GetByClusterId(item.ClusterId)
138178
if err != nil {
139-
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
140-
return
179+
impl.logger.Errorw("error in getting environments for cluster", "clusterId", item.ClusterId, "err", err)
180+
return nil, err
141181
}
142182
for _, environment := range environments {
143183
podObject := environment.EnvironmentIdentifier
@@ -163,25 +203,7 @@ func (impl ImageScanRestHandlerImpl) ScanExecutionList(w http.ResponseWriter, r
163203
}
164204
}
165205
}
166-
167-
if ids == nil || len(ids) == 0 {
168-
responseList := make([]*securityBean.ImageScanHistoryResponse, 0)
169-
common.WriteJsonResp(w, nil, &securityBean.ImageScanHistoryListingResponse{ImageScanHistoryResponse: responseList}, http.StatusOK)
170-
return
171-
}
172-
173-
results, err := impl.imageScanService.FetchScanExecutionListing(request, ids)
174-
if err != nil {
175-
impl.logger.Errorw("service err, ScanExecutionList", "err", err, "payload", request)
176-
if util.IsErrNoRows(err) {
177-
responseList := make([]*securityBean.ImageScanHistoryResponse, 0)
178-
common.WriteJsonResp(w, nil, &securityBean.ImageScanHistoryListingResponse{ImageScanHistoryResponse: responseList}, http.StatusOK)
179-
} else {
180-
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
181-
}
182-
return
183-
}
184-
common.WriteJsonResp(w, err, results, http.StatusOK)
206+
return ids, nil
185207
}
186208

187209
func (impl ImageScanRestHandlerImpl) FetchExecutionDetail(w http.ResponseWriter, r *http.Request) {

api/restHandler/app/appInfo/AppInfoRestHandler.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,23 @@ func (handler AppInfoRestHandlerImpl) GetAllLabels(w http.ResponseWriter, r *htt
8787
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
8888
return
8989
}
90+
propagatedLabelsOnlyStr := r.URL.Query().Get("showPropagatedOnly")
91+
92+
var propagatedLabelsOnlyBool *bool
93+
if propagatedLabelsOnlyStr != "" {
94+
if val, err := strconv.ParseBool(propagatedLabelsOnlyStr); err == nil {
95+
propagatedLabelsOnlyBool = &val
96+
} else {
97+
// Invalid boolean value provided, treat as null (nil)
98+
propagatedLabelsOnlyBool = nil
99+
handler.logger.Infow("Invalid 'showPropagatedOnly' value from quey params — defaulting to nil", propagatedLabelsOnlyStr)
100+
}
101+
}
102+
90103
token := r.Header.Get("token")
91104
results := make([]*bean.AppLabelDto, 0)
92-
labels, err := handler.appService.FindAll()
105+
106+
labels, err := handler.appService.FindAll(propagatedLabelsOnlyBool)
93107
if err != nil {
94108
handler.logger.Errorw("service err, GetAllLabels", "err", err)
95109
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)

api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,6 +2472,11 @@ func (handler *PipelineConfigRestHandlerImpl) ValidateExternalAppLinkRequest(w h
24722472
common.WriteJsonResp(w, err, response, http.StatusOK)
24732473
return
24742474
// handle helm deployment types
2475+
} else if request.DeploymentAppType == util.PIPELINE_DEPLOYMENT_TYPE_FLUX {
2476+
response := handler.pipelineBuilder.ValidateLinkFluxAppRequest(ctx, &request)
2477+
common.WriteJsonResp(w, err, response, http.StatusOK)
2478+
return
2479+
// handle helm deployment types
24752480
}
24762481
common.WriteJsonResp(w, errors.New("invalid deployment app type in request"), nil, http.StatusBadRequest)
24772482
return

charts/devtron/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: devtron-operator
3-
appVersion: 1.6.0
3+
appVersion: 1.7.0
44
description: Chart to configure and install Devtron. Devtron is a Kubernetes Orchestration system.
55
keywords:
66
- Devtron
@@ -11,7 +11,7 @@ keywords:
1111
- argocd
1212
- Hyperion
1313
engine: gotpl
14-
version: 0.22.94
14+
version: 0.22.95
1515
sources:
1616
- https://github.com/devtron-labs/charts
1717
dependencies:

0 commit comments

Comments
 (0)