Skip to content

Commit 74a4c04

Browse files
Merge pull request #6740 from devtron-labs/release-candidate-v0.40.0
sync: Release candidate v0.40.0
2 parents 286d64c + 6bb7bed commit 74a4c04

File tree

29 files changed

+600
-149
lines changed

29 files changed

+600
-149
lines changed

api/openapi/openapiClient/model_create_api_token_response.go

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

api/openapi/openapiClient/model_update_api_token_response.go

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

api/restHandler/UserAttributesRestHandler.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package restHandler
1919
import (
2020
"encoding/json"
2121
"errors"
22+
"github.com/devtron-labs/devtron/pkg/attributes/bean"
2223
"net/http"
2324

2425
"github.com/devtron-labs/devtron/api/restHandler/common"
@@ -108,15 +109,15 @@ func (handler *UserAttributesRestHandlerImpl) PatchUserAttributes(w http.Respons
108109
common.WriteJsonResp(w, nil, resp, http.StatusOK)
109110
}
110111

111-
func (handler *UserAttributesRestHandlerImpl) validateUserAttributesRequest(w http.ResponseWriter, r *http.Request, operation string) (*attributes.UserAttributesDto, bool) {
112+
func (handler *UserAttributesRestHandlerImpl) validateUserAttributesRequest(w http.ResponseWriter, r *http.Request, operation string) (*bean.UserAttributesDto, bool) {
112113
userId, err := handler.userService.GetLoggedInUser(r)
113114
if userId == 0 || err != nil {
114115
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
115116
return nil, false
116117
}
117118

118119
decoder := json.NewDecoder(r.Body)
119-
var dto attributes.UserAttributesDto
120+
var dto bean.UserAttributesDto
120121
err = decoder.Decode(&dto)
121122
if err != nil {
122123
handler.logger.Errorw("request err, "+operation, "err", err, "payload", dto)
@@ -158,7 +159,7 @@ func (handler *UserAttributesRestHandlerImpl) GetUserAttribute(w http.ResponseWr
158159
return
159160
}
160161

161-
dto := attributes.UserAttributesDto{}
162+
dto := bean.UserAttributesDto{}
162163

163164
emailId, err := handler.userService.GetActiveEmailById(userId)
164165
if err != nil {

client/argocdServer/ArgoClientWrapperService.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
2929
"github.com/caarlos0/env"
3030
"github.com/devtron-labs/common-lib/async"
31+
"github.com/devtron-labs/common-lib/utils/retryFunc"
3132
"github.com/devtron-labs/devtron/client/argocdServer/adapter"
3233
"github.com/devtron-labs/devtron/client/argocdServer/application"
3334
"github.com/devtron-labs/devtron/client/argocdServer/bean"
@@ -41,7 +42,6 @@ import (
4142
"github.com/devtron-labs/devtron/internal/util"
4243
"github.com/devtron-labs/devtron/pkg/deployment/gitOps/config"
4344
"github.com/devtron-labs/devtron/pkg/deployment/gitOps/git"
44-
"github.com/devtron-labs/devtron/util/retryFunc"
4545
"go.opentelemetry.io/otel"
4646
"go.uber.org/zap"
4747
"google.golang.org/grpc"

client/events/EventClient.go

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import (
3939
type EventClientConfig struct {
4040
DestinationURL string `env:"EVENT_URL" envDefault:"http://localhost:3000/notify" description:"Notifier service url"`
4141
NotificationMedium NotificationMedium `env:"NOTIFICATION_MEDIUM" envDefault:"rest" description:"notification medium"`
42-
EnableNotifierV2 bool `env:"ENABLE_NOTIFIER_V2" envDefault:"false" description:"enable notifier v2"`
4342
}
4443
type NotificationMedium string
4544

@@ -243,7 +242,7 @@ func (impl *EventRESTClientImpl) sendEvent(event Event) (bool, error) {
243242
impl.logger.Debugw("event before send", "event", event)
244243

245244
// Step 1: Create payload and destination URL based on config
246-
bodyBytes, destinationUrl, err := impl.createPayloadAndDestination(event)
245+
bodyBytes, destinationUrl, err := impl.createV2PayloadAndDestination(event)
247246
if err != nil {
248247
return false, err
249248
}
@@ -252,13 +251,6 @@ func (impl *EventRESTClientImpl) sendEvent(event Event) (bool, error) {
252251
return impl.deliverEvent(bodyBytes, destinationUrl)
253252
}
254253

255-
func (impl *EventRESTClientImpl) createPayloadAndDestination(event Event) ([]byte, string, error) {
256-
if impl.config.EnableNotifierV2 {
257-
return impl.createV2PayloadAndDestination(event)
258-
}
259-
return impl.createDefaultPayloadAndDestination(event)
260-
}
261-
262254
func (impl *EventRESTClientImpl) createV2PayloadAndDestination(event Event) ([]byte, string, error) {
263255
destinationUrl := impl.config.DestinationURL + "/v2"
264256

@@ -302,15 +294,6 @@ func (impl *EventRESTClientImpl) createV2PayloadAndDestination(event Event) ([]b
302294
return bodyBytes, destinationUrl, nil
303295
}
304296

305-
func (impl *EventRESTClientImpl) createDefaultPayloadAndDestination(event Event) ([]byte, string, error) {
306-
bodyBytes, err := json.Marshal(event)
307-
if err != nil {
308-
impl.logger.Errorw("error while marshaling event request", "err", err)
309-
return nil, "", err
310-
}
311-
return bodyBytes, impl.config.DestinationURL, nil
312-
}
313-
314297
func (impl *EventRESTClientImpl) processNotificationSettings(notificationSettings []repository.NotificationSettings) ([]*repository.NotificationSettingsBean, error) {
315298
notificationSettingsBean := make([]*repository.NotificationSettingsBean, 0)
316299
for _, item := range notificationSettings {

cmd/external-app/wire_gen.go

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

env_gen.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

env_gen.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
| VALIDATE_EXT_APP_CHART_TYPE | bool |false | validate external flux app chart | | false |
3030

3131

32+
## CI_BUILDX Related Environment Variables
33+
| Key | Type | Default Value | Description | Example | Deprecated |
34+
|-------|----------|-------------------|-------------------|-----------------------|------------------|
35+
| ASYNC_BUILDX_CACHE_EXPORT | bool |false | To enable async container image cache export | | false |
36+
| BUILDX_CACHE_MODE_MIN | bool |false | To set build cache mode to minimum in buildx | | false |
37+
| BUILDX_INTERRUPTION_MAX_RETRY | int |3 | Maximum number of retries for buildx builder interruption | | false |
38+
39+
3240
## CI_RUNNER Related Environment Variables
3341
| Key | Type | Default Value | Description | Example | Deprecated |
3442
|-------|----------|-------------------|-------------------|-----------------------|------------------|
@@ -140,10 +148,8 @@
140148
| ARGO_GIT_COMMIT_RETRY_DELAY_ON_CONFLICT | int |1 | Delay on retrying the maifest commit the on gitops | | false |
141149
| ARGO_REPO_REGISTER_RETRY_COUNT | int |4 | Retry count for registering a GitOps repository to ArgoCD | 3 | false |
142150
| ARGO_REPO_REGISTER_RETRY_DELAY | int |5 | Delay (in Seconds) between the retries for registering a GitOps repository to ArgoCD | 5 | false |
143-
| ASYNC_BUILDX_CACHE_EXPORT | bool |false | To enable async container image cache export | | false |
144151
| BATCH_SIZE | int |5 | there is feature to get URL's of services/ingresses. so to extract those, we need to parse all the servcie and ingress objects of the application. this BATCH_SIZE flag controls the no of these objects get parsed in one go. | | false |
145152
| BLOB_STORAGE_ENABLED | bool |false | | | false |
146-
| BUILDX_CACHE_MODE_MIN | bool |false | To set build cache mode to minimum in buildx | | false |
147153
| CD_HOST | string |localhost | Host for the devtron stack | | false |
148154
| CD_NAMESPACE | string |devtroncd | | | false |
149155
| CD_PORT | string |8000 | Port for pre/post-cd | | false |
@@ -181,7 +187,6 @@
181187
| ECR_REPO_NAME_PREFIX | string |test/ | Prefix for ECR repo to be created in does not exist | | false |
182188
| ENABLE_ASYNC_ARGO_CD_INSTALL_DEVTRON_CHART | bool |false | To enable async installation of gitops application | | false |
183189
| ENABLE_ASYNC_INSTALL_DEVTRON_CHART | bool |false | To enable async installation of no-gitops application | | false |
184-
| ENABLE_NOTIFIER_V2 | bool |false | enable notifier v2 | | false |
185190
| EPHEMERAL_SERVER_VERSION_REGEX | string |v[1-9]\.\b(2[3-9]\|[3-9][0-9])\b.* | ephemeral containers support version regex that is compared with k8sServerVersion | | false |
186191
| EVENT_URL | string |http://localhost:3000/notify | Notifier service url | | false |
187192
| EXECUTE_WIRE_NIL_CHECKER | bool |false | checks for any nil pointer in wire.go | | false |
@@ -201,6 +206,7 @@
201206
| GRAFANA_PORT | string |8090 | Port for grafana micro-service | | false |
202207
| GRAFANA_URL | string | | Host URL for the grafana dashboard | | false |
203208
| GRAFANA_USERNAME | string |admin | Username for grafana | | false |
209+
| HIDE_API_TOKENS | bool |false | Boolean flag for should the api tokens generated be hidden from the UI | | false |
204210
| HIDE_IMAGE_TAGGING_HARD_DELETE | bool |false | Flag to hide the hard delete option in the image tagging service | | false |
205211
| IGNORE_AUTOCOMPLETE_AUTH_CHECK | bool |false | flag for ignoring auth check in autocomplete apis. | | false |
206212
| INSTALLED_MODULES | | | List of installed modules given in helm values/yaml are written in cm and used by devtron to know which modules are given | security.trivy,security.clair | false |

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ require (
324324
replace (
325325
github.com/argoproj/argo-workflows/v3 v3.5.13 => github.com/devtron-labs/argo-workflows/v3 v3.5.13
326326
github.com/cyphar/filepath-securejoin v0.4.1 => github.com/cyphar/filepath-securejoin v0.3.6 // indirect
327-
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250707110047-5ce1ce150a76
328-
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250707110047-5ce1ce150a76
327+
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250708133124-d0285b3c0de2
328+
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250708133124-d0285b3c0de2
329329
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1
330330
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,10 @@ github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc h1:VRRKCwnzq
237237
github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
238238
github.com/devtron-labs/argo-workflows/v3 v3.5.13 h1:3pINq0gXOSeTw2z/vYe+j80lRpSN5Rp/8mfQORh8SmU=
239239
github.com/devtron-labs/argo-workflows/v3 v3.5.13/go.mod h1:/vqxcovDPT4zqr4DjR5v7CF8ggpY1l3TSa2CIG3jmjA=
240-
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250707110047-5ce1ce150a76 h1:382wKs9a8Fpz2wK5egWhLKpI4a5i2iThvcWVL1Y6Rvk=
241-
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250707110047-5ce1ce150a76/go.mod h1:9LCkYfiWaEKIBkmxw9jX1GujvEMyHwmDtVsatffAkeU=
242-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250707110047-5ce1ce150a76 h1:Oxx073Vec7hW3JPNsWsZGyC3gULHVluLKTLEfXgjfeY=
243-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250707110047-5ce1ce150a76/go.mod h1:/Ciy9tD9OxZOWBDPIasM448H7uvSo4+ZJiExpfwBZpA=
240+
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250708133124-d0285b3c0de2 h1:DVZudmuKWuWGEUN3DoMpYDBGIk7dWQSdubx8ixKZZh4=
241+
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250708133124-d0285b3c0de2/go.mod h1:9LCkYfiWaEKIBkmxw9jX1GujvEMyHwmDtVsatffAkeU=
242+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250708133124-d0285b3c0de2 h1:g2Zee/3lL8lOtOieDDnHYD/h00JPFpEdP6uu3FAzKx4=
243+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250708133124-d0285b3c0de2/go.mod h1:/Ciy9tD9OxZOWBDPIasM448H7uvSo4+ZJiExpfwBZpA=
244244
github.com/devtron-labs/go-bitbucket v0.9.60-beta h1:VEx1jvDgdtDPS6A1uUFoaEi0l1/oLhbr+90xOwr6sDU=
245245
github.com/devtron-labs/go-bitbucket v0.9.60-beta/go.mod h1:GnuiCesvh8xyHeMCb+twm8lBR/kQzJYSKL28ZfObp1Y=
246246
github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e h1:U6UdYbW8a7xn5IzFPd8cywjVVPfutGJCudjePAfL/Hs=

0 commit comments

Comments
 (0)