Skip to content

Commit 079ffe1

Browse files
committed
skip cluster-scoped follower commands
1 parent 5b94c6d commit 079ffe1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

KustoSchemaTools/Changes/DatabaseChanges.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ private static List<IChange> GenerateScriptCompareChanges<T>(Database oldState,
217217

218218
public static List<IChange> GenerateFollowerChanges(FollowerDatabase oldState, FollowerDatabase newState, ILogger log)
219219
{
220+
if (!SupportsFollowerClusterCommands())
221+
{
222+
log.LogDebug("Skipping follower database changes because cluster-scoped follower commands cannot be executed in the current rollout context.");
223+
return [];
224+
}
225+
220226
List<IChange> result =
221227
[
222228
.. GenerateFollowerCachingChanges(oldState, newState, db => db.Tables, "Table", "table"),
@@ -341,6 +347,8 @@ private static List<IChange> GenerateFollowerCachingChanges(FollowerDatabase old
341347
return result;
342348
}
343349

350+
private static bool SupportsFollowerClusterCommands() => false;
351+
344352
private static void LogChangeResult(ILogger log, string entityKey, int scriptCount, bool alreadyExists)
345353
{
346354
var level = scriptCount > 0 ? LogLevel.Information : LogLevel.Debug;

0 commit comments

Comments
 (0)