@nrwl/nx-cloud 14.6.2 → 14.7.0-beta.1
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/lib/core/api/error-reporter.api.js +36 -1
- package/lib/core/api/run-group.api.js +68 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +156 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +288 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +113 -1
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +167 -1
- package/lib/core/runners/cloud-enabled/id-generator.js +16 -1
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +79 -1
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js +263 -1
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js.map +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +143 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +220 -1
- package/lib/core/runners/distributed-execution/split-task-graph-into-stages.js +37 -1
- package/lib/core/runners/distributed-execution/task-graph-creator.js +77 -1
- package/lib/utilities/distributed-task-execution-detection.js +4 -1
- package/lib/utilities/distributed-task-execution-detection.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1,113 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CloudRemoteCache = void 0;
|
|
13
|
+
const environment_1 = require("../../../utilities/environment");
|
|
14
|
+
const { output } = require('../../../utilities/nx-imports');
|
|
15
|
+
class CloudRemoteCache {
|
|
16
|
+
constructor(messages, api, runContext, fileStorage) {
|
|
17
|
+
this.messages = messages;
|
|
18
|
+
this.api = api;
|
|
19
|
+
this.runContext = runContext;
|
|
20
|
+
this.fileStorage = fileStorage;
|
|
21
|
+
this.storeRequests = [];
|
|
22
|
+
}
|
|
23
|
+
retrieve(hash, cacheDirectory) {
|
|
24
|
+
var _a;
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
if (this.messages.cacheError)
|
|
27
|
+
return false;
|
|
28
|
+
const hashUrls = yield this.hashUrls(hash);
|
|
29
|
+
if (!hashUrls || !hashUrls.get) {
|
|
30
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
31
|
+
output.note({ title: `Nx Cloud: Cache miss ${hash}.` });
|
|
32
|
+
}
|
|
33
|
+
this.runContext.statuses[hash] = 'cache-miss';
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
yield this.fileStorage.retrieve(hash, hashUrls.get, cacheDirectory);
|
|
38
|
+
this.runContext.statuses[hash] = 'remote-cache-hit';
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
catch (ee) {
|
|
42
|
+
const e = (_a = ee.axiosException) !== null && _a !== void 0 ? _a : ee;
|
|
43
|
+
if (e.response && e.response.status === 404) {
|
|
44
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
45
|
+
output.note({ title: `Nx Cloud: Cache miss ${hash}. Status 404.` });
|
|
46
|
+
}
|
|
47
|
+
// cache miss. print nothing
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.messages.cacheError = this.messages.extractErrorMessage(e, 'storage');
|
|
51
|
+
}
|
|
52
|
+
this.runContext.statuses[hash] = 'cache-miss';
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
store(hash, cacheDirectory) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
if (this.messages.cacheError)
|
|
60
|
+
return false;
|
|
61
|
+
const res = Promise.resolve().then(() => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
var _a;
|
|
63
|
+
const hashUrls = yield this.hashUrls(hash);
|
|
64
|
+
if (!hashUrls)
|
|
65
|
+
return false;
|
|
66
|
+
if (!hashUrls.put) {
|
|
67
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
68
|
+
output.note({
|
|
69
|
+
title: `Nx Cloud: Skipping storing ${hash}. Read only token is used.`,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
yield this.fileStorage.store(hash, hashUrls.put, cacheDirectory);
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
catch (ee) {
|
|
79
|
+
const e = (_a = ee.axiosException) !== null && _a !== void 0 ? _a : ee;
|
|
80
|
+
this.messages.cacheError = this.messages.extractErrorMessage(e, 'storage');
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}));
|
|
84
|
+
this.storeRequests.push(res);
|
|
85
|
+
return res;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
hashUrls(hash) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
if (hash in this.runContext.requests) {
|
|
91
|
+
return (yield this.runContext.requests[hash])[hash];
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
const scheduledTaskHashesWithoutRequests = this.runContext.scheduledTasks
|
|
95
|
+
.filter((t) => !this.runContext.requests[t.hash])
|
|
96
|
+
.map((t) => t.hash);
|
|
97
|
+
if (scheduledTaskHashesWithoutRequests.indexOf(hash) === -1) {
|
|
98
|
+
scheduledTaskHashesWithoutRequests.push(hash);
|
|
99
|
+
}
|
|
100
|
+
const request = this.api.startRun(environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_ID, scheduledTaskHashesWithoutRequests);
|
|
101
|
+
scheduledTaskHashesWithoutRequests.forEach((taskHash) => {
|
|
102
|
+
this.runContext.requests[taskHash] = request;
|
|
103
|
+
});
|
|
104
|
+
return (yield request)[hash];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
waitForStoreRequestsToComplete() {
|
|
109
|
+
return Promise.all(this.storeRequests).then((r) => r.reduce((a, b) => a && b, true));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
exports.CloudRemoteCache = CloudRemoteCache;
|
|
113
|
+
//# sourceMappingURL=cloud-remote-cache.js.map
|
|
@@ -1 +1,167 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CloudRunApi = void 0;
|
|
13
|
+
const axios_1 = require("../../../utilities/axios");
|
|
14
|
+
const environment_1 = require("../../../utilities/environment");
|
|
15
|
+
const fs_1 = require("fs");
|
|
16
|
+
const zlib_1 = require("zlib");
|
|
17
|
+
const util_1 = require("util");
|
|
18
|
+
const metric_logger_1 = require("../../../utilities/metric-logger");
|
|
19
|
+
const { output } = require('../../../utilities/nx-imports');
|
|
20
|
+
class CloudRunApi {
|
|
21
|
+
constructor(messages, runContext, options, machineInfo) {
|
|
22
|
+
this.messages = messages;
|
|
23
|
+
this.runContext = runContext;
|
|
24
|
+
this.machineInfo = machineInfo;
|
|
25
|
+
this.apiAxiosInstance = (0, axios_1.createApiAxiosInstance)(options);
|
|
26
|
+
}
|
|
27
|
+
startRun(distributedExecutionId, hashes) {
|
|
28
|
+
var _a;
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
const recorder = (0, metric_logger_1.createMetricRecorder)('startRun');
|
|
31
|
+
try {
|
|
32
|
+
const request = {
|
|
33
|
+
meta: {
|
|
34
|
+
nxCloudVersion: this.nxCloudVersion(),
|
|
35
|
+
},
|
|
36
|
+
branch: (0, environment_1.getBranch)(),
|
|
37
|
+
runGroup: (0, environment_1.getRunGroup)(),
|
|
38
|
+
distributedExecutionId,
|
|
39
|
+
hashes,
|
|
40
|
+
};
|
|
41
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
42
|
+
output.note({
|
|
43
|
+
title: 'RunStart',
|
|
44
|
+
bodyLines: ['\n' + JSON.stringify(request, null, 2)],
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const resp = yield (0, axios_1.printDuration)('RunStart duration', () => (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/runs/start', request)));
|
|
48
|
+
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
49
|
+
if (resp.data && resp.data.message) {
|
|
50
|
+
this.messages.message = resp.data.message;
|
|
51
|
+
}
|
|
52
|
+
if (!resp.data || !resp.data.urls) {
|
|
53
|
+
this.messages.apiError = `Invalid Nx Cloud response: ${JSON.stringify(resp.data)}`;
|
|
54
|
+
return {};
|
|
55
|
+
}
|
|
56
|
+
return resp.data.urls;
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
60
|
+
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
61
|
+
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
62
|
+
this.messages.apiError = this.messages.extractErrorMessage(e, 'api');
|
|
63
|
+
return {};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
createReqBody(run, tasks, linkId) {
|
|
68
|
+
const uncompressedReqBody = {
|
|
69
|
+
meta: {
|
|
70
|
+
nxCloudVersion: this.nxCloudVersion(),
|
|
71
|
+
},
|
|
72
|
+
tasks,
|
|
73
|
+
run,
|
|
74
|
+
linkId,
|
|
75
|
+
machineInfo: this.machineInfo,
|
|
76
|
+
};
|
|
77
|
+
return JSON.stringify(uncompressedReqBody);
|
|
78
|
+
}
|
|
79
|
+
endRun(run, tasks, linkId) {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
// API is not working, don't make the end request
|
|
83
|
+
if (this.messages.apiError)
|
|
84
|
+
return false;
|
|
85
|
+
let uncompressedBodyString = this.createReqBody(run, tasks, linkId);
|
|
86
|
+
// if the req body is > 20mb, remove hashDetails
|
|
87
|
+
if (uncompressedBodyString.length > 20 * 1000 * 1000) {
|
|
88
|
+
uncompressedBodyString = this.createReqBody(run, tasks.map((t) => (Object.assign(Object.assign({}, t), { hashDetails: undefined }))));
|
|
89
|
+
}
|
|
90
|
+
const uncompressedBuffer = Buffer.from(uncompressedBodyString);
|
|
91
|
+
const compressedBuffer = yield (0, util_1.promisify)(zlib_1.gzip)(uncompressedBuffer);
|
|
92
|
+
const recorder = (0, metric_logger_1.createMetricRecorder)('endRun');
|
|
93
|
+
try {
|
|
94
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
95
|
+
const t = tasks.map((tt) => {
|
|
96
|
+
return Object.assign(Object.assign({}, tt), { terminalOutput: tt.terminalOutput
|
|
97
|
+
? `${tt.terminalOutput.slice(0, 20)}...`
|
|
98
|
+
: undefined });
|
|
99
|
+
});
|
|
100
|
+
output.note({
|
|
101
|
+
title: 'RunEnd. Completed tasks',
|
|
102
|
+
bodyLines: ['\n' + JSON.stringify(t, null, 2)],
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
const resp = yield (0, axios_1.printDuration)('RunEnd duration', () => (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/runs/end', compressedBuffer, {
|
|
106
|
+
headers: Object.assign(Object.assign({}, this.apiAxiosInstance.defaults.headers), { 'Content-Encoding': 'gzip', 'Content-Type': 'application/octet-stream' }),
|
|
107
|
+
})));
|
|
108
|
+
if (resp) {
|
|
109
|
+
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
110
|
+
if (resp.data && resp.data.runUrl && resp.data.status === 'success') {
|
|
111
|
+
this.runContext.runUrl = resp.data.runUrl;
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
if (resp.data && resp.data.status) {
|
|
115
|
+
this.messages.apiError = `Invalid end run response: ${JSON.stringify(resp.data.message)}`;
|
|
116
|
+
}
|
|
117
|
+
else if (resp.data && typeof resp.data === 'string') {
|
|
118
|
+
if (resp.data !== 'success') {
|
|
119
|
+
this.messages.apiError = `Invalid end run response: ${JSON.stringify(resp.data)}`;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
this.messages.apiError = `Invalid end run response: ${JSON.stringify(resp.data)}`;
|
|
124
|
+
}
|
|
125
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
126
|
+
output.note({
|
|
127
|
+
title: 'Invalid end run response',
|
|
128
|
+
bodyLines: [JSON.stringify(resp.data, null, 2)],
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
output.error({
|
|
134
|
+
title: 'Nx Cloud: Unknown Error Occurred',
|
|
135
|
+
bodyLines: [
|
|
136
|
+
'Run completion responded with `undefined`.',
|
|
137
|
+
'Run Details:',
|
|
138
|
+
JSON.stringify(run, null, 2),
|
|
139
|
+
'Stack Trace:',
|
|
140
|
+
JSON.stringify(new Error().stack, null, 2),
|
|
141
|
+
],
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
catch (ee) {
|
|
147
|
+
recorder.recordMetric(((_a = ee === null || ee === void 0 ? void 0 : ee.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
148
|
+
? (0, metric_logger_1.mapRespToPerfEntry)(ee.axiosException.response)
|
|
149
|
+
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
150
|
+
const e = (_b = ee.axiosException) !== null && _b !== void 0 ? _b : ee;
|
|
151
|
+
this.messages.apiError = this.messages.extractErrorMessage(e, 'api');
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
nxCloudVersion() {
|
|
157
|
+
try {
|
|
158
|
+
const v = JSON.parse((0, fs_1.readFileSync)(`package.json`).toString());
|
|
159
|
+
return v.devDependencies['@nrwl/nx-cloud'];
|
|
160
|
+
}
|
|
161
|
+
catch (e) {
|
|
162
|
+
return 'unknown';
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
exports.CloudRunApi = CloudRunApi;
|
|
167
|
+
//# sourceMappingURL=cloud-run.api.js.map
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateUniqueLinkId = void 0;
|
|
4
|
+
const upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
5
|
+
const digits = '0123456789';
|
|
6
|
+
const lower = upper.toLowerCase();
|
|
7
|
+
const alphanum = upper + lower + digits;
|
|
8
|
+
function generateUniqueLinkId() {
|
|
9
|
+
let res = '';
|
|
10
|
+
for (let i = 0; i < 10; ++i) {
|
|
11
|
+
res += alphanum[Math.floor(Math.random() * alphanum.length)];
|
|
12
|
+
}
|
|
13
|
+
return res;
|
|
14
|
+
}
|
|
15
|
+
exports.generateUniqueLinkId = generateUniqueLinkId;
|
|
16
|
+
//# sourceMappingURL=id-generator.js.map
|
|
@@ -1 +1,79 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DistributedAgentApi = void 0;
|
|
13
|
+
const axios_1 = require("../../../utilities/axios");
|
|
14
|
+
const environment_1 = require("../../../utilities/environment");
|
|
15
|
+
const metric_logger_1 = require("../../../utilities/metric-logger");
|
|
16
|
+
const { output } = require('../../../utilities/nx-imports');
|
|
17
|
+
class DistributedAgentApi {
|
|
18
|
+
constructor(options, runGroup, agentName) {
|
|
19
|
+
this.runGroup = runGroup;
|
|
20
|
+
this.agentName = agentName;
|
|
21
|
+
this.apiAxiosInstance = (0, axios_1.createApiAxiosInstance)(options);
|
|
22
|
+
}
|
|
23
|
+
tasks(executionId, statusCode, completedTasks) {
|
|
24
|
+
var _a;
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const recorder = (0, metric_logger_1.createMetricRecorder)('dtePollTasks');
|
|
27
|
+
try {
|
|
28
|
+
const res = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/tasks', {
|
|
29
|
+
runGroup: this.runGroup,
|
|
30
|
+
agentName: this.agentName,
|
|
31
|
+
executionId,
|
|
32
|
+
statusCode,
|
|
33
|
+
completedTasks,
|
|
34
|
+
}));
|
|
35
|
+
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(res));
|
|
36
|
+
return res.data;
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
40
|
+
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
41
|
+
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
42
|
+
throw e;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
completeRunGroupWithError(error) {
|
|
47
|
+
var _a;
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
50
|
+
output.note({
|
|
51
|
+
title: 'Completing run group with an error',
|
|
52
|
+
bodyLines: [`runGroup: ${this.runGroup}`, `error: ${error}`],
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const recorder = (0, metric_logger_1.createMetricRecorder)('completeRunGroup');
|
|
56
|
+
try {
|
|
57
|
+
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/complete-run-group', {
|
|
58
|
+
runGroup: this.runGroup,
|
|
59
|
+
agentName: this.agentName,
|
|
60
|
+
criticalErrorMessage: error,
|
|
61
|
+
}));
|
|
62
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
63
|
+
output.note({
|
|
64
|
+
title: 'Completed run group with an error',
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
71
|
+
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
72
|
+
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
73
|
+
console.error(e);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.DistributedAgentApi = DistributedAgentApi;
|
|
79
|
+
//# sourceMappingURL=distributed-agent.api.js.map
|