This repository was archived by the owner on Jun 11, 2025. It is now read-only.
Feat/env template#378
Merged
Merged
Conversation
Reviewer's Guide by SourceryThis pull request implements changes to improve cluster listing functionality and introduces environment template-related fixes. The main changes include modifying the cluster listing logic to filter results based on ownership, updating the BYOK cluster listing, and adding a new field to the SearchCluster model. Sequence diagram for InfraListClusters functionsequenceDiagram
participant User
participant QueryResolver
participant Domain
participant Repos
User->>QueryResolver: InfraListClusters(search)
QueryResolver->>QueryResolver: Check search.Text
alt search.AllClusters is nil
QueryResolver->>QueryResolver: Add filter for ClusterOwnedBy
end
QueryResolver->>Domain: ListClusters(filter, pagination)
Domain->>Repos: FindPaginated(filter, pagination)
Repos-->>Domain: Clusters
Domain-->>QueryResolver: Clusters
QueryResolver-->>User: Clusters
Sequence diagram for InfraListBYOKClusters functionsequenceDiagram
participant User
participant QueryResolver
participant Domain
participant Repos
User->>QueryResolver: InfraListBYOKClusters(search)
alt search is nil or search.AllClusters is nil
QueryResolver->>QueryResolver: Add filter for BYOKClusterOwnedBy
end
QueryResolver->>Domain: ListBYOKCluster(filter, pagination)
Domain->>Repos: FindPaginated(filter, pagination)
Repos-->>Domain: BYOK Clusters
Domain-->>QueryResolver: BYOK Clusters
QueryResolver-->>User: BYOK Clusters
Updated class diagram for SearchCluster modelclassDiagram
class SearchCluster {
repos.MatchFilter~optional~ isReady
repos.MatchFilter~optional~ region
repos.MatchFilter~optional~ text
repos.MatchFilter~optional~ allClusters
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @abdheshnayak - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider removing commented-out code in ListBYOKCluster and ListClusters functions to keep the codebase clean.
- To improve code organization and reduce duplication, consider extracting the filter logic into a separate function, as it's used in both InfraListClusters and InfraListBYOKClusters.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
abdheshnayak
added a commit
that referenced
this pull request
Nov 5, 2024
* ✨ Added support for env-template * handle clustername empty error in resource mapping * 🎨 Implemented template and owned cluster --------- Co-authored-by: Piyush Kumar <piyush.acet@gmail.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary by Sourcery
Fix issues with owned cluster listing by adding appropriate filters and enhance environment templates with a new 'AllClusters' filter option in the search functionality.
Bug Fixes:
Enhancements: