Skip to content

Commit d202399

Browse files
Merge pull request #151 from microsoft/main
Fork Sync: Update from parent repository
2 parents 03651b7 + a1060c1 commit d202399

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

src/ApiService/ApiService/FeatureFlags.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
public static class FeatureFlagConstants {
44
public const string EnableScribanOnly = "EnableScribanOnly";
5+
public const string EnableNodeDecommissionStrategy = "EnableNodeDecommissionStrategy";
56
}

src/ApiService/ApiService/ServiceConfiguration.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ public interface IServiceConfig {
3838
public string? OneFuzzMonitor { get; }
3939
public string? OneFuzzOwner { get; }
4040

41-
public string OneFuzzNodeDisposalStrategy { get; }
42-
4341
public string? OneFuzzResourceGroup { get; }
4442
public string? OneFuzzTelemetry { get; }
4543

@@ -135,8 +133,6 @@ public string OneFuzzVersion {
135133
}
136134

137135
public string? OneFuzzAllowOutdatedAgent => GetEnv("ONEFUZZ_ALLOW_OUTDATED_AGENT");
138-
139-
public string OneFuzzNodeDisposalStrategy { get => GetEnv("ONEFUZZ_NODE_DISPOSAL_STRATEGY") ?? "scale_in"; }
140136
public string OneFuzzStoragePrefix => ""; // in production we never prefix the tables
141137

142138
public Uri OneFuzzBaseAddress {

src/ApiService/ApiService/onefuzzlib/ScalesetOperations.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -608,11 +608,7 @@ where x.State.ReadyForReset()
608608
}
609609

610610
// Perform operations until they fail due to scaleset getting locked:
611-
var strategy = _context.ServiceConfiguration.OneFuzzNodeDisposalStrategy.ToLowerInvariant() switch {
612-
// allowing typo’d or correct name for config setting:
613-
"decomission" or "decommission" => NodeDisposalStrategy.Decommission,
614-
_ => NodeDisposalStrategy.ScaleIn,
615-
};
611+
var strategy = await _context.FeatureManagerSnapshot.IsEnabledAsync(FeatureFlagConstants.EnableNodeDecommissionStrategy) ? NodeDisposalStrategy.Decommission : NodeDisposalStrategy.ScaleIn;
616612

617613
var reimageNodes = await ReimageNodes(scaleSet, toReimage.Values, strategy);
618614
if (!reimageNodes.IsOk) {

src/ApiService/IntegrationTests/Fakes/TestServiceConfiguration.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ public TestServiceConfiguration(string tablePrefix) {
5858

5959
public string? OneFuzzOwner => throw new System.NotImplementedException();
6060

61-
public string OneFuzzNodeDisposalStrategy => throw new System.NotImplementedException();
62-
6361
public ResourceIdentifier? OneFuzzDataStorage => throw new NotImplementedException();
6462

6563
public string? OneFuzzResourceGroup => throw new NotImplementedException();

0 commit comments

Comments
 (0)