Reuse checked bootstrap catalogs and coordinate execution deadlines
This commit is contained in:
@@ -2,7 +2,11 @@ import { graphExecutionRepresentation } from "./graph-execution.js";
|
||||
import { lstat } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { hexDigest, ExecutionPlanError, type ExecutionPlan } from "./plan.js";
|
||||
import { loadExecutionInstallation, type PackageInstallationSelection } from "./installation.js";
|
||||
import {
|
||||
loadExecutionInstallation,
|
||||
createClientContractCatalog,
|
||||
type PackageInstallationSelection,
|
||||
} from "./installation.js";
|
||||
import {
|
||||
candidateMetadataBudget,
|
||||
readCandidateMetadata,
|
||||
@@ -153,6 +157,7 @@ export async function loadCheckedInstallationCandidate(
|
||||
programs: artifacts.programs,
|
||||
}),
|
||||
};
|
||||
const catalog = createClientContractCatalog(plan, installation, scope, kernel);
|
||||
return {
|
||||
reference,
|
||||
workspace: plan.definition.workspace.workspaceId,
|
||||
@@ -165,11 +170,15 @@ export async function loadCheckedInstallationCandidate(
|
||||
queries,
|
||||
installation,
|
||||
executionPlan: plan as ExecutionPlan,
|
||||
clientContractCatalog: catalog.select,
|
||||
metadata: {
|
||||
get bytes() {
|
||||
return scope.bytes;
|
||||
},
|
||||
release: scope.release,
|
||||
release: () => {
|
||||
catalog.close();
|
||||
scope.release();
|
||||
},
|
||||
},
|
||||
};
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user