-
Notifications
You must be signed in to change notification settings - Fork 511
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: migrate external argo cd application #6303
Open
iamayushm
wants to merge
162
commits into
develop
Choose a base branch
from
link-external-argocd
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+40,604
−7,670
Open
Changes from 20 commits
Commits
Show all changes
162 commits
Select commit
Hold shift + click to select a range
dcfd98b
wip:deployment config old data migration code
iamayushm 104e62c
Merge remote-tracking branch 'origin/develop' into link-external-argocd
iamayushm 6864e07
updating repo url get usage
iamayushm abc8fea
comments
iamayushm ca6fda7
adding comments
iamayushm a18b96f
wip: adding repo name in deployment config struct
iamayushm 81ccd3a
migration files
iamayushm 20e0b4d
migration update
iamayushm 7303646
Merge remote-tracking branch 'origin/link-external-argocd' into feat-…
Ash-exp 185178e
feat: updated the target revision
Ash-exp ecf84f1
review changes
iamayushm 2f76843
nil handling
iamayushm 8cf7ea6
dev testing bug fixes
iamayushm 4d062a5
fixes
iamayushm fc43af7
value file name fix
iamayushm f842233
fixes
iamayushm 6a5bf44
repo url function update
iamayushm 2ba80d3
git repo url handing using code
iamayushm b302417
fixing import cycle
iamayushm afe491b
feat: dynamic chart loaction and valuesfile path
Ash-exp d535a6e
CRUD operations
iamayushm dc4c752
repo clone and env override create flow
iamayushm b642d6d
wip: self review changes
iamayushm e3bc523
feat: trigger flows updated
Ash-exp 74837b4
self review changes
iamayushm a5a2680
refactoring
iamayushm 416d0ac
Merge remote-tracking branch 'origin/develop' into link-external-argocd
iamayushm bd6ddf9
Merge remote-tracking branch 'origin/develop' into crud-deployment-co…
iamayushm 2385dd2
self review fix: env override create
iamayushm 6d87579
skipping checks
iamayushm be79f0e
feat: Skip GitOps config CRUD ACD operation if argo module is not ins…
Ash-exp 1568f16
handling for IsGitOpsConfigured
Ash-exp d98d85d
feat: release mode data adaptor
Ash-exp 92905f9
Merge remote-tracking branch 'origin/link-external-argocd' into feat-…
Ash-exp d0e08d5
validation api
iamayushm c0bbbd2
deployment status changes and application filter logic change
iamayushm f1223ae
self review changes
iamayushm 801c175
develop merge
iamayushm 8d6b58f
delete acd app handling
iamayushm 7c3e250
adding route
iamayushm ef70a2c
parent branch merge
iamayushm 5d1e2e6
modifying validate link request
iamayushm b319b1d
pipeline crud operation
iamayushm 49485d5
dev testing fix
iamayushm 3062e1a
wip: release config data type fix
iamayushm 3fd0ef6
fixing check
iamayushm 94d9aa7
Merge remote-tracking branch 'origin/link-external-argocd' into feat-…
Ash-exp e49dc71
updated wire gen
Ash-exp 35a1076
added api /environment-variables
Ash-exp 2e271d5
Merge remote-tracking branch 'origin/develop' into link-external-argocd
Ash-exp 190bebd
Merge remote-tracking branch 'origin/link-external-argocd' into crud-…
Ash-exp a3e9ca8
Merge remote-tracking branch 'origin/link-external-argocd' into feat-…
Ash-exp e11e5f0
added releaseMode validation
Ash-exp d422424
fix: isGitOpsEnable flag
Ash-exp de8627a
updated EnvironmentVariableList response
Ash-exp 86ae011
Merge remote-tracking branch 'origin/crud-deployment-config' into fea…
Ash-exp 33af0c6
updated git repo validations
Ash-exp 563654f
updated migration number
Ash-exp 4d03ff6
fix: skip pipeline create validation
Ash-exp b32db8d
panic handler for cd pipeline creation
Ash-exp ba13f52
updated wire dep
Ash-exp 3fdf4f8
fix: cd trigger panic fix
Ash-exp ffea203
fix: validation migrate cd pipeline api
Ash-exp 4ccb1ee
updated ValidateGitOpsRepoUrl request for custom gitops logic
Ash-exp 64a2e6c
fix: git clone logic for validate migration request
Ash-exp a179894
fix: updated API key
Ash-exp 2df5316
chart name handling for migrate release
Ash-exp 3c37ea3
fix: chart validation
Ash-exp 0a6eb42
fix: chart validation
Ash-exp abaa1e9
fix: pipeline creation
Ash-exp 737f255
feat: is gitops repo configured flag updated
Ash-exp bcb6de9
wip: trigger fix
iamayushm 5920380
feat: filter external argo app list
Ash-exp a0d24b4
read service for circular import
iamayushm a95a2ef
Merge remote-tracking branch 'origin/feat-gitops-client-refactoring' …
iamayushm f63027f
fix nil poniter panic
Ash-exp 13548fc
fix: empty argo app list
Ash-exp 2965d1b
fix empty app name
iamayushm 8c40b19
updated dep of DeploymentConfigService instead of DeploymentConfigRea…
Ash-exp b202c20
minor refactorings
Ash-exp 5ce1b1b
replaced release app name from util function
Ash-exp bd2f597
validation and flag if config is for external helm release
iamayushm 68883b9
Merge remote-tracking branch 'origin/feat-gitops-client-refactoring' …
iamayushm 238a9a0
fix migrated from flag
iamayushm 8223283
fix: resource tree api with scoop
Ash-exp 4112dce
fix: error handling for GetResourceTree
Ash-exp f668521
fixing set chart location function
iamayushm f6ff259
updating config type
iamayushm 3375e8e
fix: scoop argo_cd GetResourceTree
Ash-exp cc0df06
fix: updated validation error
Ash-exp 1a7e90d
fix: updated BuildDeployedAppName references
Ash-exp f7cd451
fix: common wire set
Ash-exp 618ecc2
updating chart location while delete
iamayushm 7a1bcf1
fix user id
iamayushm ebc2ada
common function for url already present
iamayushm 2b4e297
removing duplicate logic for pipeline filter
iamayushm 41e4fc6
fix: nil checker issues
Ash-exp d3a77b1
updated global api
Ash-exp a094ceb
pg no rows handling
iamayushm 401f332
manual sync mode fix for trigger/deployment statys
iamayushm bde0385
fix: resource tree
Ash-exp ff5ce6e
fix: panic handling
Ash-exp d7208d7
fix default namespace
iamayushm 2fcc06c
wip
iamayushm c7eb21c
fix: pipeline delete flow
Ash-exp 3a7f0fc
fix: delete apllication object
Ash-exp 40a271e
fix: delete application object
Ash-exp 39696ba
chore: refactored AppDetailsReadService
Ash-exp 9bfaac0
added: vlaidation for link external release
Ash-exp 0c66b84
review comment incorporated
Ash-exp e1501e6
fix: pointer datatype
Ash-exp 181763d
added: EnforcedPolicyViolation validation
Ash-exp b7602af
Merge remote-tracking branch 'origin/develop' into feat-gitops-client…
Ash-exp 6adaf88
fix app clone
iamayushm 4bb383c
make fix
iamayushm 8fa26b4
fix: workflow_execution_stage cloumn
Ash-exp 8575a6d
added gitops adapter
Ash-exp 95a0e19
helm deployment status fix
iamayushm c835099
updated deployment config queries
Ash-exp e785cfd
fix: generate manifest diff
Ash-exp a74e685
wire gen updated
Ash-exp 4d108cf
updated feature flag name
Ash-exp 5bbe9c0
updated env_gen.md file
Ash-exp 1e639e4
feat: argocd resource tree support
Ash-exp 69a88d8
fix: nil handling updated
Ash-exp e37f8e4
fix: context handling
Ash-exp f44a592
Merge remote-tracking branch 'origin/develop' into feat-gitops-client…
Ash-exp 6d156f7
review changes
iamayushm 1585ac6
chore: deployment config refactorings
Ash-exp 8c5eb5d
fix: on-board argocd issues
Ash-exp 188093e
updated updateArgoAppDeleteStatus func
Ash-exp 74ad6ad
Merge remote-tracking branch 'origin/feat-gitops-client-refactoring' …
Ash-exp 529a935
Merge pull request #6399 from devtron-labs/chore-deployment-config-re…
Ash-exp eb9c8b4
review changes
iamayushm ad4a7c3
make fix
iamayushm d2c1a34
delete argo app error handling fixes
iamayushm b0f9e5a
payload changes
iamayushm 0926759
argo app listing api updated
Ash-exp f0f8364
updated wire_gen files
Ash-exp e082b02
Merge remote-tracking branch 'origin/feat-gitops-client-refactoring' …
Ash-exp 5538bf7
Merge pull request #6401 from devtron-labs/feat-resource-tree-support
Ash-exp 7ed9631
chore: Argocd dependabot fixes (#6402)
iamayushm b565250
Merge pull request #6316 from devtron-labs/feat-gitops-client-refacto…
Ash-exp 41dc355
Merge pull request #6315 from devtron-labs/crud-deployment-config
Ash-exp 2597330
develop merge
iamayushm 0ee8a66
fix: link request
iamayushm ef1cc8e
updated migration script
Ash-exp fdd08e8
fix: GetDeploymentConfigMinForAppAndEnv for app stage api
Ash-exp a53fbbf
fix: helm app gitops target revision
Ash-exp 79df35d
fix: cd pipeline create blocked if argo module not installed
Ash-exp 261b336
setting repo url in new deployment config also
iamayushm 6af3d53
default branch (backward compatibility) if branch is not passed
iamayushm 035a492
updated target revision
Ash-exp 45ef00d
fix: release config target revision
Ash-exp 9d29f84
updated not deployed status to degraded
Ash-exp d4aaa1e
feat-gitops-client branch merge
iamayushm ee27457
go mod tidy
iamayushm 616574e
fix: app delete flow
Ash-exp 17ee219
fix: git commit ref not found
Ash-exp 70edd33
fix: git commit ref not found
Ash-exp df39ac0
fix: gitops branch pull error
Ash-exp 32e5226
fix enum
iamayushm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ import ( | |
"github.com/devtron-labs/devtron/internal/sql/repository/deploymentConfig" | ||
"github.com/devtron-labs/devtron/internal/util" | ||
repository2 "github.com/devtron-labs/devtron/pkg/cluster/environment/repository" | ||
"github.com/devtron-labs/devtron/pkg/deployment/common/adapter" | ||
"go.opentelemetry.io/otel" | ||
"strings" | ||
"time" | ||
|
@@ -624,7 +625,22 @@ func (impl AppListingRepositoryImpl) FetchAppStageStatus(appId int, appType int) | |
if model != nil && model.Id > 0 && model.AllowCustomRepository { | ||
isCustomGitopsRepoUrl = true | ||
} | ||
if (gitOps.IsGitOpsRepoNotConfigured(stages.ChartGitRepoUrl) && gitOps.IsGitOpsRepoNotConfigured(stages.DeploymentConfigRepoURL)) && stages.CiPipelineId == 0 { | ||
|
||
deploymentConfigDB, err := impl.deploymentConfigRepository.GetByAppIdAndEnvId(appId, 0) | ||
if err != nil && err != pg.ErrNoRows { | ||
impl.Logger.Errorw("error while getting deploymentConfig", "appId", appId, "err", err) | ||
return appStageStatus, err | ||
} | ||
|
||
dc, err := adapter.ConvertDeploymentConfigDbObjToDTO(deploymentConfigDB) | ||
if err != nil { | ||
impl.Logger.Errorw("error while converting DeploymentConfigDbObjToDTO", "err", err) | ||
return nil, err | ||
} | ||
|
||
if (gitOps.IsGitOpsRepoNotConfigured(stages.ChartGitRepoUrl) && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move to service layer |
||
gitOps.IsGitOpsRepoNotConfigured(stages.DeploymentConfigRepoURL) && | ||
(dc != nil && gitOps.IsGitOpsRepoNotConfigured(dc.GetRepoURL()))) && stages.CiPipelineId == 0 { | ||
stages.ChartGitRepoUrl = "" | ||
stages.DeploymentConfigRepoURL = "" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pg.ErrNoRows handling