Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Helm async deploy Devtron Apps #4045

Merged
merged 58 commits into from
Nov 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
a8b50fd
wip: refactored deployment code
Ash-exp Oct 9, 2023
091f113
feat: helm async install for devtron apps
Ash-exp Oct 9, 2023
e7802ee
Merge branch 'main' into feat-async-install-devtron
Ash-exp Oct 9, 2023
6fbe666
updated: pubsub lib version
Ash-exp Oct 9, 2023
9786c0f
removed unnecessary comments
Ash-exp Oct 9, 2023
61968e9
removed: unnecessary code
Ash-exp Oct 10, 2023
2a76b77
Merge branch 'main' into feat-async-install-devtron
Ash-exp Oct 10, 2023
0ba51de
feat: deployment cron updated
Ash-exp Oct 10, 2023
a88b62c
updated: review comments
Ash-exp Oct 10, 2023
11157af
refactored: deployment status cron job logic
Ash-exp Oct 11, 2023
bffcbb0
Merge branch 'main' into feat-async-install-devtron
Ash-exp Oct 11, 2023
f1a9c55
updated: runner states for deployment
Ash-exp Oct 11, 2023
d9bb5d8
fixed: unable to update cdWorkflowRunner
Ash-exp Oct 11, 2023
63d9923
Merge branch 'main' into feat-async-install-devtron
Ash-exp Oct 12, 2023
3023319
chore: main merge
Ash-exp Oct 12, 2023
9d06bfe
updated: cdWfr for gitops deployment
Ash-exp Oct 13, 2023
5217ce3
fixed: cdWfr skipped status list
Ash-exp Oct 13, 2023
cd88d1d
fixed: test file arguments
Ash-exp Oct 13, 2023
c433178
fixed: handled for event redelivery case
Ash-exp Oct 13, 2023
d8ebf23
used the constant
Ash-exp Oct 13, 2023
c3a46ba
handling for context deadline exceeded
Ash-exp Oct 13, 2023
0401195
updated: context deadline error expression
Ash-exp Oct 13, 2023
b59543b
handled: error in unmarshalling
Ash-exp Oct 13, 2023
a53ac2c
fixed: context deadline error in cdWfr
Ash-exp Oct 13, 2023
8c68538
handled: pending-install state
Ash-exp Oct 16, 2023
fed6eeb
chore: main merge
Ash-exp Oct 19, 2023
f69e92e
feat: helm install/upgrade with ctx
Ash-exp Oct 20, 2023
51c48c0
Merge branch 'main' into feat-async-install-devtron
Ash-exp Oct 20, 2023
97d6c50
handling: nil pointer
Ash-exp Oct 20, 2023
b8f2b1a
updated: error handling
Ash-exp Oct 20, 2023
f83c55e
updated: error message
Ash-exp Oct 20, 2023
940ad76
fixed: updatePreviousDeploymentStatus handling
Ash-exp Oct 20, 2023
5e3ff18
fixed: updatePreviousDeploymentStatus handling
Ash-exp Oct 20, 2023
ea3af2d
feat: refactored
Ash-exp Oct 20, 2023
acfa3ec
chore: main merge
Ash-exp Oct 23, 2023
17fb50f
chore: main merge
Ash-exp Oct 25, 2023
8f74652
updated variable name
Ash-exp Oct 25, 2023
81b15ae
Merge branch 'main' into feat-async-install-devtron
Ash-exp Oct 26, 2023
9dc6e25
updated default value for env
Ash-exp Oct 26, 2023
6cff43a
updated GetValuesOverrideForTrigger
Ash-exp Oct 26, 2023
2f7b842
updated GetValuesOverrideForTrigger
Ash-exp Oct 26, 2023
88018fd
Merge branch 'main' into feat-async-install-devtron
Ash-exp Oct 26, 2023
5df6382
code review comments
kripanshdevtron Oct 30, 2023
ad53ee0
Merge branch 'main' into feat-async-install-devtron
Ash-exp Oct 30, 2023
243ac2e
incorporated review suggestions
Ash-exp Oct 31, 2023
25f72d4
chore: main merge
Ash-exp Oct 31, 2023
aaad742
Merge branch 'main' into feat-async-install-devtron
Ash-exp Oct 31, 2023
f94a3fa
chore: removed unnecessary env flag
Ash-exp Oct 31, 2023
27c377b
handled: context deadline error
Ash-exp Oct 31, 2023
06f2256
fixed: migration
Ash-exp Oct 31, 2023
fc67c41
fixed: update status in progress
Ash-exp Oct 31, 2023
12560d0
fine-tuned and refactoring
Ash-exp Nov 1, 2023
93aacf9
chore: main merge
Ash-exp Nov 1, 2023
6ff5310
handling for hibernate app
Ash-exp Nov 1, 2023
5b81688
chore: main merge
Ash-exp Nov 16, 2023
0ec86ae
chore: main merge
Ash-exp Nov 16, 2023
add60a9
Merge branch 'main' into feat-async-install-devtron
Ash-exp Nov 20, 2023
115c62a
chore: main merge
Ash-exp Nov 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
code review comments
  • Loading branch information
kripanshdevtron committed Oct 30, 2023
commit 5df63828e07816d1cc215e9f3508b269862f3b37
6 changes: 6 additions & 0 deletions pkg/pipeline/WorkflowDagExecutor.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ func (impl *WorkflowDagExecutorImpl) UpdateWorkflowRunnerStatusForDeployment(app
if time.Now().After(helmInstalledDevtronApp.GetLastDeployed().AsTime().Add(time.Duration(appServiceConfig.HelmInstallationTimeout) * time.Minute)) {
// If release status is in pending-install for more than 5 mins, then mark the deployment as failure
wfr.Status = pipelineConfig.WorkflowFailed
//TODO Asutosh: use release status instead of PendingInstall
wfr.Message = fmt.Sprintf("Deployment Timeout: release is in %s status for more than %d mins", serverBean.HelmReleaseStatusPendingInstall, appServiceConfig.HelmInstallationTimeout)
wfr.FinishedOn = time.Now()
return true
Expand Down Expand Up @@ -619,6 +620,8 @@ func (impl *WorkflowDagExecutorImpl) SubscribeDevtronAsyncHelmInstallRequest() e
impl.logger.Errorw("err on extracting override request, SubscribeDevtronAsyncHelmInstallRequest", "err", err)
return
}
// TODO Asutosh: run below logic in func and wrap that func inside lock block at pipeline level

overrideRequest := CDAsyncInstallNatsMessage.ValuesOverrideRequest
cdWfr, err := impl.cdWorkflowRepository.FindWorkflowRunnerById(overrideRequest.WfrId)
if err != nil {
Expand All @@ -632,6 +635,7 @@ func (impl *WorkflowDagExecutorImpl) SubscribeDevtronAsyncHelmInstallRequest() e
return
}
if exists {
//TODO Asutosh: we should update its status, so that we know this has been picked
impl.logger.Warnw("skipped deployment as the workflow runner is not the latest one", "cdWfrId", cdWfr.Id)
return
}
Expand All @@ -649,6 +653,7 @@ func (impl *WorkflowDagExecutorImpl) SubscribeDevtronAsyncHelmInstallRequest() e
return
}

//TODO Asutosh: Move this to WorkflowDagExecutor Struct
appServiceConfig, err := app.GetAppServiceConfig()
if err != nil {
impl.logger.Errorw("error in parsing app status config variables, SubscribeDevtronAsyncHelmInstallRequest", "cdWfrId", cdWfr.Id, "err", err)
Expand Down Expand Up @@ -2535,6 +2540,7 @@ func (impl *WorkflowDagExecutorImpl) TriggerHelmAsyncRelease(overrideRequest *be
err = impl.pubsubClient.Publish(pubsub.DEVTRON_CHART_INSTALL_TOPIC, string(payload))
if err != nil {
impl.logger.Errorw("failed to publish trigger request event", "topic", pubsub.DEVTRON_CHART_INSTALL_TOPIC, "payload", payload, "err", err)
//TODO Asutosh: if failed to publish then need to update status as failed
}

//update workflow runner status, used in app workflow view
Expand Down
Loading