Skip to content

Conversation

@ashleyvansp
Copy link
Contributor

@ashleyvansp ashleyvansp commented Jul 16, 2025

This PR updates the KustoClusterOrchestrator helper classes to support managing workload groups -- creation, modification, and deletion.

https://github.com/github/data/issues/9010

This PR is a follow-up to #111, #110, #106

Changes

  • KustoSchemaTools/Changes/ClusterChanges.cs
    • Moved capacity policy change logic into its own method HandleCapacityPolicyChanges to improve readability
    • Introduced a new method: HandleWorkloadGroupChanges to process workload group deletions, creations, and updates
      • Supports marking workload groups for deletion; requires workload groups be added to the deletions section of the YAML file
      • Skips updates for workload groups marked for deletion
      • Generates scripts and markdown for new or updated workload groups
  • KustoSchemaTools/Parser/KustoClusterHandler.cs
    • Added logic to load the existing state of workload groups from the Kusto cluster
  • Model changes to support workload group deletions
  • Unit tests

Copilot AI review requested due to automatic review settings July 16, 2025 17:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for Workload Groups management to the Kusto Schema Tools, extending the existing cluster configuration orchestration capabilities. The implementation handles creation, updates, and deletion of workload groups alongside the existing capacity policy management.

  • Addition of workload groups support to cluster configuration management
  • Implementation of workload group comparison and change detection logic
  • Enhanced test coverage for workload group operations and edge cases

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Updated documentation to include workload groups as a supported feature
KustoClusterHandler.cs Added workload groups loading from live clusters via .show workload_groups command
ClusterDeletions.cs New model to track workload groups marked for deletion
Cluster.cs Added Deletions property to support workload group deletion tracking
DeletionChange.cs Enhanced to support custom markdown for better deletion reporting
ClusterChanges.cs Major refactoring to handle workload group changes with creation, update, and deletion logic
KustoClusterHandlerTests.cs Comprehensive test coverage for workload group loading scenarios
ClusterChangesTest.cs Extensive test suite covering workload group change detection

@ashleyvansp ashleyvansp changed the title [WIP] workload groups Add support for managing cluster workload groups Jul 16, 2025
@ashleyvansp ashleyvansp merged commit ec25e7d into main Jul 17, 2025
5 checks passed
@ashleyvansp ashleyvansp deleted the ashleyvansp/workloadGroups branch July 17, 2025 18:52
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