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 158 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

Copy link

gitguardian bot commented Feb 17, 2025

⚠️ GitGuardian has uncovered 5 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
15200081 Triggered PGP Private Key e082b02 vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go View secret
15200082 Triggered PGP Private Key e082b02 vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go View secret
7214865 Triggered PGP Private Key f44a592 vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go View secret
15200083 Triggered PGP Private Key f44a592 vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go View secret
15200084 Triggered PGP Private Key e082b02 vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

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