mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 10:20:21 +00:00
Tests: cap CI extension batch concurrency
This commit is contained in:
@@ -1359,6 +1359,24 @@ export const formatExecutionUnitSummary = (unit) =>
|
||||
unit.maxWorkers ?? "default",
|
||||
)} surface=${unit.surface} isolate=${unit.isolate ? "yes" : "no"} pool=${unit.pool}`;
|
||||
|
||||
function resolveSurfaceAwareTopLevelParallelLimit(context, units, defaultLimit) {
|
||||
if (!context.runtime.isCI || context.noIsolateArgs.length === 0) {
|
||||
return defaultLimit;
|
||||
}
|
||||
|
||||
const sharedExtensionUnits = units.filter(
|
||||
(unit) => unit.surface === "extensions" && !unit.isolate,
|
||||
);
|
||||
if (sharedExtensionUnits.length <= 1) {
|
||||
return defaultLimit;
|
||||
}
|
||||
|
||||
// Shared extension batches can each retain multiple GiB in CI. Limit that
|
||||
// phase to two concurrent lanes so provider-contract checks are not starved
|
||||
// behind unrelated memory-heavy extension suites.
|
||||
return Math.min(defaultLimit, 2);
|
||||
}
|
||||
|
||||
export function explainExecutionTarget(request, options = {}) {
|
||||
const context = createPlannerContext(request, options);
|
||||
context.noIsolateArgs =
|
||||
@@ -1492,7 +1510,11 @@ export function buildExecutionPlan(request, options = {}) {
|
||||
context.noIsolateArgs.length > 0
|
||||
? context.executionBudget.topLevelParallelLimitNoIsolate
|
||||
: context.executionBudget.topLevelParallelLimitIsolated;
|
||||
const defaultTopLevelParallelLimit = baseTopLevelParallelLimit;
|
||||
const defaultTopLevelParallelLimit = resolveSurfaceAwareTopLevelParallelLimit(
|
||||
context,
|
||||
selectedUnits,
|
||||
baseTopLevelParallelLimit,
|
||||
);
|
||||
const topLevelParallelLimit = Math.max(
|
||||
1,
|
||||
parseEnvNumber(env, "OPENCLAW_TEST_TOP_LEVEL_CONCURRENCY", defaultTopLevelParallelLimit),
|
||||
|
||||
Reference in New Issue
Block a user