Repository navigation
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This pull request focuses on optimizing permission checks, database operations, and batch processing by replacing sequential
for/for...ofloops with concurrentPromise.allandfor awaitconstructs where appropriate. These changes improve performance, especially for operations that involve multiple asynchronous database calls. Additionally, there are minor code cleanups and consistency improvements.Performance Improvements and Refactoring:
Batch Permission and Ownership Checks:
resolvePermission,verifyOwnership, and related endpoints to usePromise.allfor concurrent permission checks, reducing latency when verifying multiple actions or teams. [1] [2] [3]Concurrent Database Updates and Deletions:
component.js,config.js,domain.js,group-config.js,team.js,admin.js) to usePromise.allfor saving or deleting multiple related documents, instead of sequentially awaiting each operation. [1] [2] [3] [4] [5] [6] [7]Concurrent Processing in GitOps Services:
services/gitops(such aspushChanges,processComponentDeleted,processNewComponent) to process multiple changes concurrently withPromise.allorfor await, improving deployment and synchronization speed. [1] [2] [3] [4] [5]Code Consistency and Minor Improvements:
Consistency in Array Checks:
.find(...)with.includes(...)and similar adjustments for clearer intent and slightly improved performance in value checks. [1] [2]Ensured Await on Critical Saves:
awaitkeywords to ensure domain/environment version updates and saves are completed before proceeding. [1] [2] [3] [4] [5] [6] [7] [8] [9]Other Minor Cleanups:
.findwith.somefor validation logic for improved readability.for awaitin population functions for consistency with async iteration. [1] [2]These changes collectively improve the efficiency, maintainability, and reliability of permission handling and batch operations throughout the codebase.