Skip to content

Commit d2813c8

Browse files
committed
Merge branch 'develop' into argo-cd-corrupt-data-fix
2 parents 900968f + f390af5 commit d2813c8

File tree

9 files changed

+62
-40
lines changed

9 files changed

+62
-40
lines changed

USERS.md

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,34 @@ As the community grows, we want to keep track of the users and organizations usi
55
Currently, Devtron is being used by the following organizations:
66

77
1. [73strings](https://www.73strings.com/)
8-
2. [Ather Energy](https://www.atherenergy.com/)
9-
3. [BharatPe](https://bharatpe.com/)
10-
4. [Birdeye](https://birdeye.com/)
11-
5. [Bluecopa](https://www.bluecopa.com/)
12-
6. [Chitale Bandhu](https://www.chitalebandhu.in/)
13-
7. [Centricity](https://centricity.co.in/)
14-
8. [Delhivery](https://www.delhivery.com/)
15-
9. [KHELGroup](https://thekhelgroup.com/)
16-
10. [Lemnisk](https://www.lemnisk.co/)
17-
11. [OTPLess](https://otpless.com/)
18-
12. [Spinny](https://www.spinny.com/)
19-
13. [Tata 1Mg](https://www.1mg.com/)
20-
14. [TravClan](https://www.travclan.com/)
21-
15. [Xoxoday](https://www.xoxoday.com/)
22-
23-
24-
8+
2. [Apica](https://www.apica.io/)
9+
3. [Ather Energy](https://www.atherenergy.com/)
10+
4. [BharatPe](https://bharatpe.com/)
11+
5. [Birdeye](https://birdeye.com/)
12+
6. [Bluecopa](https://www.bluecopa.com/)
13+
7. [Careers 360](https://www.careers360.com/)
14+
8. [Chitale Bandhu](https://www.chitalebandhu.in/)
15+
9. [Comcast](https://corporate.comcast.com/)
16+
10. [Delhivery](https://www.delhivery.com/)
17+
11. [Emplus](https://www.empuls.io/)
18+
12. [EMT Madrid](https://www.emtmadrid.es/Home)
19+
13. [Encircle Marketing](https://encircle-marketing.com/)
20+
14. [FTL Express](https://www.ftl-express.com/)
21+
15. [Genwise](https://www.genwise.club/)
22+
16. [HCL Tech](https://www.hcltech.com/)
23+
17. [Indiamart](https://www.indiamart.com/)
24+
18. [IPCortex](https://ipcortex.co.uk/)
25+
19. [Jivi.ai](https://www.jivi.ai/)
26+
20. [KHELGroup](https://thekhelgroup.com/)
27+
21. [Kenny LLC](https://kennyl.dev/)
28+
22. [Lemnisk](https://www.lemnisk.co/)
29+
23. [MobileID](https://www.mobileid.ch/en)
30+
24. [OTPLess](https://otpless.com/)
31+
25. [University of Albany](https://www.albany.edu/)
32+
26. [Shiprocket](https://www.shiprocket.in/)
33+
27. [Spinny](https://www.spinny.com/)
34+
28. [Tata 1Mg](https://www.1mg.com/)
35+
29. [Texas Tech University](https://www.ttu.edu/)
36+
30. [TravClan](https://www.travclan.com/)
37+
31. [Xoxoday](https://www.xoxoday.com/)
38+
32. [Zupee](https://www.zupee.com/)

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-20250212120117-7e3d667325aa
292-
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250212120117-7e3d667325aa
291+
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250213131231-78d5428a91dd
292+
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250213131231-78d5428a91dd
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-20250212120117-7e3d667325aa h1:nPRI806dXm2ZAr43D0wLKU9x7Hca2HS92PKKR24eI7s=
796-
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250212120117-7e3d667325aa/go.mod h1:5lv4Wfj5ERhhvDGXe2IeES6qxjvUVCcohaRwKnWBMNo=
797-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250212120117-7e3d667325aa h1:K4+f7607iFdQFndqva4P6T5dACC9d840hPwmiVkcnAQ=
798-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250212120117-7e3d667325aa/go.mod h1:1QJJLpgJSkb5Jm9xPeKAk+kXb0QgBOOOgJj0cgYhAVA=
795+
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250213131231-78d5428a91dd h1:ZJ7N6UNrb1CVXhFSKtCkjlz63SxDrMp3z28CDl/xyeQ=
796+
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250213131231-78d5428a91dd/go.mod h1:5lv4Wfj5ERhhvDGXe2IeES6qxjvUVCcohaRwKnWBMNo=
797+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250213131231-78d5428a91dd h1:9f19EbIVaWIEI5lPXL3ybB88FFZSRvcT5RmbAINr31M=
798+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250213131231-78d5428a91dd/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/eventProcessor/in/WorkflowEventProcessorService.go

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -444,12 +444,14 @@ func (impl *WorkflowEventProcessorImpl) SubscribeCDWorkflowStatusUpdate() error
444444
impl.logger.Error("err", err)
445445
return
446446
}
447+
447448
if stateChanged {
448449
wfr, err := impl.cdWorkflowRepository.FindWorkflowRunnerById(wfrId)
449450
if err != nil {
450451
impl.logger.Errorw("could not get wf runner", "wfrId", wfrId, "err", err)
451452
return
452453
}
454+
453455
if wfrStatus == string(v1alpha1.NodeFailed) || wfrStatus == string(v1alpha1.NodeError) {
454456
if len(wfr.ImagePathReservationIds) > 0 {
455457
err := impl.cdHandler.DeactivateImageReservationPathsOnFailure(wfr.ImagePathReservationIds)
@@ -458,22 +460,28 @@ func (impl *WorkflowEventProcessorImpl) SubscribeCDWorkflowStatusUpdate() error
458460
}
459461
}
460462
}
461-
if wfrStatus == string(v1alpha1.NodeSucceeded) || wfrStatus == string(v1alpha1.NodeFailed) || wfrStatus == string(v1alpha1.NodeError) {
462-
eventType := eventUtil.EventType(0)
463-
if wfrStatus == string(v1alpha1.NodeSucceeded) {
464-
eventType = eventUtil.Success
465-
} else if wfrStatus == string(v1alpha1.NodeFailed) || wfrStatus == string(v1alpha1.NodeError) {
466-
eventType = eventUtil.Fail
467-
}
468463

464+
wfStatusInEvent := string(wfStatus.Phase)
465+
if wfStatusInEvent == string(v1alpha1.NodeSucceeded) || wfStatusInEvent == string(v1alpha1.NodeFailed) || wfStatusInEvent == string(v1alpha1.NodeError) {
466+
// the re-trigger should only happen when we get a pod deleted event.
469467
if wfr != nil && executors.CheckIfReTriggerRequired(wfrStatus, wfStatus.Message, wfr.Status) {
470468
err = impl.workflowDagExecutor.HandleCdStageReTrigger(wfr)
471469
if err != nil {
472-
//check if this log required or not
470+
// check if this log required or not
473471
impl.logger.Errorw("error in HandleCdStageReTrigger", "workflowRunnerId", wfr.Id, "workflowStatus", wfrStatus, "workflowStatusMessage", wfStatus.Message, "error", err)
474472
}
475473
impl.logger.Debugw("re-triggered cd stage", "workflowRunnerId", wfr.Id, "workflowStatus", wfrStatus, "workflowStatusMessage", wfStatus.Message)
476474
} else {
475+
// we send this notification on *workflow_runner* status, both success and failure
476+
// during workflow runner failure, particularly when failure occurred due to pod deletion , we get two events from kubewatch.
477+
// event1: with failure status + exit-code [need to send notification]
478+
// event2: with failure status + pod deletion message [skip notification]
479+
eventType := eventUtil.EventType(0)
480+
if wfStatusInEvent == string(v1alpha1.NodeSucceeded) {
481+
eventType = eventUtil.Success
482+
} else if wfStatusInEvent == string(v1alpha1.NodeFailed) || wfStatusInEvent == string(v1alpha1.NodeError) {
483+
eventType = eventUtil.Fail
484+
}
477485
impl.sendPrePostCdNotificationEvent(eventType, wfr)
478486
}
479487
}

pkg/pipeline/CdHandler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ func (impl *CdHandlerImpl) UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus
312312
if string(v1alpha1.NodeError) == savedWorkflow.Status || string(v1alpha1.NodeFailed) == savedWorkflow.Status {
313313
impl.Logger.Warnw("cd stage failed for workflow: ", "wfId", savedWorkflow.Id)
314314
}
315+
return savedWorkflow.Id, savedWorkflow.Status, true, nil
315316
}
316317
return savedWorkflow.Id, savedWorkflow.Status, false, nil
317318
}

pkg/pipeline/workflowStatus/WorkflowStageStatusService.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (impl *WorkFlowStageStatusServiceImpl) updatePodStages(currentWorkflowStage
134134
stage.Status = bean2.WORKFLOW_STAGE_STATUS_SUCCEEDED
135135
stage.EndTime = time.Now().Format(bean3.LayoutRFC3339)
136136
}
137-
case string(v1alpha1.NodeFailed), string(v1alpha1.NodeError):
137+
case string(v1alpha1.NodeFailed), string(v1alpha1.NodeError), string(v1alpha1.NodeSkipped):
138138
if stage.Status == bean2.WORKFLOW_STAGE_STATUS_RUNNING ||
139139
stage.Status == bean2.WORKFLOW_STAGE_STATUS_NOT_STARTED ||
140140
stage.Status == bean2.WORKFLOW_STAGE_STATUS_UNKNOWN {

pkg/pipeline/workflowStatus/repository/WorkflowStageRepository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type WorkflowExecutionStage struct {
2525
Id int `sql:"id,pk"`
2626
StageName bean.WorkflowStageName `sql:"stage_name,notnull"` // same as app name
2727
Status bean.WorkflowStageStatus `sql:"status"`
28-
StatusFor bean.WorkflowStageStatusFor `sql:"status_type"`
28+
StatusFor bean.WorkflowStageStatusFor `sql:"status_for"`
2929
Message string `sql:"message"`
3030
Metadata string `sql:"metadata"`
3131
WorkflowId int `sql:"workflow_id,notnull"`
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
DROP SEQUENCE IF EXISTS id_seq_workflow_execution_stage;
2-
3-
DROP TABLE IF EXISTS public.workflow_execution_stage CASCADE;
1+
DROP TABLE IF EXISTS public.workflow_execution_stage CASCADE;
2+
DROP SEQUENCE IF EXISTS id_seq_workflow_execution_stage;

vendor/modules.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,15 @@ github.com/davecgh/go-spew/spew
340340
# github.com/deckarep/golang-set v1.8.0
341341
## explicit; go 1.17
342342
github.com/deckarep/golang-set
343-
# github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250212120117-7e3d667325aa
343+
# github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250213131231-78d5428a91dd
344344
## explicit; go 1.21
345345
github.com/devtron-labs/authenticator/apiToken
346346
github.com/devtron-labs/authenticator/client
347347
github.com/devtron-labs/authenticator/jwt
348348
github.com/devtron-labs/authenticator/middleware
349349
github.com/devtron-labs/authenticator/oidc
350350
github.com/devtron-labs/authenticator/password
351-
# github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250212120117-7e3d667325aa
351+
# github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250213131231-78d5428a91dd
352352
## explicit; go 1.21
353353
github.com/devtron-labs/common-lib/async
354354
github.com/devtron-labs/common-lib/blob-storage
@@ -2219,8 +2219,8 @@ xorm.io/xorm/log
22192219
xorm.io/xorm/names
22202220
xorm.io/xorm/schemas
22212221
xorm.io/xorm/tags
2222-
# github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250212120117-7e3d667325aa
2223-
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250212120117-7e3d667325aa
2222+
# github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250213131231-78d5428a91dd
2223+
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250213131231-78d5428a91dd
22242224
# github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127
22252225
# github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5
22262226
# k8s.io/api => k8s.io/api v0.29.7

0 commit comments

Comments
 (0)