Adds filter to target specific cluster connections#95
Open
Conversation
Contributor
sdseaton
commented
Apr 4, 2025
- Adds attribute to Cluster model to indicate if cluster is active.
- Adds filter option to KustoSchemaHandler Tasks to allow targeting specific cluster connections if a list of included connections is provided.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds filtering functionality to target specific cluster connections by introducing a new boolean attribute in the Cluster model and a filtering method in the KustoSchemaHandler.
- Adds an IsActive property to the Cluster model to denote active clusters.
- Implements the FilterClusters method in KustoSchemaHandler to filter connections based on activity status or an explicit list of included connections.
- Updates methods GenerateDiffMarkdown, Import, and Apply to utilize the new filtering logic.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| KustoSchemaTools/Model/Cluster.cs | Introduces a new property IsActive to mark clusters as active. |
| KustoSchemaTools/KustoSchemaHandler.cs | Adds FilterClusters method and updates existing methods to filter connections. |
Comments suppressed due to low confidence (1)
KustoSchemaTools/KustoSchemaHandler.cs:28
- Consider adding test cases to verify the behavior of FilterClusters with various inputs, including cases with a null or empty includedConnections list and with explicit connection names.
public Clusters FilterClusters(Clusters clusters, List<string>? includedConnections)
Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more
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.