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: migrate external argo cd application #6303

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

iamayushm
Copy link
Contributor

Description

Fixes #

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


SyncPolicy string `json:"syncPolicy,omitempty"`
}

type ArgoCDSpec struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make sure this is exact subset of argocd structure

ArgoCDSpec ArgoCDSpec `json:"argoCDSpec"`
}

func (r *ReleaseConfiguration) JSON() []byte {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why custom json function ?

func (impl *DeploymentConfigServiceImpl) IsDeploymentConfigUsed() bool {
return impl.deploymentServiceTypeConfig.UseDeploymentConfigData
newObj, err := ConvertDeploymentConfigDbObjToDTO(newDBObj)
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how this error is handled at runtime?

if envId > 0 {
// if envId>0 then only env level config will be returned,
//for getting app level config envId should be zero
appAndEnvLevelConfig, err := impl.getEnvLevelDataForDevtronApps(appId, envId, appLevelConfig, false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nishant-d to revisit this logic

appLevelConfig.ReleaseConfiguration = releaseConfig

if migrateDataIfAbsent {
_, err := impl.CreateOrUpdateConfig(nil, appLevelConfig, bean3.SYSTEM_USER_ID)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nishant-d review migration logic

@Ash-exp Ash-exp changed the title feat: deployment config old data migration code feat: migrate external argo cd application Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants