Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix part of #59, part of #3926: Upgrade compute affected tests #4929

Merged
merged 90 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
2c3b6ea
Fix issues with compute_affected_tests.
BenHenning Mar 29, 2023
c325bc9
Use base SHA for computing affected tests.
BenHenning Mar 29, 2023
8ae5aa8
Fix updated TODOs.
BenHenning Mar 29, 2023
aaa0299
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning Apr 1, 2023
8a19b4e
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning May 11, 2023
773f7ff
Fix breakage from develop.
BenHenning May 11, 2023
525a601
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning Jun 6, 2023
667bf89
Fix a variety of dev platform-specific issues.
BenHenning Aug 22, 2023
fb59232
Tidy some things up, and revert fragment test.
BenHenning Aug 28, 2023
2551d4b
Fix test behavior inconsistency in test.
BenHenning Sep 11, 2023
714f3ea
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Sep 11, 2023
7488b9f
Fix broken ProfileAndDeviceIdFragmentTest test.
BenHenning Sep 13, 2023
e3d4091
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Oct 26, 2023
5671673
Post-merge fix.
BenHenning Oct 26, 2023
f5ed0c9
Merge branch 'fix-platform-specific-issues' into upgrade-compute-affe…
BenHenning Oct 26, 2023
bd1466d
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Jan 16, 2024
d9b38ea
Merge branch 'fix-platform-specific-issues' into upgrade-compute-affe…
BenHenning Jan 16, 2024
9f1a2ec
Some follow-up post-merge fixes.
BenHenning Jan 17, 2024
39a3add
Make TodoOpenCheck locally runnable.
BenHenning Jan 18, 2024
4f7bfd6
Simplify GitHubIssue & some static fixes/docs.
BenHenning Jan 18, 2024
000bba3
Add ScriptBackgroundCoroutineDispatcher.
BenHenning Jan 18, 2024
79878cd
Some more robustness fixes.
BenHenning Jan 19, 2024
a5f71d6
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Jan 19, 2024
0b55bd4
Post-merge fixes.
BenHenning Jan 19, 2024
53d6727
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Jan 19, 2024
00c7c28
Post-merge fixes & adjustments.
BenHenning Jan 20, 2024
bd97611
Fix BUILD file lint issue.
BenHenning Jan 20, 2024
d54829d
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Jan 20, 2024
fa9cae4
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Jan 20, 2024
0618b12
Static fix checks.
BenHenning Jan 20, 2024
fb148ea
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Jan 20, 2024
ab326ff
Post-merge fixes.
BenHenning Jan 20, 2024
d5bfad5
Merge branch 'upgrade-compute-affected-tests' of github.com:oppia/opp…
BenHenning Jan 20, 2024
211487c
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 6, 2024
1a666a9
Post-merge fixes.
BenHenning Feb 6, 2024
a2ee5d3
Add smoke tests for instr. binaries & tests.
BenHenning Feb 7, 2024
d5b9012
Some minor refactoring for readability.
BenHenning Feb 7, 2024
e6ec869
Fixed broken instrumentation builds.
BenHenning Feb 7, 2024
9f50469
Merge branch 'develop' into fix-instrumentation-build-failure
BenHenning Feb 7, 2024
8dbf4dc
Add missing CODEOWNERS line.
BenHenning Feb 7, 2024
9c38057
Remove old files from CODEOWNERS.
BenHenning Feb 7, 2024
f2ff4e3
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 7, 2024
fad48ed
Add missing tests for TestBlazeWorkspace changes.
BenHenning Feb 8, 2024
e1802c8
Add missing Firebase auth tests.
BenHenning Feb 8, 2024
00c32f6
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 8, 2024
2f87f4d
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 8, 2024
aa3547c
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 8, 2024
d3cbd93
Post-merge fixes for previously missed tests.
BenHenning Feb 8, 2024
13e4358
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 8, 2024
622aced
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 8, 2024
50f41d2
Merge branch 'develop' into fix-instrumentation-build-failure
BenHenning Feb 8, 2024
c8df70e
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 8, 2024
c85d421
Merge branch 'develop' into fix-instrumentation-build-failure
BenHenning Feb 9, 2024
dcf27b6
Merge branch 'fix-instrumentation-build-failure' into fix-platform-sp…
BenHenning Feb 9, 2024
2369514
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 9, 2024
c7ec5d4
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 9, 2024
4b418bd
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 9, 2024
d6a9f70
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Feb 9, 2024
8de4d51
Improve new test robustness.
BenHenning Feb 9, 2024
3f69f11
Fix updated Maven license deps.
BenHenning Feb 9, 2024
ea8e0b1
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 9, 2024
2916770
Update scripts/src/javatests/org/oppia/android/scripts/common/GitClie…
BenHenning Feb 14, 2024
f2d810a
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 14, 2024
808f412
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 14, 2024
2315aea
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 14, 2024
af51395
Add tests for GitHubClient & TodoOpenCheck.
BenHenning Feb 14, 2024
6856e3c
Merge branch 'develop' into fix-platform-specific-issues
BenHenning Feb 14, 2024
5a050de
Merge branch 'fix-platform-specific-issues' into introduce-better-scr…
BenHenning Feb 14, 2024
13b8d4b
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 14, 2024
280b3ec
Add missing docs.
BenHenning Feb 14, 2024
0bd7e2f
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Feb 14, 2024
5951c0f
Post-merge fixes.
BenHenning Feb 15, 2024
a5eb624
Merge branch 'develop' into introduce-better-script-execution-support
BenHenning Feb 20, 2024
ae239b3
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Feb 20, 2024
34ea6aa
Fix broken TodoOpenCheck tests & check exemptions.
BenHenning Feb 20, 2024
df61985
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Feb 20, 2024
e0e74d5
Merge branch 'develop' into introduce-better-script-execution-support
BenHenning Mar 4, 2024
2dd0cd7
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Mar 4, 2024
79a2f0f
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning Mar 4, 2024
70df9b3
Merge branch 'develop' into introduce-better-script-execution-support
BenHenning Mar 14, 2024
04fc8b8
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Mar 14, 2024
c301eed
Address reviewer comment.
BenHenning Mar 14, 2024
51a96ce
Merge branch 'develop' into introduce-better-script-execution-support
seanlip Mar 15, 2024
b3e2fd9
Merge commit 'e2f94e41e4cba3bc5b5f3af65f7c43a6543b4c52' into introduc…
BenHenning Mar 20, 2024
73a8bce
Merge branch 'introduce-better-script-execution-support' into make-to…
BenHenning Mar 20, 2024
f48f78e
Merge branch 'develop' into make-todo-check-locally-runnable
BenHenning Mar 20, 2024
02ccc87
Merge branch 'develop' into make-todo-check-locally-runnable
BenHenning May 16, 2024
28fcb9d
Merge branch 'make-todo-check-locally-runnable' into upgrade-compute-…
BenHenning May 16, 2024
4cf06d4
Address self-review comments.
BenHenning May 16, 2024
3dc6b7b
Merge branch 'develop' into upgrade-compute-affected-tests
BenHenning May 22, 2024
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
4 changes: 3 additions & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ jobs:
id: compute-test-matrix
env:
compute_all_targets: ${{ contains(github.event.pull_request.title, '[RunAllTests]') }}
# See: https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request.
base_commit_hash: ${{ github.event.pull_request.base.sha }}
# https://unix.stackexchange.com/a/338124 for reference on creating a JSON-friendly
# comma-separated list of test targets for the matrix.
run: |
bazel run //scripts:compute_affected_tests -- $(pwd) $(pwd)/affected_targets.log origin/develop compute_all_tests=$compute_all_targets
bazel run //scripts:compute_affected_tests -- $(pwd) $(pwd)/affected_targets.log $base_commit_hash compute_all_tests=$compute_all_targets
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
TEST_BUCKET_LIST=$(cat ./affected_targets.log | sed 's/^\|$/"/g' | paste -sd, -)
echo "Affected tests (note that this might be all tests if configured to run all or on the develop branch): $TEST_BUCKET_LIST"
echo "::set-output name=matrix::{\"affected-tests-bucket-base64-encoded-shard\":[$TEST_BUCKET_LIST]}"
Expand Down
74 changes: 37 additions & 37 deletions scripts/assets/todo_open_exemptions.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -232,24 +232,24 @@ todo_open_exemption {
}
todo_open_exemption {
exempted_file_path: "scripts/src/javatests/org/oppia/android/scripts/todo/TodoIssueResolvedCheckTest.kt"
line_number: 69
line_number: 71
line_number: 73
line_number: 79
line_number: 77
line_number: 93
line_number: 95
line_number: 97
line_number: 103
line_number: 131
line_number: 133
line_number: 139
line_number: 101
line_number: 128
line_number: 130
line_number: 136
line_number: 140
line_number: 142
line_number: 143
line_number: 145
line_number: 146
line_number: 177
line_number: 179
line_number: 185
line_number: 189
line_number: 191
line_number: 192
line_number: 172
line_number: 174
line_number: 180
line_number: 184
line_number: 186
line_number: 187
}
todo_open_exemption {
exempted_file_path: "scripts/src/javatests/org/oppia/android/scripts/todo/TodoOpenCheckTest.kt"
Expand Down Expand Up @@ -281,58 +281,58 @@ todo_open_exemption {
line_number: 287
line_number: 288
line_number: 292
line_number: 336
line_number: 337
line_number: 338
line_number: 342
line_number: 411
line_number: 339
line_number: 343
line_number: 412
line_number: 418
line_number: 420
line_number: 438
line_number: 413
line_number: 419
line_number: 421
line_number: 439
line_number: 440
line_number: 441
line_number: 442
line_number: 457
line_number: 443
line_number: 458
line_number: 461
line_number: 476
line_number: 459
line_number: 462
line_number: 477
line_number: 478
line_number: 479
line_number: 480
line_number: 481
line_number: 482
line_number: 485
line_number: 483
line_number: 486
line_number: 487
line_number: 505
line_number: 509
line_number: 569
line_number: 488
line_number: 506
line_number: 510
line_number: 570
line_number: 576
line_number: 578
line_number: 599
line_number: 571
line_number: 577
line_number: 579
line_number: 600
line_number: 601
line_number: 602
line_number: 603
line_number: 640
line_number: 604
line_number: 641
line_number: 644
line_number: 677
line_number: 642
line_number: 645
line_number: 678
line_number: 679
line_number: 680
line_number: 681
line_number: 682
line_number: 683
line_number: 686
line_number: 684
line_number: 687
line_number: 688
line_number: 736
line_number: 740
line_number: 689
line_number: 737
line_number: 741
}
todo_open_exemption {
exempted_file_path: "scripts/static_checks.sh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.oppia.android.scripts.common.ScriptBackgroundCoroutineDispatcher
import org.oppia.android.scripts.proto.AffectedTestsBucket
import java.io.File
import java.util.Locale
import java.util.concurrent.TimeUnit
import kotlin.system.exitProcess

private const val COMPUTE_ALL_TESTS_PREFIX = "compute_all_tests="
Expand All @@ -28,27 +29,28 @@ private const val MAX_TEST_COUNT_PER_SMALL_SHARD = 15
* Arguments:
* - path_to_directory_root: directory path to the root of the Oppia Android repository.
* - path_to_output_file: path to the file in which the affected test targets will be printed.
* - base_develop_branch_reference: the reference to the local develop branch that should be use.
* Generally, this is 'origin/develop'.
* - merge_base_commit: the base commit against which the local changes will be compared when
* determining which tests to run. When running outside of CI you can use the result of running:
* 'git merge-base develop HEAD'
* - compute_all_tests: whether to compute a list of all tests to run.
*
* Example:
* bazel run //scripts:compute_affected_tests -- $(pwd) /tmp/affected_test_buckets.proto64 \\
* origin/develop compute_all_tests=false
* abcdef0123456789 compute_all_tests=false
*/
fun main(args: Array<String>) {
if (args.size < 4) {
println(
"Usage: bazel run //scripts:compute_affected_tests --" +
" <path_to_directory_root> <path_to_output_file> <base_develop_branch_reference>" +
" <path_to_directory_root> <path_to_output_file> <merge_base_commit>" +
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
" <compute_all_tests=true/false>"
)
exitProcess(1)
}

val pathToRoot = args[0]
val pathToOutputFile = args[1]
val baseDevelopBranchReference = args[2]
val baseCommit = args[2]
val computeAllTestsSetting = args[3].let {
check(it.startsWith(COMPUTE_ALL_TESTS_PREFIX)) {
"Expected last argument to start with '$COMPUTE_ALL_TESTS_PREFIX'"
Expand All @@ -62,7 +64,7 @@ fun main(args: Array<String>) {
}
ScriptBackgroundCoroutineDispatcher().use { scriptBgDispatcher ->
ComputeAffectedTests(scriptBgDispatcher)
.compute(pathToRoot, pathToOutputFile, baseDevelopBranchReference, computeAllTestsSetting)
.compute(pathToRoot, pathToOutputFile, baseCommit, computeAllTestsSetting)
}
}

Expand All @@ -81,7 +83,10 @@ class ComputeAffectedTests(
val maxTestCountPerLargeShard: Int = MAX_TEST_COUNT_PER_LARGE_SHARD,
val maxTestCountPerMediumShard: Int = MAX_TEST_COUNT_PER_MEDIUM_SHARD,
val maxTestCountPerSmallShard: Int = MAX_TEST_COUNT_PER_SMALL_SHARD,
val commandExecutor: CommandExecutor = CommandExecutorImpl(scriptBgDispatcher)
val commandExecutor: CommandExecutor =
CommandExecutorImpl(
scriptBgDispatcher, processTimeout = 5, processTimeoutUnit = TimeUnit.MINUTES
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
)
) {
private companion object {
private const val GENERIC_TEST_BUCKET_NAME = "generic"
Expand All @@ -93,28 +98,28 @@ class ComputeAffectedTests(
* @param pathToRoot the absolute path to the working root directory
* @param pathToOutputFile the absolute path to the file in which the encoded Base64 test bucket
* protos should be printed
* @param baseDevelopBranchReference see [GitClient]
* @param baseCommit see [GitClient]
* @param computeAllTestsSetting whether all tests should be outputted versus only the ones which
* are affected by local changes in the repository
*/
fun compute(
pathToRoot: String,
pathToOutputFile: String,
baseDevelopBranchReference: String,
baseCommit: String,
computeAllTestsSetting: Boolean
) {
val rootDirectory = File(pathToRoot).absoluteFile
check(rootDirectory.isDirectory) { "Expected '$pathToRoot' to be a directory" }
check(rootDirectory.list().contains("WORKSPACE")) {
check(rootDirectory.list()?.contains("WORKSPACE") == true) {
"Expected script to be run from the workspace's root directory"
}

println("Running from directory root: $rootDirectory")
println("Running from directory root: $rootDirectory.")

val gitClient = GitClient(rootDirectory, baseDevelopBranchReference, commandExecutor)
val gitClient = GitClient(rootDirectory, baseCommit, commandExecutor)
val bazelClient = BazelClient(rootDirectory, commandExecutor)
println("Current branch: ${gitClient.currentBranch}")
println("Most recent common commit: ${gitClient.branchMergeBase}")
println("Current branch: ${gitClient.currentBranch}.")
println("Most recent common commit: ${gitClient.branchMergeBase}.")

val currentBranch = gitClient.currentBranch.toLowerCase(Locale.US)
val affectedTestTargets = if (computeAllTestsSetting || currentBranch == "develop") {
Expand All @@ -139,7 +144,7 @@ class ComputeAffectedTests(
}

private fun computeAllTestTargets(bazelClient: BazelClient): List<String> {
println("Computing all test targets")
println("Computing all test targets...")
return bazelClient.retrieveAllTestTargets()
}

Expand All @@ -153,38 +158,45 @@ class ComputeAffectedTests(
val changedFiles = gitClient.changedFiles.filter { filepath ->
File(rootDirectory, filepath).exists()
}.toSet()
println("Changed files (per Git): $changedFiles")
println("Changed files (per Git, ${changedFiles.size} total): $changedFiles.")

// Compute the changed targets 100 files at a time to avoid unnecessarily long-running Bazel
// commands.
val changedFileTargets =
changedFiles.chunked(size = 100).fold(initial = setOf<String>()) { allTargets, filesChunk ->
allTargets + bazelClient.retrieveBazelTargets(filesChunk).toSet()
}
println("Changed Bazel file targets: $changedFileTargets")
println("Changed Bazel file targets (${changedFileTargets.size} total): $changedFileTargets.")

// Similarly, compute the affect test targets list 100 file targets at a time.
val affectedTestTargets =
changedFileTargets.chunked(size = 100)
.fold(initial = setOf<String>()) { allTargets, targetChunk ->
allTargets + bazelClient.retrieveRelatedTestTargets(targetChunk).toSet()
}
println("Affected Bazel test targets: $affectedTestTargets")
println(
"Affected Bazel test targets (${affectedTestTargets.size} total): $affectedTestTargets."
)

// Compute the list of Bazel files that were changed.
val changedBazelFiles = changedFiles.filter { file ->
file.endsWith(".bzl", ignoreCase = true) ||
file.endsWith(".bazel", ignoreCase = true) ||
file == "WORKSPACE"
}
println("Changed Bazel-specific support files: $changedBazelFiles")
println(
"Changed Bazel-specific support files (${changedBazelFiles.size} total): $changedBazelFiles."
)

// Compute the list of affected tests based on BUILD/Bazel/WORKSPACE files. These are generally
// framed as: if a BUILD file changes, run all tests transitively connected to it.
val transitiveTestTargets = bazelClient.retrieveTransitiveTestTargets(changedBazelFiles)
println("Affected test targets due to transitive build deps: $transitiveTestTargets")
println(
"Affected test targets due to transitive build deps (${transitiveTestTargets.size} total):" +
" $transitiveTestTargets."
)

return (affectedTestTargets + transitiveTestTargets).toSet().toList()
return (affectedTestTargets + transitiveTestTargets).distinct()
}

private fun filterTargets(testTargets: List<String>): List<String> {
Expand Down Expand Up @@ -321,7 +333,7 @@ class ComputeAffectedTests(
private val EXTRACT_BUCKET_REGEX = "^//([^(/|:)]+?)[/:].+?\$".toRegex()

/** Returns the [TestBucket] that corresponds to the specific [testTarget]. */
fun retrieveCorrespondingTestBucket(testTarget: String): TestBucket? {
fun retrieveCorrespondingTestBucket(testTarget: String): TestBucket {
return EXTRACT_BUCKET_REGEX.matchEntire(testTarget)
?.groupValues
?.maybeSecond()
Expand Down
21 changes: 11 additions & 10 deletions scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import java.util.Locale
* Utility class to query & interact with a Bazel workspace on the local filesystem (residing within
* the specified root directory).
*/
class BazelClient(
private val rootDirectory: File,
private val commandExecutor: CommandExecutor
) {
class BazelClient(private val rootDirectory: File, private val commandExecutor: CommandExecutor) {
/** Returns all Bazel test targets in the workspace. */
fun retrieveAllTestTargets(): List<String> {
return correctPotentiallyBrokenTargetNames(
Expand Down Expand Up @@ -57,16 +54,19 @@ class BazelClient(
// Note that this check is needed since rbuildfiles() doesn't like taking an empty list.
return if (buildFileList.isNotEmpty()) {
val referencingBuildFiles =
executeBazelCommand(
"query",
runPotentiallyShardedQueryCommand(
"filter('^[^@]', rbuildfiles(%s))", // Use a filter to limit the search space.
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
buildFiles,
"--noshow_progress",
"--universe_scope=//...",
"--order_output=no",
"rbuildfiles($buildFileList)"
delimiter = ","
)
// Compute only test & library siblings for each individual build file. While this is both
// much slower than a fully combined query & can potentially miss targets, it runs
// substantially faster per query and helps to avoid potential hanging in CI.
// substantially faster per query and helps to avoid potential hanging in CI. Note also that
// this is more correct than a combined query since it ensures that siblings checks are
// properly unique for each file being considered (vs. searching for common siblings).
val relevantSiblings = referencingBuildFiles.flatMap { buildFileTarget ->
retrieveFilteredSiblings(filterRuleType = "test", buildFileTarget) +
retrieveFilteredSiblings(filterRuleType = "android_library", buildFileTarget)
Expand All @@ -77,7 +77,7 @@ class BazelClient(
relevantSiblings,
"--noshow_progress",
"--universe_scope=//...",
"--order_output=no",
"--order_output=no"
)
)
} else listOf()
Expand Down Expand Up @@ -142,6 +142,7 @@ class BazelClient(
queryFormatStr: String,
values: Iterable<String>,
vararg prefixArgs: String,
delimiter: String = " ",
allowPartialFailures: Boolean = false
): List<String> {
// Split up values into partitions to ensure that the argument calls don't over-run the limit.
Expand All @@ -154,7 +155,7 @@ class BazelClient(

// Fragment the query across the partitions to ensure all values can be considered.
return partitions.flatMap { partition ->
val lastArgument = queryFormatStr.format(Locale.US, partition.joinToString(" "))
val lastArgument = queryFormatStr.format(Locale.US, partition.joinToString(delimiter))
val allArguments = prefixArgs.toList() + lastArgument
executeBazelCommand(
"query", *allArguments.toTypedArray(), allowPartialFailures = allowPartialFailures
Expand Down
Loading
Loading