@nosana/node 1.1.36-rc → 1.1.37-rc

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.36-rc",
3
+ "version": "1.1.37-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"
@@ -1,2 +1,2 @@
1
- export declare const s3HelperImage = "registry.hub.docker.com/nosana/resource-manager:v1.1.12";
1
+ export declare const s3HelperImage = "registry.hub.docker.com/nosana/resource-manager:v1.1.14";
2
2
  export declare const nosanaBucket = "https://models.nosana.io";
@@ -1,2 +1,2 @@
1
- export const s3HelperImage = 'registry.hub.docker.com/nosana/resource-manager:v1.1.12';
1
+ export const s3HelperImage = 'registry.hub.docker.com/nosana/resource-manager:v1.1.14';
2
2
  export const nosanaBucket = 'https://models.nosana.io';
@@ -28,10 +28,14 @@ export declare function findReportedErrors(logs: {
28
28
  log?: string;
29
29
  }[]): string[];
30
30
  /**
31
- * A resource rendered for an error message. Resources carry credentials (`IAM`,
32
- * HF `accessToken`), and errors reach the logs and the support channel, so
33
- * those fields are replaced rather than reported.
31
+ * The fallback reason for a container that died without reporting through the
32
+ * envelope — a crash before the handlers install, or output lost to the kill.
33
+ * The raw stderr tail is the only account left of what happened, so the last
34
+ * few lines ride along rather than being discarded.
34
35
  */
36
+ export declare function describeUnreportedExit(logs: {
37
+ log?: string;
38
+ }[], statusCode: number): string;
35
39
  /**
36
40
  * The op a download is running for. Passed only for job resources — a market
37
41
  * preload has no op state to write errors to.
@@ -65,6 +65,26 @@ export function findReportedErrors(logs) {
65
65
  }
66
66
  return messages;
67
67
  }
68
+ /**
69
+ * The fallback reason for a container that died without reporting through the
70
+ * envelope — a crash before the handlers install, or output lost to the kill.
71
+ * The raw stderr tail is the only account left of what happened, so the last
72
+ * few lines ride along rather than being discarded.
73
+ */
74
+ export function describeUnreportedExit(logs, statusCode) {
75
+ const tail = logs
76
+ .map((entry) => entry.log?.trim())
77
+ .filter((line) => !!line)
78
+ .slice(-3)
79
+ .join(' | ')
80
+ .slice(-400);
81
+ return `no reason reported (exit code ${statusCode})${tail ? `; stderr tail: ${tail}` : ''}`;
82
+ }
83
+ /**
84
+ * A resource rendered for an error message. Resources carry credentials (`IAM`,
85
+ * HF `accessToken`), and errors reach the logs and the support channel, so
86
+ * those fields are replaced rather than reported.
87
+ */
68
88
  function describeResource(resource) {
69
89
  return JSON.stringify(resource, (key, value) => key === 'IAM' || key === 'accessToken' ? '[hidden]' : value);
70
90
  }
@@ -242,7 +262,7 @@ export class VolumeManager {
242
262
  // managed to report a reason, so this must throw either way: returning
243
263
  // normally here reports success for an unfinished volume, and the run
244
264
  // then fails later with the cause lost.
245
- const reason = reported.at(-1) ?? `no reason reported (exit code ${StatusCode})`;
265
+ const reason = reported.at(-1) ?? describeUnreportedExit(logs, StatusCode);
246
266
  throw new Error(`resource download failed for ${name}: ${reason}${describeContainerState(state)}`);
247
267
  }
248
268
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.36-rc",
3
+ "version": "1.1.37-rc",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@nosana/node",
9
- "version": "1.1.36-rc",
9
+ "version": "1.1.37-rc",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@coral-xyz/anchor": "^0.28.1-beta.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.36-rc",
3
+ "version": "1.1.37-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"