fix: harden runtime config lease boundary
This commit is contained in:
@@ -141,7 +141,7 @@ export class ThtRunner {
|
||||
}
|
||||
|
||||
/** Render the pinned registry revision through the shared deterministic lease. */
|
||||
acquireWorkspaceRuntime(workspaceConfigPath: string): RuntimeConfigLease {
|
||||
async acquireWorkspaceRuntime(workspaceConfigPath: string): Promise<RuntimeConfigLease> {
|
||||
return this.runtimeConfigLeases().acquireSession(workspaceConfigPath);
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ export class ThtRunner {
|
||||
static readonly DEFAULT_TIMEOUT_MS = 60_000;
|
||||
static readonly DWH_TIMEOUT_MS = 120_000;
|
||||
|
||||
run(
|
||||
async run(
|
||||
args: string[], workspaceConfigPath?: string, timeoutMs: number = ThtRunner.DEFAULT_TIMEOUT_MS,
|
||||
): Promise<{ code: number; stdout: string; stderr: string }> {
|
||||
if (
|
||||
@@ -293,7 +293,7 @@ export class ThtRunner {
|
||||
) {
|
||||
let runtime: RuntimeConfigLease;
|
||||
try {
|
||||
runtime = this.acquireWorkspaceRuntime(workspaceConfigPath);
|
||||
runtime = await this.acquireWorkspaceRuntime(workspaceConfigPath);
|
||||
} catch (error) {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user