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

fix: app metrics dynamically enabled based on support #3369

Merged
merged 9 commits into from
May 25, 2023

Conversation

Ash-exp
Copy link
Contributor

@Ash-exp Ash-exp commented May 10, 2023

Description

Made App Metrics Flag dynamic with respect to the deployment chart's compatibility to support application metrics. For this I used the data in orchestrator chart_ref.is_app_metrics_supported as a flag to apply App Metrics request.

Ticket : AB 2820
Fixes #3303 #3413

How Has This Been Tested?

Test Coverage Link

  • Base Deployment Template
  • Create Environment Override
  • Update Environment Override

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?


@Ash-exp Ash-exp added the enhancement New feature or request label May 10, 2023
@Ash-exp Ash-exp self-assigned this May 10, 2023
@Ash-exp Ash-exp requested a review from prakash100198 May 15, 2023 11:13
prakash100198
prakash100198 previously approved these changes May 17, 2023
appMetricsRequest := chartService.AppMetricEnableDisableRequest{UserId: environmentProperties.UserId, AppId: appId, EnvironmentId: environmentProperties.EnvironmentId, IsAppMetricsEnabled: false}
_, err = impl.EnvMetricsEnableDisable(&appMetricsRequest)
if err != nil {
impl.logger.Errorw("err while disable app metrics for lower versions", "err", err, "appId", appId, "chartMajorVersion", chartMajorVersion, "chartMinorVersion", chartMinorVersion)
impl.logger.Errorw("err while disable app metrics for lower versions", "err", err, "appId", appId, "chartVersion", chart.ChartVersion)
Copy link
Contributor

Choose a reason for hiding this comment

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

change error message, you can remove lower versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Implemented 👍

@gitguardian
Copy link

gitguardian bot commented May 19, 2023

⚠️ GitGuardian has uncovered 2 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 Secret Commit Filename
141558 Generic High Entropy Secret 6f2d8e1 scripts/devtron-reference-helm-charts/statefulset-chart_4-18-0/env-values.yaml View secret
2763127 Generic High Entropy Secret 6f2d8e1 scripts/devtron-reference-helm-charts/statefulset-chart_4-18-0/secrets-test-values.yaml 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.

Our GitHub checks need improvements? Share your feedbacks!

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Ash-exp Ash-exp merged commit 5283e1c into main May 25, 2023
@Ash-exp Ash-exp deleted the fix-app-matrics-deployment-chart branch May 25, 2023 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants