Skip to content

Commit dd3b25e

Browse files
committed
main sync develop and vendor update
2 parents d978a44 + e070ba2 commit dd3b25e

File tree

16 files changed

+70
-37
lines changed

16 files changed

+70
-37
lines changed

client/argocdServer/connection/Connection.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,11 @@ func (impl *ArgoCDConnectionManagerImpl) getConnectionWithToken(connectionConfig
155155
}
156156

157157
func (impl *ArgoCDConnectionManagerImpl) getLatestDevtronArgoCdUserToken(grpcConfig *bean.ArgoGRPCConfig) (string, error) {
158-
gitOpsConfigurationStatus, err := impl.gitOpsConfigReadService.IsGitOpsConfigured()
159-
if err != nil {
160-
impl.logger.Errorw("error while checking if gitOps is configured", "err", err)
161-
return "", err
162-
}
163-
if !gitOpsConfigurationStatus.IsGitOpsConfigured {
164-
//here acd token only required in context for argo cd calls
165-
return "", nil
166-
}
158+
var (
159+
k8sClient *v1.CoreV1Client
160+
err error
161+
)
167162
authConfig := grpcConfig.AuthConfig
168-
var k8sClient *v1.CoreV1Client
169163
if authConfig.ClusterId == bean2.DefaultClusterId {
170164
k8sClient, err = impl.k8sUtil.GetCoreV1ClientInCluster()
171165
if err != nil {

cmd/external-app/wire_gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ require gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
288288

289289
replace (
290290
github.com/argoproj/argo-workflows/v3 v3.5.10 => github.com/devtron-labs/argo-workflows/v3 v3.5.13
291-
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250113062708-5533d8b81d91
292-
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250113062708-5533d8b81d91
291+
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250116095544-33cda6744e2e
292+
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e
293293
github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127
294294
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5
295295
k8s.io/api => k8s.io/api v0.29.7

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -792,10 +792,10 @@ github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc h1:VRRKCwnzq
792792
github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
793793
github.com/devtron-labs/argo-workflows/v3 v3.5.13 h1:3pINq0gXOSeTw2z/vYe+j80lRpSN5Rp/8mfQORh8SmU=
794794
github.com/devtron-labs/argo-workflows/v3 v3.5.13/go.mod h1:/vqxcovDPT4zqr4DjR5v7CF8ggpY1l3TSa2CIG3jmjA=
795-
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250113062708-5533d8b81d91 h1:mLG5ANeVjaDDDdvG+jp5cwPEISORIoGn3kf6M7h9K2U=
796-
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250113062708-5533d8b81d91/go.mod h1:5lv4Wfj5ERhhvDGXe2IeES6qxjvUVCcohaRwKnWBMNo=
797-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250113062708-5533d8b81d91 h1:YGpfHCkFr4YwRq3C1M8bmU+BmBFey66ZFx9MS4/jz/4=
798-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250113062708-5533d8b81d91/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA=
795+
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250116095544-33cda6744e2e h1:EzvuC1ivpcPP/a/gI6Mn46MidF65tqQpgHb1RrxwdY8=
796+
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250116095544-33cda6744e2e/go.mod h1:5lv4Wfj5ERhhvDGXe2IeES6qxjvUVCcohaRwKnWBMNo=
797+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e h1:VoqeZNqIWXGPhyNb8VMVJycOebYb96mGnIm3hejL/ro=
798+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250116095544-33cda6744e2e/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA=
799799
github.com/devtron-labs/go-bitbucket v0.9.60-beta h1:VEx1jvDgdtDPS6A1uUFoaEi0l1/oLhbr+90xOwr6sDU=
800800
github.com/devtron-labs/go-bitbucket v0.9.60-beta/go.mod h1:GnuiCesvh8xyHeMCb+twm8lBR/kQzJYSKL28ZfObp1Y=
801801
github.com/devtron-labs/protos v0.0.3-0.20240802105333-92ee9bb85d80 h1:xwbTeijNTf4/j1v+tSfwVqwLVnReas/NqEKeQHvSTys=

pkg/infraConfig/service/infraConfigService.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func (impl *InfraConfigServiceImpl) loadDefaultProfile() error {
228228
impl.logger.Errorw("error in fetching platforms from db", "error", err)
229229
return err
230230
}
231-
231+
232232
runnerPlatFormMapping := &repository.ProfilePlatformMapping{}
233233
//one platform is expected
234234
if len(platformsFromDb) > 0 {

pkg/policyGovernance/security/imageScanning/ImageScanService.go

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package imageScanning
1919
import (
2020
"context"
2121
bean4 "github.com/devtron-labs/devtron/api/bean"
22+
"github.com/devtron-labs/devtron/internal/util"
2223
"github.com/devtron-labs/devtron/pkg/cluster/environment"
2324
"github.com/devtron-labs/devtron/pkg/cluster/environment/bean"
2425
bean2 "github.com/devtron-labs/devtron/pkg/deployment/trigger/devtronApps/bean"
@@ -326,9 +327,13 @@ func (impl ImageScanServiceImpl) FetchExecutionDetailResult(request *bean3.Image
326327
}
327328
imageScanResponse.Image = ciArtifact.Image
328329
scanExecution, err := impl.scanHistoryRepository.FindByImageAndDigestWithHistoryMapping(ciArtifact.ImageDigest, ciArtifact.Image)
329-
if err != nil {
330+
if err != nil && !util.IsErrNoRows(err) {
330331
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
331332
return nil, err
333+
} else if util.IsErrNoRows(err) {
334+
// image not scanned
335+
imageScanResponse.Scanned = false
336+
return imageScanResponse, nil
332337
}
333338
ciPipeline, err := impl.ciPipelineRepository.FindByIdIncludingInActive(ciArtifact.PipelineId)
334339
if err != nil {
@@ -779,14 +784,16 @@ func (impl ImageScanServiceImpl) fetchLatestArtifactMetadataDeployedOnAllEnvsAcr
779784
}
780785
appEnvToCiArtifactMap[bean3.NewAppEnvMetadata(item.AppId, item.EnvId)] = ciArtifactId
781786
}
782-
parentCiArtifacts, err := impl.ciArtifactRepository.GetByIds(parentCiArtifactIds)
783-
if err != nil {
784-
impl.Logger.Errorw("error in getting artifacts by ids", "ids", parentCiArtifactIds, "err", err)
785-
return nil, nil, err
786-
}
787-
for _, parentCiArtifact := range parentCiArtifacts {
788-
// for linked ci case
789-
ciArtifactIdToScannedMap[parentCiArtifact.Id] = parentCiArtifact.Scanned
787+
if len(parentCiArtifactIds) > 0 {
788+
parentCiArtifacts, err := impl.ciArtifactRepository.GetByIds(parentCiArtifactIds)
789+
if err != nil {
790+
impl.Logger.Errorw("error in getting artifacts by ids", "ids", parentCiArtifactIds, "err", err)
791+
return nil, nil, err
792+
}
793+
for _, parentCiArtifact := range parentCiArtifacts {
794+
// for linked ci case
795+
ciArtifactIdToScannedMap[parentCiArtifact.Id] = parentCiArtifact.Scanned
796+
}
790797
}
791798
return appEnvToCiArtifactMap, ciArtifactIdToScannedMap, nil
792799
}

scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ spec:
186186
protocol: TCP
187187
name: envoy-admin
188188
{{- range $index, $element := .Values.ContainerPort }}
189-
- name: {{ $element.name}}
189+
- name: envoy-{{ $element.name}}
190190
containerPort: {{ $element.envoyPort | default (add 8790 $index) }}
191191
protocol: TCP
192192
{{- end }}

scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/service.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ spec:
3333
{{- end }}
3434
{{- if .targetPort }}
3535
targetPort: {{ .targetPort }}
36+
{{- else if $.Values.appMetrics }}
37+
targetPort: envoy-{{ .name }}
3638
{{- else }}
3739
targetPort: {{ .name }}
3840
{{- end }}
@@ -69,7 +71,13 @@ spec:
6971
{{- else }}
7072
- port: {{ .port }}
7173
{{- end }}
74+
{{- if .targetPort }}
75+
targetPort: {{ .targetPort }}
76+
{{- else if $.Values.appMetrics }}
77+
targetPort: envoy-{{ .name }}
78+
{{- else }}
7279
targetPort: {{ .name }}
80+
{{- end }}
7381
protocol: TCP
7482
name: {{ .name }}
7583
{{- end }}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ spec:
513513
protocol: TCP
514514
name: envoy-admin
515515
{{- range $index, $element := .Values.ContainerPort }}
516-
- name: {{ $element.name}}
516+
- name: envoy-{{ $element.name}}
517517
containerPort: {{ $element.envoyPort | default (add 8790 $index) }}
518518
protocol: TCP
519519
{{- end }}
@@ -1123,7 +1123,7 @@ spec:
11231123
protocol: TCP
11241124
name: envoy-admin
11251125
{{- range $index, $element := .Values.ContainerPort }}
1126-
- name: {{ $element.name}}
1126+
- name: envoy-{{ $element.name}}
11271127
containerPort: {{ $element.envoyPort | default (add 8790 $index) }}
11281128
protocol: TCP
11291129
{{- end }}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/service.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ spec:
3333
{{- end }}
3434
{{- if .targetPort }}
3535
targetPort: {{ .targetPort }}
36+
{{- else if $.Values.appMetrics }}
37+
targetPort: envoy-{{ .name }}
3638
{{- else }}
3739
targetPort: {{ .name }}
3840
{{- end }}
@@ -80,7 +82,13 @@ spec:
8082
{{- else }}
8183
- port: {{ .port }}
8284
{{- end }}
85+
{{- if .targetPort }}
86+
targetPort: {{ .targetPort }}
87+
{{- else if $.Values.appMetrics }}
88+
targetPort: envoy-{{ .name }}
89+
{{- else }}
8390
targetPort: {{ .name }}
91+
{{- end }}
8492
protocol: TCP
8593
name: {{ .name }}
8694
{{- end }}

0 commit comments

Comments
 (0)