mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-02 15:33:16 +00:00
fix: Naming nits to init sandbox (#253)
* fix: Naming nits to init sandbox * cr
This commit is contained in:
parent
23418cab1c
commit
c8c19dd5ba
1 changed files with 7 additions and 11 deletions
|
|
@ -80,7 +80,7 @@ export async function initializeSandbox(
|
||||||
nodeId: INITIALIZE_NODE_ID,
|
nodeId: INITIALIZE_NODE_ID,
|
||||||
createdAt: new Date().toISOString(),
|
createdAt: new Date().toISOString(),
|
||||||
actionId: uuidv4(),
|
actionId: uuidv4(),
|
||||||
action: "Resuming Sandbox",
|
action: "Resuming sandbox",
|
||||||
data: {
|
data: {
|
||||||
status: "skipped",
|
status: "skipped",
|
||||||
branch: branchName,
|
branch: branchName,
|
||||||
|
|
@ -111,7 +111,7 @@ export async function initializeSandbox(
|
||||||
nodeId: INITIALIZE_NODE_ID,
|
nodeId: INITIALIZE_NODE_ID,
|
||||||
createdAt: new Date().toISOString(),
|
createdAt: new Date().toISOString(),
|
||||||
actionId: resumeSandboxActionId,
|
actionId: resumeSandboxActionId,
|
||||||
action: "Resuming Sandbox",
|
action: "Resuming sandbox",
|
||||||
data: {
|
data: {
|
||||||
status: "pending",
|
status: "pending",
|
||||||
sandboxSessionId,
|
sandboxSessionId,
|
||||||
|
|
@ -145,11 +145,7 @@ export async function initializeSandbox(
|
||||||
existingSandbox,
|
existingSandbox,
|
||||||
);
|
);
|
||||||
if (!pullChangesRes || pullChangesRes.exitCode !== 0) {
|
if (!pullChangesRes || pullChangesRes.exitCode !== 0) {
|
||||||
emitStepEvent(
|
emitStepEvent(basePullLatestChangesAction, "skipped");
|
||||||
basePullLatestChangesAction,
|
|
||||||
"error",
|
|
||||||
"Failed to pull latest changes. Please check your repository connection.",
|
|
||||||
);
|
|
||||||
throw new Error("Failed to pull latest changes.");
|
throw new Error("Failed to pull latest changes.");
|
||||||
}
|
}
|
||||||
emitStepEvent(basePullLatestChangesAction, "success");
|
emitStepEvent(basePullLatestChangesAction, "success");
|
||||||
|
|
@ -187,19 +183,19 @@ export async function initializeSandbox(
|
||||||
} catch {
|
} catch {
|
||||||
emitStepEvent(
|
emitStepEvent(
|
||||||
baseResumeSandboxAction,
|
baseResumeSandboxAction,
|
||||||
"error",
|
"skipped",
|
||||||
"Failed to resume sandbox. A new environment will be created.",
|
"Unable to resume sandbox. A new environment will be created.",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creating Sandbox
|
// Creating sandbox
|
||||||
const createSandboxActionId = uuidv4();
|
const createSandboxActionId = uuidv4();
|
||||||
const baseCreateSandboxAction: CustomNodeEvent = {
|
const baseCreateSandboxAction: CustomNodeEvent = {
|
||||||
nodeId: INITIALIZE_NODE_ID,
|
nodeId: INITIALIZE_NODE_ID,
|
||||||
createdAt: new Date().toISOString(),
|
createdAt: new Date().toISOString(),
|
||||||
actionId: createSandboxActionId,
|
actionId: createSandboxActionId,
|
||||||
action: "Creating Sandbox",
|
action: "Creating sandbox",
|
||||||
data: {
|
data: {
|
||||||
status: "pending",
|
status: "pending",
|
||||||
sandboxSessionId: null,
|
sandboxSessionId: null,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue