@norskvideo/ctl-test-harness 0.1.45 → 0.1.47
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/container-logs.js +18 -4
- package/package.json +2 -2
- package/smoke.js +9 -6
package/container-logs.js
CHANGED
|
@@ -125,14 +125,28 @@ export function preserveEngineLogs(runtimeRoot, dest) {
|
|
|
125
125
|
continue;
|
|
126
126
|
}
|
|
127
127
|
if (name === "logs") {
|
|
128
|
-
// Copy the
|
|
128
|
+
// Copy the tree, but CHILD BY CHILD: a root-owned sibling (e.g. studio
|
|
129
|
+
// logs when studio runs as root) must not abort the copy of the media
|
|
130
|
+
// logs we came for. Don't descend further past a logs/ dir.
|
|
131
|
+
let children;
|
|
129
132
|
try {
|
|
130
|
-
|
|
131
|
-
copied += 1;
|
|
133
|
+
children = readdirSync(p);
|
|
132
134
|
}
|
|
133
135
|
catch {
|
|
134
|
-
|
|
136
|
+
continue;
|
|
135
137
|
}
|
|
138
|
+
let any = false;
|
|
139
|
+
for (const child of children) {
|
|
140
|
+
try {
|
|
141
|
+
cpSync(join(p, child), join(dest, relative(runtimeRoot, p), child), { recursive: true });
|
|
142
|
+
any = true;
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
/* best-effort per child */
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (any)
|
|
149
|
+
copied += 1;
|
|
136
150
|
}
|
|
137
151
|
else {
|
|
138
152
|
walk(p);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@norskvideo/ctl-test-harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@norskvideo/ctl-sdk": "^0.1.0",
|
|
71
|
-
"zod": "
|
|
71
|
+
"zod": "4.4.3"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@norskvideo/norsk-studio": "*",
|
package/smoke.js
CHANGED
|
@@ -392,14 +392,17 @@ export async function runProductSmoke(slug, spec, deps = defaultSmokeDeps) {
|
|
|
392
392
|
journeyError = e;
|
|
393
393
|
}
|
|
394
394
|
// Preserve the engine logs BEFORE anything tears the store down. norsk-ctl
|
|
395
|
-
// bind-mounts each media container's /var/log/norsk to
|
|
396
|
-
//
|
|
397
|
-
//
|
|
398
|
-
//
|
|
399
|
-
//
|
|
395
|
+
// bind-mounts each media container's /var/log/norsk to <runnerDir>/logs/media,
|
|
396
|
+
// and runnerDir is <storeDir>/product-instances/<id> -- a SIBLING of the
|
|
397
|
+
// workdir (:/data, under <storeDir>/norsk-runtime), NOT under it. So walk the
|
|
398
|
+
// whole storeDir, not just norsk-runtime, or the logs/ tree is never found
|
|
399
|
+
// (this is why it preserved 0). `product remove`, `instance delete --purge`,
|
|
400
|
+
// cleanup and the root nuke below all destroy it, and we pretty much always
|
|
401
|
+
// want the Norsk logs from a smoke run; when a CI log dir is set, copy every
|
|
402
|
+
// logs/ tree out first so the workflow can upload it.
|
|
400
403
|
const ciLogDir = process.env.NORSK_CI_LOG_DIR;
|
|
401
404
|
if (ciLogDir) {
|
|
402
|
-
const n = preserveEngineLogs(
|
|
405
|
+
const n = preserveEngineLogs(storeDir, join(ciLogDir, slug));
|
|
403
406
|
deps.log(`${slug}: preserved ${n} engine log tree(s) -> ${join(ciLogDir, slug)}`);
|
|
404
407
|
}
|
|
405
408
|
if (handles.length)
|