devtron icon indicating copy to clipboard operation
devtron copied to clipboard

Link helm release

Open iamayushm opened this issue 10 months ago • 4 comments

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?


Summary by Bito

This PR introduces helm release linking functionality by adding new REST endpoints and enhancing gRPC protobuf definitions. It extends data structures to support richer information for helm applications, improves validation logic, and refactors error handling mechanisms. These changes streamline helm release management and strengthen overall system reliability.

iamayushm avatar Mar 04 '25 09:03 iamayushm

⚠️ 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 e082b025f3003a9e1b6c8ff40be67aa63de167da vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go View secret
15200082 Triggered PGP Private Key e082b025f3003a9e1b6c8ff40be67aa63de167da vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go View secret
7214865 Triggered PGP Private Key f44a59225ce74b73d7067a5e215eb8bbafee11e2 vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go View secret
15200083 Triggered PGP Private Key f44a59225ce74b73d7067a5e215eb8bbafee11e2 vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go View secret
15200084 Triggered PGP Private Key e082b025f3003a9e1b6c8ff40be67aa63de167da 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.

gitguardian[bot] avatar Mar 07 '25 13:03 gitguardian[bot]

/review

Shivam-nagar23 avatar Jul 15 '25 11:07 Shivam-nagar23

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
New Feature - New and Enhanced Features

HelmAppService.go - Integrated new service methods including functions for external helm app listing and detailed release retrieval with enhanced logging and error handling.

adapter.go - Introduced utility function 'ConvertClusterBeanToClusterConfig' for consistent mapping between cluster beans and helm configurations.

bean.go - Defined ExternalHelmAppListingResult struct to support extended helm app categorization.

HelmAppRestHandler.go - Added new REST endpoint 'ListHelmApplicationsForEnvironment' with comprehensive request handling and error responses.

HelmAppRouter.go - Configured a new GET route '/external-helm-release' for exposing external helm release details.

PipelineRepository.go - Enhanced pipeline config with added ClusterId and Namespace fields and introduced GetAllAppsByClusterAndDeploymentAppType for advanced retrieval.

Feature Improvement - Enhanced Features and Improvements

applist.pb.go - Integrated new hexadecimal field codes and refined message types for better maintainability.

applist.proto - Added new fields 'releaseStatus' and 'home' to extend the environment details schema.

applist_grpc.pb.go - Refactored multiple gRPC method invocations by replacing hardcoded method strings with constant-based method names across endpoints.

ArgoApplicationServiceExtended.go - Modified initialization and added aCDAuthConfig field for improved authentication configuration.

adapter.go - Updated adapter to include detailed cluster configuration for enriched environment data.

DeploymentPipelineConfigService.go - Enhanced external helm app linking with new validation functions, additional helmAppReadService integration, and updated error handling logic.

adapter.go - Renamed migration validation request to 'NewMigrateExternalAppValidationRequest' to support external helm app linking with helm metadata integration.

ExternalArgoAppLink.go - Added helm release linking functions by introducing HelmReleaseMetadataRequest and related getter methods, and refactored error detail management to support external helm release validations.

Other Improvements - Code Refactoring and Cleanup

DeploymentPipelineRestHandler.go - Renamed validation method for improved clarity in external app link requests.

PipelineConfigRouter.go - Updated route to invoke the new external app link validation handler.

wire_gen.go - Modified code generation command, adjusted import aliases, and updated repository configurations to streamline dependency management.

adapter.go - Updated time parsing logic with improved variable declaration for better error handling.

GitOperationService.go - Removed outdated GetRepoUrlByRepoName method and cleaned up Git operation functions.

TriggerService_ent1.go - Refactored helm history metadata retrieval logic and consolidated cluster configuration conversion in TriggerService.

wire_gen.go - Updated code generation command, import aliases, and dependency initializations to streamline dependency management.

Other Improvements - Environment Configuration and Documentation Update

env_gen.json - Updated environment JSON configuration with new field REVISION_HISTORY_LIMIT_LINKED_HELM_APP added and deployment config flag changed to true.

env_gen.md - Added documentation row for REVISION_HISTORY_LIMIT_LINKED_HELM_APP reflecting the recent configuration enhancements.

Bug Fix - Bug Fixes and Standardization

InternalErrorCode.go - Modified error code constants; replaced the invalid GitOps repo URL error with GitOpsNotConfigured and adjusted the sequence numbering to maintain consistency.

GitOpsConfigReadService.go - Replaced error code for invalid GitOps repo URL with standardized GitOpsNotConfigured in GitOps config service.

gitOpsValidationService.go - Updated error handling and codes in GitOps validation to provide clearer repository error messages.

GlobalConfig.go - Fixed feature flag evaluation with added nil check and proper return based on configuration.

bito-code-review[bot] avatar Jul 15 '25 11:07 bito-code-review[bot]