@nosana/node 1.1.53 → 1.1.54-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.53",
3
+ "version": "1.1.54-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"
@@ -1,6 +1,11 @@
1
1
  import { Client, JobDefinition } from "@nosana/sdk";
2
2
  import { Provider } from "../../provider/Provider.js";
3
3
  import { NodeRepository } from "../../repository/NodeRepository.js";
4
+ /**
5
+ * Set on the container by the start script that launched it. Absent when the
6
+ * node was started another way.
7
+ */
8
+ export declare const START_SCRIPT_VERSION_ENV = "NOSANA_START_SCRIPT_VERSION";
4
9
  export declare class Benchmark {
5
10
  private benchmarkId;
6
11
  private jobDefinition;
@@ -1,6 +1,11 @@
1
1
  import { HostManager } from './hostManager.js';
2
2
  import TaskManager, { OperationProgressStatuses } from "../task/TaskManager.js";
3
3
  import { createLoggingProxy, logEmitter } from '../../monitoring/proxy/loggingProxy.js';
4
+ /**
5
+ * Set on the container by the start script that launched it. Absent when the
6
+ * node was started another way.
7
+ */
8
+ export const START_SCRIPT_VERSION_ENV = 'NOSANA_START_SCRIPT_VERSION';
4
9
  export class Benchmark {
5
10
  constructor(benchmarkId, jobDefinition, sdk, provider, repository) {
6
11
  this.benchmarkId = benchmarkId;
@@ -57,6 +62,12 @@ export class Benchmark {
57
62
  const flowResults = this.repository.getFlow(this.benchmarkId);
58
63
  if (!flowResults)
59
64
  throw new Error(`Cannot find results for flow with id ${this.benchmarkId}`);
65
+ if (process.env[START_SCRIPT_VERSION_ENV]) {
66
+ flowResults.state.errors = [
67
+ ...(flowResults.state.errors ?? []),
68
+ `${START_SCRIPT_VERSION_ENV}=${process.env[START_SCRIPT_VERSION_ENV]}`,
69
+ ];
70
+ }
60
71
  await HostManager.submitBenchmarkResults(this.benchmarkId, flowResults.state);
61
72
  this.repository.deleteflow(this.benchmarkId);
62
73
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.53",
3
+ "version": "1.1.54-rc",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@nosana/node",
9
- "version": "1.1.53",
9
+ "version": "1.1.54-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.53",
3
+ "version": "1.1.54-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"