Skip to content

Commit

Permalink
Removes LegacyDynamicStrategy.
Browse files Browse the repository at this point in the history
RELNOTES: Make --legacy_dynamic_scheduler a no-op flag.
PiperOrigin-RevId: 351569808
  • Loading branch information
larsrc-google authored and copybara-github committed Jan 13, 2021
1 parent 788c71f commit 5b04895
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 547 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,16 @@ public static class GraveyardOptions extends OptionsBase {
effectTags = {OptionEffectTag.NO_OP},
help = "No-op")
public boolean skyframeEvalWithOrderedList;

@Option(
name = "legacy_spawn_scheduler",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
defaultValue = "false",
deprecationWarning =
"The --legacy_spawn_scheduler flag is a no-op and will be removed soon.",
help = "Was used to enable the old spawn scheduler. Now a no-op.")
public boolean legacySpawnScheduler;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,12 @@ final void registerSpawnStrategies(
return;
}

SpawnStrategy strategy;
if (options.legacySpawnScheduler) {
strategy = new LegacyDynamicSpawnStrategy(executorService, options, this::getExecutionPolicy);
} else {
strategy =
new DynamicSpawnStrategy(
executorService,
options,
this::getExecutionPolicy,
this::getPostProcessingSpawnForLocalExecution);
}
SpawnStrategy strategy =
new DynamicSpawnStrategy(
executorService,
options,
this::getExecutionPolicy,
this::getPostProcessingSpawnForLocalExecution);
registryBuilder.registerStrategy(strategy, "dynamic", "dynamic_worker");

registryBuilder.addDynamicLocalStrategies(getLocalStrategies(options));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,6 @@ public class DynamicExecutionOptions extends OptionsBase {
+ "enabled.")
public boolean internalSpawnScheduler;

@Option(
name = "legacy_spawn_scheduler",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
defaultValue = "false",
help =
"Enables the old but tested implementation of the spawn scheduler. This differs from the "
+ "new version in that this version cannot stop a local spawn once it has started "
+ "running. You should never have to enable the legacy scheduler except to "
+ "workaround bugs in the new version.")
public boolean legacySpawnScheduler;

@Option(
name = "dynamic_local_strategy",
converter = Converters.StringToStringListConverter.class,
Expand Down
Loading

0 comments on commit 5b04895

Please sign in to comment.