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: Optimize app grouping apis #3125

Merged
merged 17 commits into from
Mar 21, 2023
Merged

fix: Optimize app grouping apis #3125

merged 17 commits into from
Mar 21, 2023

Conversation

vikramdevtron
Copy link
Contributor

@vikramdevtron vikramdevtron commented Mar 17, 2023

Description

Optimization on authorization check for app grouping api's and db queries reduced, replaced by bulk fetch.

Fixes: https://dev.azure.com/DevtronLabs/Devtron/_workitems/edit/2429

How Has This Been Tested?

  • App workflows list for environment
  • Cd pipelines list for environment
  • Ci Pipeline list for environment
  • Workflow status list for environment

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?


@vikramdevtron vikramdevtron self-assigned this Mar 17, 2023
if len(pipelineIds) == 0 {
return ciWorkflowStatuses, nil
}
ciWorkflows, err := impl.ciWorkflowRepository.FindLastTriggeredWorkflowByCiIds(pipelineIds)
Copy link
Member

Choose a reason for hiding this comment

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

we are fetching results of all CI and not just CI for deploying to relevant environment

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
6.8% 6.8% Duplication

@vikramdevtron vikramdevtron merged commit f6f6457 into main Mar 21, 2023
@vikramdevtron vikramdevtron deleted the optimize-app-grouping branch March 21, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants