fix(canvas-agent): avoid production migration numbering collision
This commit is contained in:
parent
650a94db72
commit
3ad7fd6b45
@ -607,8 +607,8 @@
|
|||||||
{
|
{
|
||||||
"idx": 84,
|
"idx": 84,
|
||||||
"version": "7",
|
"version": "7",
|
||||||
"when": 1792022400000,
|
"when": 1792454400000,
|
||||||
"tag": "0100_add_canvas_agent_runs",
|
"tag": "0104_add_canvas_agent_runs",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -25,7 +25,7 @@ required. Configure the project service:
|
|||||||
- `CANVAS_ZCODE_STATE_DIR=/var/lib/yedir-canvas-agent`
|
- `CANVAS_ZCODE_STATE_DIR=/var/lib/yedir-canvas-agent`
|
||||||
- `CANVAS_ZCODE_NODE_PATH=/opt/yedir-canvas-zcode/current/bin/node`
|
- `CANVAS_ZCODE_NODE_PATH=/opt/yedir-canvas-zcode/current/bin/node`
|
||||||
|
|
||||||
Apply the additive `0100_add_canvas_agent_runs.sql` migration before the new
|
Apply the additive `0104_add_canvas_agent_runs.sql` migration before the new
|
||||||
route is used. The host service launches a scope, drops to a unique numeric task
|
route is used. The host service launches a scope, drops to a unique numeric task
|
||||||
UID and starts unshared mount/user/PID/network/IPC namespaces. Each task mounts
|
UID and starts unshared mount/user/PID/network/IPC namespaces. Each task mounts
|
||||||
only its workspace/home, read-only runtime/system binaries and its exact broker
|
only its workspace/home, read-only runtime/system binaries and its exact broker
|
||||||
|
|||||||
@ -45,7 +45,7 @@ test.describe("canvas agent durable run isolation", () => {
|
|||||||
await client.unsafe(
|
await client.unsafe(
|
||||||
'CREATE TABLE "User" ("id" uuid PRIMARY KEY); CREATE TABLE "Chat" ("id" uuid PRIMARY KEY, "userId" uuid NOT NULL); CREATE TABLE "CanvasProject" ("id" uuid PRIMARY KEY, "userId" uuid NOT NULL, "workspaceType" varchar DEFAULT \'canvas\', "canvasData" jsonb, "updatedAt" timestamp DEFAULT now());',
|
'CREATE TABLE "User" ("id" uuid PRIMARY KEY); CREATE TABLE "Chat" ("id" uuid PRIMARY KEY, "userId" uuid NOT NULL); CREATE TABLE "CanvasProject" ("id" uuid PRIMARY KEY, "userId" uuid NOT NULL, "workspaceType" varchar DEFAULT \'canvas\', "canvasData" jsonb, "updatedAt" timestamp DEFAULT now());',
|
||||||
);
|
);
|
||||||
await client.unsafe(readFileSync("lib/db/migrations/0100_add_canvas_agent_runs.sql", "utf8"));
|
await client.unsafe(readFileSync("lib/db/migrations/0104_add_canvas_agent_runs.sql", "utf8"));
|
||||||
await client`INSERT INTO "User" VALUES (${owner}), (${other})`;
|
await client`INSERT INTO "User" VALUES (${owner}), (${other})`;
|
||||||
await client`INSERT INTO "Chat" VALUES (${chatId}, ${owner}), (${otherChat}, ${other})`;
|
await client`INSERT INTO "Chat" VALUES (${chatId}, ${owner}), (${otherChat}, ${other})`;
|
||||||
await client`INSERT INTO "CanvasProject" ("id", "userId") VALUES (${projectId}, ${owner}), (${otherProject}, ${other})`;
|
await client`INSERT INTO "CanvasProject" ("id", "userId") VALUES (${projectId}, ${owner}), (${otherProject}, ${other})`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user