From b9ded5a973c751b2e5084e81ba91f5be0efc6d58 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 16 Feb 2026 09:14:02 +0000
Subject: [PATCH 1/3] Initial plan
From fa7e396d300325f177b2eb71c1328dd5cdbcdced Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 16 Feb 2026 09:16:18 +0000
Subject: [PATCH 2/3] Add missing ClusterEventType enum values for
deserialization support
Added 10 missing enum values to ClusterEventType:
- NODE_BLACKLISTED
- PINNED
- UNPINNED
- NODE_EXCLUDED_DECOMMISSIONED
- ADD_NODES_FAILED
- AUTOSCALING_BACKOFF
- AUTOMATIC_CLUSTER_UPDATE
- AUTOSCALING_FAILED
- DECOMMISSION_STARTED
- DECOMMISSION_ENDED
This fixes deserialization failures when the Databricks API returns these event types.
All existing tests pass (192 tests).
Co-authored-by: memoryz <6992432+memoryz@users.noreply.github.com>
---
.../Models/ClusterEventType.cs | 52 ++++++++++++++++++-
1 file changed, 51 insertions(+), 1 deletion(-)
diff --git a/csharp/Microsoft.Azure.Databricks.Client/Models/ClusterEventType.cs b/csharp/Microsoft.Azure.Databricks.Client/Models/ClusterEventType.cs
index b2d5e72..56a38a8 100644
--- a/csharp/Microsoft.Azure.Databricks.Client/Models/ClusterEventType.cs
+++ b/csharp/Microsoft.Azure.Databricks.Client/Models/ClusterEventType.cs
@@ -108,5 +108,55 @@ public enum ClusterEventType
///
/// Usage report containing the total and unused instance minutes of the autoscaling cluster over the last hour.
///
- AUTOSCALING_STATS_REPORT
+ AUTOSCALING_STATS_REPORT,
+
+ ///
+ /// Indicates that a node has been blacklisted.
+ ///
+ NODE_BLACKLISTED,
+
+ ///
+ /// Indicates that a cluster has been pinned.
+ ///
+ PINNED,
+
+ ///
+ /// Indicates that a cluster has been unpinned.
+ ///
+ UNPINNED,
+
+ ///
+ /// Indicates that a node has been excluded or decommissioned.
+ ///
+ NODE_EXCLUDED_DECOMMISSIONED,
+
+ ///
+ /// Indicates that adding nodes to the cluster has failed.
+ ///
+ ADD_NODES_FAILED,
+
+ ///
+ /// Indicates that autoscaling has been backed off.
+ ///
+ AUTOSCALING_BACKOFF,
+
+ ///
+ /// Indicates that the cluster has been automatically updated.
+ ///
+ AUTOMATIC_CLUSTER_UPDATE,
+
+ ///
+ /// Indicates that autoscaling has failed.
+ ///
+ AUTOSCALING_FAILED,
+
+ ///
+ /// Indicates that node decommissioning has started.
+ ///
+ DECOMMISSION_STARTED,
+
+ ///
+ /// Indicates that node decommissioning has ended.
+ ///
+ DECOMMISSION_ENDED
}
\ No newline at end of file
From a0ddebc54f3bd5ad6b24992ebc611e12f774fc80 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 16 Feb 2026 09:18:53 +0000
Subject: [PATCH 3/3] Add test for new ClusterEventType deserialization
Added test to verify that all 10 new ClusterEventType values can be deserialized correctly:
- NODE_BLACKLISTED
- PINNED
- UNPINNED
- NODE_EXCLUDED_DECOMMISSIONED
- ADD_NODES_FAILED
- AUTOSCALING_BACKOFF
- AUTOMATIC_CLUSTER_UPDATE
- AUTOSCALING_FAILED
- DECOMMISSION_STARTED
- DECOMMISSION_ENDED
All tests pass (193 tests).
Co-authored-by: memoryz <6992432+memoryz@users.noreply.github.com>
---
.../ClustersApiClientTest.cs | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/csharp/Microsoft.Azure.Databricks.Client.Test/ClustersApiClientTest.cs b/csharp/Microsoft.Azure.Databricks.Client.Test/ClustersApiClientTest.cs
index 1562648..c541bdd 100644
--- a/csharp/Microsoft.Azure.Databricks.Client.Test/ClustersApiClientTest.cs
+++ b/csharp/Microsoft.Azure.Databricks.Client.Test/ClustersApiClientTest.cs
@@ -714,4 +714,38 @@ public async Task TestEvents()
Times.Once()
);
}
+
+ [TestMethod]
+ public void TestNewClusterEventTypesDeserialization()
+ {
+ // Test that all new ClusterEventType values can be deserialized correctly
+ var newEventTypes = new[]
+ {
+ "NODE_BLACKLISTED",
+ "PINNED",
+ "UNPINNED",
+ "NODE_EXCLUDED_DECOMMISSIONED",
+ "ADD_NODES_FAILED",
+ "AUTOSCALING_BACKOFF",
+ "AUTOMATIC_CLUSTER_UPDATE",
+ "AUTOSCALING_FAILED",
+ "DECOMMISSION_STARTED",
+ "DECOMMISSION_ENDED"
+ };
+
+ foreach (var eventType in newEventTypes)
+ {
+ var json = $@"
+ {{
+ ""cluster_id"": ""test-cluster"",
+ ""timestamp"": 1619471498409,
+ ""type"": ""{eventType}"",
+ ""details"": {{}}
+ }}";
+
+ var clusterEvent = JsonSerializer.Deserialize(json, Options);
+ Assert.IsNotNull(clusterEvent, $"Failed to deserialize ClusterEvent with type {eventType}");
+ Assert.AreEqual(eventType, clusterEvent.Type.ToString(), $"ClusterEventType {eventType} did not deserialize correctly");
+ }
+ }
}
\ No newline at end of file