redkite 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -1
- package/dist/build.d.ts +3 -2
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +14 -7
- package/dist/build.js.map +1 -1
- package/dist/cli/agent.d.ts +5 -1
- package/dist/cli/agent.d.ts.map +1 -1
- package/dist/cli/agent.js +7 -7
- package/dist/cli/agent.js.map +1 -1
- package/dist/cli/crash.d.ts +46 -0
- package/dist/cli/crash.d.ts.map +1 -0
- package/dist/cli/crash.js +204 -0
- package/dist/cli/crash.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +50 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/log.d.ts +1 -0
- package/dist/cli/log.d.ts.map +1 -1
- package/dist/cli/log.js +4 -3
- package/dist/cli/log.js.map +1 -1
- package/dist/cli/screen.d.ts +3 -0
- package/dist/cli/screen.d.ts.map +1 -1
- package/dist/cli/screen.js +32 -6
- package/dist/cli/screen.js.map +1 -1
- package/dist/cli/viewer.d.ts.map +1 -1
- package/dist/cli/viewer.js +5 -5
- package/dist/cli/viewer.js.map +1 -1
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +72 -6
- package/dist/deploy.js.map +1 -1
- package/dist/docker.d.ts +1 -0
- package/dist/docker.d.ts.map +1 -1
- package/dist/docker.js +5 -0
- package/dist/docker.js.map +1 -1
- package/dist/health.d.ts +2 -2
- package/dist/health.d.ts.map +1 -1
- package/dist/health.js +17 -9
- package/dist/health.js.map +1 -1
- package/dist/log.d.ts +3 -0
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +13 -0
- package/dist/log.js.map +1 -1
- package/dist/source.d.ts +2 -0
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +20 -0
- package/dist/source.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/build.ts +23 -11
- package/src/cli/agent.ts +8 -8
- package/src/cli/crash.ts +287 -0
- package/src/cli/index.ts +59 -17
- package/src/cli/log.ts +4 -3
- package/src/cli/screen.ts +45 -4
- package/src/cli/viewer.ts +5 -4
- package/src/deploy.ts +88 -6
- package/src/docker.ts +6 -0
- package/src/health.ts +23 -16
- package/src/log.ts +19 -1
- package/src/source.ts +24 -0
- package/src/types.ts +9 -0
package/README.md
CHANGED
|
@@ -357,6 +357,26 @@ failure says which kind was missing: *"acme/backend has no tag v9"*.
|
|
|
357
357
|
An environment can only say `branch`. A tag or a commit is a claim about one
|
|
358
358
|
repository, and an environment spans every app in the deployment.
|
|
359
359
|
|
|
360
|
+
Each app is cloned as a step of its own, ahead of its build. It says the
|
|
361
|
+
repository and what it is fetching as it starts, and says them again with the
|
|
362
|
+
commit it landed on when it ends, so the row keeps them after the step's
|
|
363
|
+
progress has moved on:
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
✔ Cloning backend: [GH] acme/backend staging -> 64ae9f1 (2s)
|
|
367
|
+
✔ Building backend: 64ae9f1 (1m12s)
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
A repository on GitHub is named by its path, with a blue `GH` label with rounded
|
|
371
|
+
ends in place of the host; anywhere without colour, a CI log or a crash log, the
|
|
372
|
+
label is written `[GH]`. The `.git` is dropped. A branch goes by its name alone,
|
|
373
|
+
and a pin says which kind it is: `tag v1.2.3`, `commit 9f2b4c1`.
|
|
374
|
+
|
|
375
|
+
A repository that cannot be reached, or a branch it does not have, fails that
|
|
376
|
+
step rather than the build, and gets a file of its own in the crash log. An app
|
|
377
|
+
built from a directory is read where it is rather than cloned, so it has no
|
|
378
|
+
such step.
|
|
379
|
+
|
|
360
380
|
### Building from a directory
|
|
361
381
|
|
|
362
382
|
An app names either a repository to clone or a directory already on this
|
|
@@ -1172,6 +1192,58 @@ the CPU and disk it is using. Nothing will clean up after it but you.
|
|
|
1172
1192
|
|
|
1173
1193
|
The sixth press leaves.
|
|
1174
1194
|
|
|
1195
|
+
### When a run fails
|
|
1196
|
+
|
|
1197
|
+
A run that throws, or a deploy that reverts, leaves everything it said on disk:
|
|
1198
|
+
|
|
1199
|
+
```
|
|
1200
|
+
/tmp/<project>/<environment>/crash-2026-09-14T10-22-05.123Z/
|
|
1201
|
+
run.log
|
|
1202
|
+
01-reading-the-bitwarden-vault.log
|
|
1203
|
+
02-setup.log
|
|
1204
|
+
03-building-frontend.log
|
|
1205
|
+
04-building-backend.log
|
|
1206
|
+
05-swap-before-migrate-backend.log
|
|
1207
|
+
```
|
|
1208
|
+
|
|
1209
|
+
`run.log` holds what happened around the steps: the command, the version, the
|
|
1210
|
+
whole error chain with every stack in it, an index of the step files with how
|
|
1211
|
+
each ended, and every message and host command in the order they came. Host
|
|
1212
|
+
commands are kept whether or not `--verbose` showed them, since they are what a
|
|
1213
|
+
crash log is read for.
|
|
1214
|
+
|
|
1215
|
+
Each step is a file of its own, numbered in the order the steps started, with
|
|
1216
|
+
what it was doing as it went and every line its commands printed. Every app
|
|
1217
|
+
builds as its own step, so one app's output is never read through another's.
|
|
1218
|
+
The view keeps only each step's tail and the terminal gets only the end of the
|
|
1219
|
+
error; these keep all of it. Every line is stamped from the start of the run,
|
|
1220
|
+
the same clock in every file.
|
|
1221
|
+
|
|
1222
|
+
A health check that fails adds a step for each app, `Logs of <app>`, holding the
|
|
1223
|
+
last 200 lines its new container printed, both streams, with docker's own
|
|
1224
|
+
timestamps. They are read before the revert, because the revert gives the live
|
|
1225
|
+
name back to the previous release and anything asked after it would be that
|
|
1226
|
+
release's output. Every new container is read rather than only the one that
|
|
1227
|
+
failed, since a backend that never came up is often explained by what another
|
|
1228
|
+
app says it could not reach. The one that failed its check is marked failed,
|
|
1229
|
+
which puts its last lines on the screen when the run ends, and each has a file
|
|
1230
|
+
of its own here.
|
|
1231
|
+
|
|
1232
|
+
The path is `/tmp` itself rather than `TMPDIR`, so it is where a person is told
|
|
1233
|
+
to look. The directories are `700` and the files `600`, because `/tmp` is shared
|
|
1234
|
+
and a build's output can say more than it meant to. A run somebody stopped is
|
|
1235
|
+
not a crash and writes nothing.
|
|
1236
|
+
|
|
1237
|
+
A deployment that wants none of it says so:
|
|
1238
|
+
|
|
1239
|
+
```ts
|
|
1240
|
+
export default defineDeployment({
|
|
1241
|
+
project: "acme",
|
|
1242
|
+
options: { crashLog: false },
|
|
1243
|
+
// ...
|
|
1244
|
+
});
|
|
1245
|
+
```
|
|
1246
|
+
|
|
1175
1247
|
## GitHub Actions
|
|
1176
1248
|
|
|
1177
1249
|
There is a composite action in this repository. `verify` on a pull request,
|
|
@@ -1271,7 +1343,10 @@ with the agent forwarded.
|
|
|
1271
1343
|
6. **Swap.** The running container moves to the retired address without being
|
|
1272
1344
|
stopped and is renamed, and only then does the live address belong to the new
|
|
1273
1345
|
one. Nginx keeps the retired container as a backup upstream.
|
|
1274
|
-
7. **Check.** Each app is probed on itself
|
|
1346
|
+
7. **Check.** Each app is probed on itself, as a step of its own,
|
|
1347
|
+
`Health check of <app>`, which says what the container answered on every
|
|
1348
|
+
attempt. One failure reverts all of them, after writing out the last 200
|
|
1349
|
+
lines every new container printed.
|
|
1275
1350
|
8. **Cleanup.** Retired containers removed, superseded images reclaimed.
|
|
1276
1351
|
|
|
1277
1352
|
A `verify` run walks the same list without steps 5 to 7. In their place it runs
|
package/dist/build.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Docker } from "./docker.js";
|
|
2
|
-
import type { Ref } from "./source.js";
|
|
2
|
+
import type { Ref, Source } from "./source.js";
|
|
3
3
|
import type { Host } from "./host.js";
|
|
4
4
|
import type { AppTopology } from "./topology.js";
|
|
5
5
|
import type { AppSpec } from "./types.js";
|
|
@@ -26,5 +26,6 @@ export type BuildResult = {
|
|
|
26
26
|
cached: boolean;
|
|
27
27
|
};
|
|
28
28
|
export declare function refOf(app: AppSpec, branch: string): Ref;
|
|
29
|
-
export declare function
|
|
29
|
+
export declare function sourceOf(app: AppSpec, topology: AppTopology, context: Pick<BuildContext, "host" | "branch" | "detail" | "output">): Promise<Source>;
|
|
30
|
+
export declare function build(app: AppSpec, topology: AppTopology, context: BuildContext, checkedOut?: Source): Promise<BuildResult>;
|
|
30
31
|
//# sourceMappingURL=build.d.ts.map
|
package/dist/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAM1C,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IAGf,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAEzC,GAAG,EAAE,MAAM,CAAC;IAEZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IAGpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AAOF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAEhB,WAAW,EAAE,MAAM,CAAC;IAEpB,GAAG,EAAE,MAAM,CAAC;IAIZ,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAKF,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,CAKvD;AAID,wBAAsB,QAAQ,CAC5B,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC,GACnE,OAAO,CAAC,MAAM,CAAC,CAajB;AAED,wBAAsB,KAAK,CACzB,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,YAAY,EAErB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,WAAW,CAAC,CA+EtB"}
|
package/dist/build.js
CHANGED
|
@@ -16,11 +16,10 @@ export function refOf(app, branch) {
|
|
|
16
16
|
return { kind: "commit", name: app.commit };
|
|
17
17
|
return { kind: "branch", name: app.branch ?? branch };
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const source = await prepareSource(host, {
|
|
19
|
+
// Where the app's source comes from, cloned or read. Its own call, so a run can
|
|
20
|
+
// make the clone a step of its own ahead of the build that reads it
|
|
21
|
+
export async function sourceOf(app, topology, context) {
|
|
22
|
+
return await prepareSource(context.host, {
|
|
24
23
|
name: topology.container,
|
|
25
24
|
repo: app.repo,
|
|
26
25
|
// Already absolute when the CLI loaded the config, because a path is read
|
|
@@ -29,9 +28,17 @@ export async function build(app, topology, context) {
|
|
|
29
28
|
include: app.include,
|
|
30
29
|
ref: refOf(app, context.branch),
|
|
31
30
|
output: context.output,
|
|
32
|
-
submodules:
|
|
33
|
-
detail,
|
|
31
|
+
submodules: app.build.submodules,
|
|
32
|
+
detail: context.detail,
|
|
34
33
|
});
|
|
34
|
+
}
|
|
35
|
+
export async function build(app, topology, context,
|
|
36
|
+
// Already checked out by a step of its own. Absent, the build fetches it
|
|
37
|
+
checkedOut) {
|
|
38
|
+
const { host, docker } = context;
|
|
39
|
+
const spec = app.build;
|
|
40
|
+
const detail = context.detail ?? (() => { });
|
|
41
|
+
const source = checkedOut ?? (await sourceOf(app, topology, { ...context, detail }));
|
|
35
42
|
const release = source.release;
|
|
36
43
|
const fingerprint = fingerprintOf(app, context, release);
|
|
37
44
|
const tag = `${topology.container}:${release}-${fingerprint}`;
|
package/dist/build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGtF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA4B5C,8EAA8E;AAC9E,+EAA+E;AAC/E,6DAA6D;AAC7D,MAAM,QAAQ,GAAG,GAAG,CAAC;AAgBrB,6EAA6E;AAC7E,8EAA8E;AAC9E,0DAA0D;AAC1D,MAAM,UAAU,KAAK,CAAC,GAAY,EAAE,MAAc;IAChD,IAAI,GAAG,CAAC,GAAG;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;IACnD,IAAI,GAAG,CAAC,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,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;QACtE,uCAAuC;SACtC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;SACtC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACjC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;SACnB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;SAC5D,MAAM,CAAC,KAAK,CAAC;SACb,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC"}
|
package/dist/cli/agent.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { Deployment } from "../types.js";
|
|
2
2
|
export declare function needsAgent(config: Deployment, environment: string): boolean;
|
|
3
|
-
export declare
|
|
3
|
+
export declare const AGENT_STARTED = "no SSH agent was running, so one was started";
|
|
4
|
+
export declare function requireAgent(): {
|
|
5
|
+
socket: string;
|
|
6
|
+
started: boolean;
|
|
7
|
+
};
|
|
4
8
|
//# sourceMappingURL=agent.d.ts.map
|
package/dist/cli/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/cli/agent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAQ9C,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,WAIjE;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/cli/agent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAQ9C,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,WAIjE;AAQD,eAAO,MAAM,aAAa,iDAAiD,CAAC;AAK5E,wBAAgB,YAAY;;;EA0B3B"}
|
package/dist/cli/agent.js
CHANGED
|
@@ -15,14 +15,14 @@ export function needsAgent(config, environment) {
|
|
|
15
15
|
function overSsh(repo) {
|
|
16
16
|
return !/^(https?|git|file):\/\//.test(repo);
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
// ssh-add may ask for a passphrase
|
|
20
|
-
// something else is drawing
|
|
21
|
-
|
|
18
|
+
export const AGENT_STARTED = "no SSH agent was running, so one was started";
|
|
19
|
+
// Runs before the view opens, because ssh-add may ask for a passphrase and it
|
|
20
|
+
// cannot ask through a screen something else is drawing. Whether one was started
|
|
21
|
+
// is answered rather than said, so the step that opens the connection says it
|
|
22
|
+
export function requireAgent() {
|
|
22
23
|
const existing = process.env["SSH_AUTH_SOCK"];
|
|
23
24
|
if (existing)
|
|
24
|
-
return existing;
|
|
25
|
-
warn("No SSH agent, starting one");
|
|
25
|
+
return { socket: existing, started: false };
|
|
26
26
|
const output = execFileSync("ssh-agent", ["-s"], { encoding: "utf8" });
|
|
27
27
|
const socket = output.match(/SSH_AUTH_SOCK=([^;]+);/)?.[1];
|
|
28
28
|
const pid = output.match(/SSH_AGENT_PID=([^;]+);/)?.[1];
|
|
@@ -41,6 +41,6 @@ export function requireAgent(warn) {
|
|
|
41
41
|
"runner, set one up before this step and leave SSH_AUTH_SOCK in the " +
|
|
42
42
|
"environment");
|
|
43
43
|
}
|
|
44
|
-
return socket;
|
|
44
|
+
return { socket, started: true };
|
|
45
45
|
}
|
|
46
46
|
//# sourceMappingURL=agent.js.map
|
package/dist/cli/agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/cli/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,4EAA4E;AAC5E,4EAA4E;AAE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ail" | "done" | "plan" | "step" | "command";
|
|
4
|
+
type Entry = {
|
|
5
|
+
at: number;
|
|
6
|
+
kind: Kind;
|
|
7
|
+
text: string;
|
|
8
|
+
};
|
|
9
|
+
type Said = {
|
|
10
|
+
at: number;
|
|
11
|
+
kind: "detail" | "line";
|
|
12
|
+
text: string;
|
|
13
|
+
};
|
|
14
|
+
type StepRecord = {
|
|
15
|
+
label: string;
|
|
16
|
+
started: number;
|
|
17
|
+
ended?: number;
|
|
18
|
+
state: "running" | "done" | "failed";
|
|
19
|
+
note?: string;
|
|
20
|
+
said: Said[];
|
|
21
|
+
};
|
|
22
|
+
export type Transcript = {
|
|
23
|
+
started: number;
|
|
24
|
+
entries: Entry[];
|
|
25
|
+
steps: StepRecord[];
|
|
26
|
+
};
|
|
27
|
+
export type Crash = {
|
|
28
|
+
project: string;
|
|
29
|
+
environment: string;
|
|
30
|
+
command: string;
|
|
31
|
+
version: string;
|
|
32
|
+
argv: string[];
|
|
33
|
+
outcome: string;
|
|
34
|
+
at: number;
|
|
35
|
+
error?: unknown;
|
|
36
|
+
};
|
|
37
|
+
export declare function recording(log: Viewer, now?: () => number): {
|
|
38
|
+
log: Viewer;
|
|
39
|
+
transcript: Transcript;
|
|
40
|
+
command: (text: string) => number;
|
|
41
|
+
};
|
|
42
|
+
export declare function crashDirectory(project: string, environment: string, at: Date, root?: string): string;
|
|
43
|
+
export declare function crashFiles(transcript: Transcript, crash: Crash): Record<string, string>;
|
|
44
|
+
export declare function dumpCrash(config: Deployment, transcript: Transcript, crash: Crash, root?: string): Promise<string | undefined>;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=crash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crash.d.ts","sourceRoot":"","sources":["../../src/cli/crash.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aA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AW,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,SAAO,UAGzF;AAMD,wBAAgB,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcvF;AAKD,wBAAsB,SAAS,CAC7B,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,IAAI,SAAO,+BAgBZ"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { untagged } from "../log.js";
|
|
4
|
+
import { elapsed } from "./screen.js";
|
|
5
|
+
import { causes } from "./log.js";
|
|
6
|
+
// What a failed run said, kept whole. The view trims a step to its last lines
|
|
7
|
+
// and the alternate screen takes the rest with it, so the only complete record
|
|
8
|
+
// of a run that went wrong is one written down while it happened.
|
|
9
|
+
// Named rather than read from TMPDIR: the path is the one a person is told to
|
|
10
|
+
// look in, and a runner that points TMPDIR somewhere else would hide it
|
|
11
|
+
const ROOT = "/tmp";
|
|
12
|
+
// Every call reaches the wrapped log unchanged, so the view behaves as it did.
|
|
13
|
+
// The transcript is a copy kept beside it, never a replacement for it
|
|
14
|
+
export function recording(log, now = Date.now) {
|
|
15
|
+
const transcript = { started: now(), entries: [], steps: [] };
|
|
16
|
+
const note = (kind, text) => transcript.entries.push({ at: now(), kind, text });
|
|
17
|
+
const step = (label) => {
|
|
18
|
+
const record = { label, started: now(), state: "running", said: [] };
|
|
19
|
+
const task = log.step(label);
|
|
20
|
+
transcript.steps.push(record);
|
|
21
|
+
note("step", `${label} started`);
|
|
22
|
+
const settle = (state, message) => {
|
|
23
|
+
record.state = state;
|
|
24
|
+
record.ended = now();
|
|
25
|
+
record.note = message;
|
|
26
|
+
const said = message ? `: ${message}` : "";
|
|
27
|
+
note("step", `${label} ${state}${said} (${elapsed(record.ended, record.started)})`);
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
detail: (message) => {
|
|
31
|
+
record.said.push({ at: now(), kind: "detail", text: message });
|
|
32
|
+
task.detail(message);
|
|
33
|
+
},
|
|
34
|
+
line: (message) => {
|
|
35
|
+
record.said.push({ at: now(), kind: "line", text: message });
|
|
36
|
+
task.line(message);
|
|
37
|
+
},
|
|
38
|
+
done: (message) => {
|
|
39
|
+
settle("done", message);
|
|
40
|
+
task.done(message);
|
|
41
|
+
},
|
|
42
|
+
fail: (message) => {
|
|
43
|
+
settle("failed", message);
|
|
44
|
+
task.fail(message);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
const recorded = Object.assign((message) => {
|
|
49
|
+
note("info", message);
|
|
50
|
+
log(message);
|
|
51
|
+
}, {
|
|
52
|
+
plan: (points) => {
|
|
53
|
+
note("plan", points.join(", "));
|
|
54
|
+
log.plan?.(points);
|
|
55
|
+
},
|
|
56
|
+
warn: (message) => {
|
|
57
|
+
note("warn", message);
|
|
58
|
+
log.warn(message);
|
|
59
|
+
},
|
|
60
|
+
fail: (message) => {
|
|
61
|
+
note("fail", message);
|
|
62
|
+
log.fail(message);
|
|
63
|
+
},
|
|
64
|
+
done: (message) => {
|
|
65
|
+
note("done", message);
|
|
66
|
+
log.done(message);
|
|
67
|
+
},
|
|
68
|
+
step,
|
|
69
|
+
close: () => log.close(),
|
|
70
|
+
});
|
|
71
|
+
// A host command is only shown with --verbose, and is exactly what a crash log
|
|
72
|
+
// is read for, so it is kept whether it was shown or not
|
|
73
|
+
const command = (text) => note("command", text);
|
|
74
|
+
return { log: recorded, transcript, command };
|
|
75
|
+
}
|
|
76
|
+
// One directory per failed run, under the environment it failed in. Named from
|
|
77
|
+
// the command line, so both segments are made safe to be a path first
|
|
78
|
+
export function crashDirectory(project, environment, at, root = ROOT) {
|
|
79
|
+
const moment = at.toISOString().replaceAll(":", "-");
|
|
80
|
+
return join(root, slug(project), slug(environment), `crash-${moment}`);
|
|
81
|
+
}
|
|
82
|
+
// The run's own log, and one file per step. A build's thousands of lines would
|
|
83
|
+
// bury everything else in a single file, and a step's file is what gets opened
|
|
84
|
+
// first. Numbered in the order they started, which also keeps two steps that
|
|
85
|
+
// share a label from sharing a file
|
|
86
|
+
export function crashFiles(transcript, crash) {
|
|
87
|
+
const width = Math.max(2, String(transcript.steps.length).length);
|
|
88
|
+
const named = transcript.steps.map((step, index) => ({
|
|
89
|
+
step,
|
|
90
|
+
file: `${pad(index + 1, width)}-${slug(step.label)}.log`,
|
|
91
|
+
}));
|
|
92
|
+
return {
|
|
93
|
+
"run.log": runLog(transcript, crash, named),
|
|
94
|
+
...Object.fromEntries(named.map(({ step, file }) => [file, stepLog(transcript, crash, step)])),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
// Nothing is written for a deployment that turned it off. Otherwise private to
|
|
98
|
+
// whoever ran it: /tmp is shared by everyone on the machine, and a build's output
|
|
99
|
+
// can say more than it meant to
|
|
100
|
+
export async function dumpCrash(config, transcript, crash, root = ROOT) {
|
|
101
|
+
if (config.options?.crashLog === false)
|
|
102
|
+
return undefined;
|
|
103
|
+
const directory = crashDirectory(config.project, crash.environment, new Date(crash.at), root);
|
|
104
|
+
await mkdir(dirname(directory), { recursive: true, mode: 0o700 });
|
|
105
|
+
// Not recursive: a directory already there belongs to another run, and nothing
|
|
106
|
+
// of this one is written into it
|
|
107
|
+
await mkdir(directory, { mode: 0o700 });
|
|
108
|
+
for (const [name, contents] of Object.entries(crashFiles(transcript, crash))) {
|
|
109
|
+
await writeFile(join(directory, name), contents, { mode: 0o600, flag: "wx" });
|
|
110
|
+
}
|
|
111
|
+
return directory;
|
|
112
|
+
}
|
|
113
|
+
const MARK = {
|
|
114
|
+
info: "",
|
|
115
|
+
warn: "warn ",
|
|
116
|
+
fail: "fail ",
|
|
117
|
+
done: "done ",
|
|
118
|
+
plan: "plan ",
|
|
119
|
+
step: "step ",
|
|
120
|
+
command: "",
|
|
121
|
+
};
|
|
122
|
+
function runLog(transcript, crash, named) {
|
|
123
|
+
const since = sinceStart(transcript);
|
|
124
|
+
const index = named.map(({ step, file }) => {
|
|
125
|
+
const took = elapsed(step.ended ?? crash.at, step.started);
|
|
126
|
+
return `${file.padEnd(40)} ${step.state.padEnd(8)} ${took}`;
|
|
127
|
+
});
|
|
128
|
+
return lines([
|
|
129
|
+
"redkite crash log",
|
|
130
|
+
"",
|
|
131
|
+
`project ${crash.project}`,
|
|
132
|
+
`environment ${crash.environment}`,
|
|
133
|
+
`command ${crash.command}`,
|
|
134
|
+
`outcome ${crash.outcome}`,
|
|
135
|
+
`version ${crash.version}`,
|
|
136
|
+
`argv ${crash.argv.join(" ")}`,
|
|
137
|
+
`started ${new Date(transcript.started).toISOString()}`,
|
|
138
|
+
`ended ${new Date(crash.at).toISOString()}`,
|
|
139
|
+
"",
|
|
140
|
+
"== error",
|
|
141
|
+
...errorLines(crash.error),
|
|
142
|
+
"",
|
|
143
|
+
"== steps, each in its own file beside this one",
|
|
144
|
+
...(index.length > 0 ? index : ["none started"]),
|
|
145
|
+
"",
|
|
146
|
+
"== log",
|
|
147
|
+
...transcript.entries.map((entry) => `${since(entry.at)} ${MARK[entry.kind]}${indent(entry.text)}`),
|
|
148
|
+
]);
|
|
149
|
+
}
|
|
150
|
+
// Stamped from the start of the run, the same as run.log, so a line here can be
|
|
151
|
+
// found among what the run said around it
|
|
152
|
+
function stepLog(transcript, crash, step) {
|
|
153
|
+
const since = sinceStart(transcript);
|
|
154
|
+
const note = step.note ? `: ${step.note}` : "";
|
|
155
|
+
return lines([
|
|
156
|
+
`step ${step.label}`,
|
|
157
|
+
`state ${step.state}${indent(note)}`,
|
|
158
|
+
`started ${new Date(step.started).toISOString()}`,
|
|
159
|
+
`ended ${step.ended ? new Date(step.ended).toISOString() : "still running when the run ended"}`,
|
|
160
|
+
`took ${elapsed(step.ended ?? crash.at, step.started)}`,
|
|
161
|
+
"",
|
|
162
|
+
...step.said.map((said) => `${since(said.at)} ${said.kind === "detail" ? "· " : "| "}${indent(said.text)}`),
|
|
163
|
+
]);
|
|
164
|
+
}
|
|
165
|
+
// Whole, where the terminal gets the tail: the stack of every error in the
|
|
166
|
+
// chain, since the step that threw is usually two causes down
|
|
167
|
+
function errorLines(error) {
|
|
168
|
+
if (error === undefined)
|
|
169
|
+
return ["none thrown"];
|
|
170
|
+
if (!(error instanceof Error))
|
|
171
|
+
return [String(error)];
|
|
172
|
+
return causes(error).flatMap((link, index) => [
|
|
173
|
+
...(index > 0 ? ["", "caused by"] : []),
|
|
174
|
+
link.stack ?? link.message,
|
|
175
|
+
]);
|
|
176
|
+
}
|
|
177
|
+
function sinceStart(transcript) {
|
|
178
|
+
return (at) => `+${clock(at - transcript.started)}`;
|
|
179
|
+
}
|
|
180
|
+
function lines(rows) {
|
|
181
|
+
return `${rows.join("\n")}\n`;
|
|
182
|
+
}
|
|
183
|
+
// Continuation lines line up under the text rather than under the timestamp. A
|
|
184
|
+
// file cannot draw a tag, so it gets the bracketed word
|
|
185
|
+
function indent(text) {
|
|
186
|
+
return untagged(text).replaceAll("\n", "\n ");
|
|
187
|
+
}
|
|
188
|
+
function slug(text) {
|
|
189
|
+
const slugged = text
|
|
190
|
+
.toLowerCase()
|
|
191
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
192
|
+
.replace(/^-+|-+$/g, "");
|
|
193
|
+
return slugged || "unnamed";
|
|
194
|
+
}
|
|
195
|
+
function clock(ms) {
|
|
196
|
+
const minutes = Math.floor(ms / 60_000);
|
|
197
|
+
const seconds = Math.floor(ms / 1000) % 60;
|
|
198
|
+
const millis = ms % 1000;
|
|
199
|
+
return `${pad(minutes, 2)}:${pad(seconds, 2)}.${pad(millis, 3)}`;
|
|
200
|
+
}
|
|
201
|
+
function pad(value, width) {
|
|
202
|
+
return String(value).padStart(width, "0");
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=crash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC;AACnE,CAAC;AAED,SAAS,GAAG,CAAC,KAAa,EAAE,KAAa;IACvC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC"}
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAgG1D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,YAgBxC;AAED,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,2BASxC;AA8QD,wBAAgB,OAAO,CAAC,EAAE,EAAE;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IACxC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,cAwBA;AAkCD,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,UAAU,CAehF"}
|