Skip to content

Commit

Permalink
Enable shard sync when we also specify manual targets
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerhu committed Oct 11, 2023
1 parent 561d1d7 commit 6808626
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.google.idea.blaze.base.projectview.ProjectViewManager;
import com.google.idea.blaze.base.projectview.ProjectViewSet;
import com.google.idea.blaze.base.projectview.section.sections.ShardBlazeBuildsSection;
import com.google.idea.blaze.base.projectview.section.sections.SyncManualTargetsSection;
import com.google.idea.blaze.base.projectview.section.sections.TargetShardSizeSection;
import com.google.idea.blaze.base.scope.BlazeContext;
import com.google.idea.blaze.base.scope.Scope;
Expand Down Expand Up @@ -87,7 +88,9 @@ static boolean shardingRequested(Project project) {
}

private static boolean shardingRequested(ProjectViewSet projectViewSet) {
return projectViewSet.getScalarValue(ShardBlazeBuildsSection.KEY).orElse(false);
// We need to perform expansion of query targets if we are to allow for manual targets to be synced.
return projectViewSet.getScalarValue(ShardBlazeBuildsSection.KEY).orElse(false) ||
projectViewSet.getScalarValue(SyncManualTargetsSection.KEY).orElse(false);
}

/** Number of individual targets per blaze build shard. */
Expand Down

0 comments on commit 6808626

Please sign in to comment.