fix: persist session workspace across runs
This commit is contained in:
@@ -142,7 +142,9 @@ export async function createKubernetesRunnerJob(options: { store: AgentRunStore;
|
||||
const pvcName = refreshed?.storagePvcName ?? ensured.pvcName;
|
||||
if (!pvcName) throw new AgentRunError("infra-failed", `session ${run.sessionRef.sessionId} PVC was not resolved for runner job`, { httpStatus: 502 });
|
||||
const subdir = refreshed?.codexRolloutSubdir ?? ensured.codexRolloutSubdir ?? "sessions";
|
||||
sessionPvc = { pvcName, namespace: refreshed?.storageNamespace ?? ensured.namespace ?? namespace, mountPath: `/home/agentrun/.codex-${run.backendProfile}/${subdir}`, codexRolloutSubdir: subdir };
|
||||
const mountPath = `/home/agentrun/.codex-${run.backendProfile}/${subdir}`;
|
||||
const workspacePath = `${mountPath}/agentrun-workspace`;
|
||||
sessionPvc = { pvcName, namespace: refreshed?.storageNamespace ?? ensured.namespace ?? namespace, mountPath, codexRolloutSubdir: subdir, workspacePath };
|
||||
sessionPvcSummary = {
|
||||
sessionId: run.sessionRef.sessionId,
|
||||
pvcName: sessionPvc.pvcName,
|
||||
@@ -150,6 +152,7 @@ export async function createKubernetesRunnerJob(options: { store: AgentRunStore;
|
||||
pvcPhase: refreshed?.storagePvcPhase ?? ensured.pvcPhase ?? null,
|
||||
mountPath: sessionPvc.mountPath,
|
||||
codexRolloutSubdir: sessionPvc.codexRolloutSubdir,
|
||||
workspacePath: sessionPvc.workspacePath ?? null,
|
||||
valuesPrinted: false,
|
||||
};
|
||||
if (ensured.pvcPhase === "NotFound" || ensured.pvcPhase === "Unknown") {
|
||||
|
||||
Reference in New Issue
Block a user