Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ApiService/ApiService/FeatureFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

public static class FeatureFlagConstants {
public const string EnableScribanOnly = "EnableScribanOnly";
public const string EnableNodeDecommissionStrategy = "EnableNodeDecommissionStrategy";
}
4 changes: 0 additions & 4 deletions src/ApiService/ApiService/ServiceConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public interface IServiceConfig {
public string? OneFuzzMonitor { get; }
public string? OneFuzzOwner { get; }

public string OneFuzzNodeDisposalStrategy { get; }

public string? OneFuzzResourceGroup { get; }
public string? OneFuzzTelemetry { get; }

Expand Down Expand Up @@ -135,8 +133,6 @@ public string OneFuzzVersion {
}

public string? OneFuzzAllowOutdatedAgent => GetEnv("ONEFUZZ_ALLOW_OUTDATED_AGENT");

public string OneFuzzNodeDisposalStrategy { get => GetEnv("ONEFUZZ_NODE_DISPOSAL_STRATEGY") ?? "scale_in"; }
public string OneFuzzStoragePrefix => ""; // in production we never prefix the tables

public Uri OneFuzzBaseAddress {
Expand Down
6 changes: 1 addition & 5 deletions src/ApiService/ApiService/onefuzzlib/ScalesetOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -608,11 +608,7 @@ where x.State.ReadyForReset()
}

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

var reimageNodes = await ReimageNodes(scaleSet, toReimage.Values, strategy);
if (!reimageNodes.IsOk) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ public TestServiceConfiguration(string tablePrefix) {

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

public string OneFuzzNodeDisposalStrategy => throw new System.NotImplementedException();

public ResourceIdentifier? OneFuzzDataStorage => throw new NotImplementedException();

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