@nrwl/nx-cloud 14.0.5 → 14.0.6-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.d.ts +6 -0
- package/lib/core/api/error-reporter.api.js +36 -0
- package/lib/core/api/error-reporter.api.js.map +1 -0
- package/lib/core/api/run-group.api.js +65 -1
- package/lib/core/file-storage/file-storage.d.ts +4 -1
- package/lib/core/file-storage/file-storage.js +23 -5
- package/lib/core/file-storage/file-storage.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +141 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +169 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +113 -1
- package/lib/core/runners/cloud-enabled/cloud-run.api.d.ts +1 -0
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +166 -1
- package/lib/core/runners/cloud-enabled/cloud-run.api.js.map +1 -1
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +79 -1
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js +240 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +130 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +309 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
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.ErrorReporterApi = void 0;
|
|
13
|
+
const axios_1 = require("../../utilities/axios");
|
|
14
|
+
const { output } = require('../../utilities/nx-imports');
|
|
15
|
+
class ErrorReporterApi {
|
|
16
|
+
constructor(options) {
|
|
17
|
+
this.apiAxiosInstance = (0, axios_1.createApiAxiosInstance)(options);
|
|
18
|
+
}
|
|
19
|
+
reportError(message) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
try {
|
|
22
|
+
yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/report-client-error', {
|
|
23
|
+
message,
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
output.warn({
|
|
28
|
+
title: `Unable to record the following error: '${message}'`,
|
|
29
|
+
bodyLines: [e.message],
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.ErrorReporterApi = ErrorReporterApi;
|
|
36
|
+
//# sourceMappingURL=error-reporter.api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-reporter.api.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/api/error-reporter.api.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iDAG+B;AAE/B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAEzD,MAAa,gBAAgB;IAG3B,YAAY,OAA+B;QACzC,IAAI,CAAC,gBAAgB,GAAG,IAAA,8BAAsB,EAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAEK,WAAW,CAAC,OAAe;;YAC/B,IAAI;gBACF,MAAM,IAAA,0BAAkB,EAAC,GAAG,EAAE,CAC5B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,+BAA+B,EAAE;oBAC1D,OAAO;iBACR,CAAC,CACH,CAAC;aACH;YAAC,OAAO,CAAM,EAAE;gBACf,MAAM,CAAC,IAAI,CAAC;oBACV,KAAK,EAAE,0CAA0C,OAAO,GAAG;oBAC3D,SAAS,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;iBACvB,CAAC,CAAC;aACJ;QACH,CAAC;KAAA;CACF;AArBD,4CAqBC"}
|
|
@@ -1 +1,65 @@
|
|
|
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.RunGroupApi = void 0;
|
|
13
|
+
const axios_1 = require("../../utilities/axios");
|
|
14
|
+
const metric_logger_1 = require("../../utilities/metric-logger");
|
|
15
|
+
const { output } = require('../../utilities/nx-imports');
|
|
16
|
+
class RunGroupApi {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
this.apiAxiosInstance = (0, axios_1.createApiAxiosInstance)(options);
|
|
19
|
+
}
|
|
20
|
+
createRunGroup(branch, runGroup) {
|
|
21
|
+
var _a;
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const recorder = (0, metric_logger_1.createMetricRecorder)('createRunGroup');
|
|
24
|
+
try {
|
|
25
|
+
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/create-run-group', {
|
|
26
|
+
branch: branch,
|
|
27
|
+
runGroup: runGroup,
|
|
28
|
+
}));
|
|
29
|
+
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
33
|
+
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
34
|
+
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
35
|
+
output.error({
|
|
36
|
+
title: e.message,
|
|
37
|
+
});
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
completeRunGroup(runGroup) {
|
|
43
|
+
var _a;
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const recorder = (0, metric_logger_1.createMetricRecorder)('createRunGroup');
|
|
46
|
+
try {
|
|
47
|
+
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/complete-run-group', {
|
|
48
|
+
runGroup: runGroup,
|
|
49
|
+
}));
|
|
50
|
+
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
54
|
+
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
55
|
+
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
56
|
+
output.error({
|
|
57
|
+
title: e.message,
|
|
58
|
+
});
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.RunGroupApi = RunGroupApi;
|
|
65
|
+
//# sourceMappingURL=run-group.api.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { E2EEncryption } from './e2e-encryption';
|
|
2
|
+
import { ErrorReporterApi } from '../api/error-reporter.api';
|
|
2
3
|
export declare class FileStorage {
|
|
3
4
|
private readonly encryption;
|
|
4
|
-
|
|
5
|
+
private readonly errorReporter;
|
|
6
|
+
private readonly failWhenCannotDownloadArtifact;
|
|
7
|
+
constructor(encryption: E2EEncryption, errorReporter: ErrorReporterApi, failWhenCannotDownloadArtifact: boolean);
|
|
5
8
|
retrieve(hash: string, url: string, cacheDirectory: string): Promise<void>;
|
|
6
9
|
store(hash: string, url: string, cacheDirectory: string): Promise<any>;
|
|
7
10
|
private createFileName;
|
|
@@ -20,8 +20,10 @@ const axios = require('axios');
|
|
|
20
20
|
const tar = require('tar');
|
|
21
21
|
const { output } = require('../../utilities/nx-imports');
|
|
22
22
|
class FileStorage {
|
|
23
|
-
constructor(encryption) {
|
|
23
|
+
constructor(encryption, errorReporter, failWhenCannotDownloadArtifact) {
|
|
24
24
|
this.encryption = encryption;
|
|
25
|
+
this.errorReporter = errorReporter;
|
|
26
|
+
this.failWhenCannotDownloadArtifact = failWhenCannotDownloadArtifact;
|
|
25
27
|
}
|
|
26
28
|
retrieve(hash, url, cacheDirectory) {
|
|
27
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -33,10 +35,26 @@ class FileStorage {
|
|
|
33
35
|
}
|
|
34
36
|
const tgz = this.createFileName(hash, cacheDirectory);
|
|
35
37
|
const commitFilePath = this.createCommitFilePath(hash, cacheDirectory);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
try {
|
|
39
|
+
yield this.downloadFile(url, tgz, commitFilePath);
|
|
40
|
+
this.createCommitFile(commitFilePath);
|
|
41
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
42
|
+
output.note({ title: `Nx Cloud: Downloaded ${hash}` });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
const error = e.message || e.toString();
|
|
47
|
+
const errorMessage = `Failed to download or untar the cached artifacts for ${hash}. Error: ${error}`;
|
|
48
|
+
yield this.errorReporter.reportError(errorMessage);
|
|
49
|
+
if (this.failWhenCannotDownloadArtifact) {
|
|
50
|
+
throw e;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
output.warn({
|
|
54
|
+
title: errorMessage,
|
|
55
|
+
bodyLines: [`RETRIEVAL URL: ${url}`],
|
|
56
|
+
});
|
|
57
|
+
}
|
|
40
58
|
}
|
|
41
59
|
});
|
|
42
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-storage.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/file-storage/file-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAA6B;AAC7B,6DAMqC;AACrC,iDAA2D;AAE3D,2BAMY;AACZ,mDAA8C;AAC9C,iEAIuC;
|
|
1
|
+
{"version":3,"file":"file-storage.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/file-storage/file-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAA6B;AAC7B,6DAMqC;AACrC,iDAA2D;AAE3D,2BAMY;AACZ,mDAA8C;AAC9C,iEAIuC;AAGvC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAC3B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAEzD,MAAa,WAAW;IACtB,YACmB,UAAyB,EACzB,aAA+B,EAC/B,8BAAuC;QAFvC,eAAU,GAAV,UAAU,CAAe;QACzB,kBAAa,GAAb,aAAa,CAAkB;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,kCAAkB,EAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC;oBAC/C,CAAC,CAAC,yCAAyB,CAC9B,CAAC;gBACF,MAAM,CAAC,CAAC;aACT;;KACF;CACF;AA7MD,kCA6MC"}
|
|
@@ -1 +1,141 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloudEnabledLifeCycle = void 0;
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const environment_1 = require("../../../utilities/environment");
|
|
8
|
+
const { workspaceRoot, unparse } = require('../../../utilities/nx-imports');
|
|
9
|
+
class CloudEnabledLifeCycle {
|
|
10
|
+
constructor(runContext, cacheDirectory, skipNxCache, collectTerminalOutput, cacheableOperations, outputObfuscator, tasks) {
|
|
11
|
+
this.runContext = runContext;
|
|
12
|
+
this.cacheDirectory = cacheDirectory;
|
|
13
|
+
this.skipNxCache = skipNxCache;
|
|
14
|
+
this.collectTerminalOutput = collectTerminalOutput;
|
|
15
|
+
this.cacheableOperations = cacheableOperations;
|
|
16
|
+
this.outputObfuscator = outputObfuscator;
|
|
17
|
+
this.tasks = tasks;
|
|
18
|
+
}
|
|
19
|
+
scheduleTask(task) {
|
|
20
|
+
this.runContext.scheduledTasks.push(task);
|
|
21
|
+
}
|
|
22
|
+
startTask(task) {
|
|
23
|
+
const overrides = Object.assign({}, (task.overrides || {}));
|
|
24
|
+
if (task.target.configuration) {
|
|
25
|
+
overrides['configuration'] = task.target.configuration;
|
|
26
|
+
}
|
|
27
|
+
this.tasks.push({
|
|
28
|
+
taskId: task.id,
|
|
29
|
+
startTime: new Date().toISOString(),
|
|
30
|
+
target: task.target.target,
|
|
31
|
+
projectName: task.target.project,
|
|
32
|
+
hash: task.hash,
|
|
33
|
+
hashDetails: this.cleanUpHashDetails(task.hashDetails),
|
|
34
|
+
params: unparse(overrides).join(' '),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
// Used for older version for Nx. Remove in Dec 2022
|
|
38
|
+
endTask(task, code) {
|
|
39
|
+
let cacheStatus;
|
|
40
|
+
if (this.runContext.statuses[task.hash]) {
|
|
41
|
+
cacheStatus = this.runContext.statuses[task.hash];
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
if (this.cacheableOperations.indexOf(task.target.target) > -1 &&
|
|
45
|
+
!this.skipNxCache) {
|
|
46
|
+
cacheStatus = 'local-cache-hit';
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
cacheStatus = 'cache-miss';
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
this.updateStartedTask(task, code, cacheStatus);
|
|
53
|
+
}
|
|
54
|
+
endTasks(tasks) {
|
|
55
|
+
for (let t of tasks) {
|
|
56
|
+
const status = t.status === 'remote-cache'
|
|
57
|
+
? 'remote-cache-hit'
|
|
58
|
+
: t.status === 'local-cache' ||
|
|
59
|
+
t.status === 'local-cache-kept-existing'
|
|
60
|
+
? 'local-cache-hit'
|
|
61
|
+
: 'cache-miss';
|
|
62
|
+
this.updateStartedTask(t.task, t.code, status);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
endCommand() { }
|
|
66
|
+
updateStartedTask(task, code, cacheStatus) {
|
|
67
|
+
const startedTask = this.tasks.find((t) => t.taskId === task.id);
|
|
68
|
+
if (!startedTask) {
|
|
69
|
+
throw new Error(`Cannot find task ${task.id}`);
|
|
70
|
+
}
|
|
71
|
+
startedTask.endTime = new Date().toISOString();
|
|
72
|
+
startedTask.status = code;
|
|
73
|
+
startedTask.params = this.outputObfuscator.obfuscate(startedTask.params);
|
|
74
|
+
startedTask.cacheStatus = cacheStatus;
|
|
75
|
+
if (this.collectTerminalOutput) {
|
|
76
|
+
startedTask.terminalOutput = this.getTerminalOutput(task.hash, startedTask.cacheStatus, code);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
getTerminalOutput(hash, cacheStatus, code) {
|
|
80
|
+
let dir;
|
|
81
|
+
if (this.cacheDirectory) {
|
|
82
|
+
if (this.cacheDirectory.startsWith('./')) {
|
|
83
|
+
dir = (0, path_1.join)(workspaceRoot, this.cacheDirectory);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
dir = this.cacheDirectory;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
dir = (0, path_1.join)(workspaceRoot, 'node_modules', '.cache', 'nx');
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
const taskOutput = this.readTerminalOutputFile(dir, hash);
|
|
94
|
+
const taskOutputSanitized = this.outputObfuscator.obfuscate(taskOutput);
|
|
95
|
+
if (environment_1.NX_CLOUD_UNLIMITED_OUTPUT)
|
|
96
|
+
return taskOutputSanitized;
|
|
97
|
+
const maxCharacters = cacheStatus === 'cache-miss'
|
|
98
|
+
? code === 0
|
|
99
|
+
? CloudEnabledLifeCycle.MAX_CHARACTERS_SUCCESSFUL_TASK
|
|
100
|
+
: CloudEnabledLifeCycle.MAX_CHARACTERS_FAILED_TASK
|
|
101
|
+
: CloudEnabledLifeCycle.MAX_CHARACTERS_CACHED_TASK;
|
|
102
|
+
return taskOutputSanitized.length > maxCharacters
|
|
103
|
+
? `TRUNCATED\n\n${taskOutputSanitized.slice(taskOutputSanitized.length - maxCharacters)}`
|
|
104
|
+
: taskOutputSanitized;
|
|
105
|
+
}
|
|
106
|
+
catch (e) {
|
|
107
|
+
return '';
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
cleanUpHashDetails(hashDetails) {
|
|
111
|
+
const nodes = {};
|
|
112
|
+
Object.keys(hashDetails.nodes)
|
|
113
|
+
.filter((k) => !k.startsWith('npm:'))
|
|
114
|
+
.forEach((k) => {
|
|
115
|
+
nodes[k] = hashDetails.nodes[k];
|
|
116
|
+
});
|
|
117
|
+
return {
|
|
118
|
+
nodes,
|
|
119
|
+
runtime: hashDetails.runtime,
|
|
120
|
+
implicitDeps: hashDetails.implicitDeps,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
readTerminalOutputFile(dir, hash) {
|
|
124
|
+
try {
|
|
125
|
+
return (0, fs_1.readFileSync)(path.join(dir, 'terminalOutputs', hash)).toString();
|
|
126
|
+
}
|
|
127
|
+
catch (_a) {
|
|
128
|
+
try {
|
|
129
|
+
return (0, fs_1.readFileSync)(path.join(dir, hash, 'terminalOutput')).toString();
|
|
130
|
+
}
|
|
131
|
+
catch (_b) {
|
|
132
|
+
return '';
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.CloudEnabledLifeCycle = CloudEnabledLifeCycle;
|
|
138
|
+
CloudEnabledLifeCycle.MAX_CHARACTERS_FAILED_TASK = 200000;
|
|
139
|
+
CloudEnabledLifeCycle.MAX_CHARACTERS_SUCCESSFUL_TASK = 20000;
|
|
140
|
+
CloudEnabledLifeCycle.MAX_CHARACTERS_CACHED_TASK = 20000;
|
|
141
|
+
//# sourceMappingURL=cloud-enabled-life-cycle.js.map
|
|
@@ -1 +1,169 @@
|
|
|
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.cloudEnabledTasksRunner = void 0;
|
|
13
|
+
const message_reporter_1 = require("../../terminal-output/message-reporter");
|
|
14
|
+
const end_of_run_message_1 = require("../../terminal-output/end-of-run-message");
|
|
15
|
+
const output_obfuscator_1 = require("../../terminal-output/output-obfuscator");
|
|
16
|
+
const cloud_enabled_life_cycle_1 = require("./cloud-enabled-life-cycle");
|
|
17
|
+
const file_storage_1 = require("../../file-storage/file-storage");
|
|
18
|
+
const e2e_encryption_1 = require("../../file-storage/e2e-encryption");
|
|
19
|
+
const environment_1 = require("../../../utilities/environment");
|
|
20
|
+
const cloud_remote_cache_1 = require("./cloud-remote-cache");
|
|
21
|
+
const cloud_run_api_1 = require("./cloud-run.api");
|
|
22
|
+
const fs_1 = require("fs");
|
|
23
|
+
const path = require("path");
|
|
24
|
+
const metric_logger_1 = require("../../../utilities/metric-logger");
|
|
25
|
+
const error_reporter_api_1 = require("../../api/error-reporter.api");
|
|
26
|
+
const { tasksRunner, output } = require('../../../utilities/nx-imports');
|
|
27
|
+
function createApi(errors, options, runContext) {
|
|
28
|
+
const machineInfo = (0, environment_1.getMachineInfo)(options);
|
|
29
|
+
return new cloud_run_api_1.CloudRunApi(errors, runContext, options, machineInfo);
|
|
30
|
+
}
|
|
31
|
+
function storeTaskHashes(taskExecutions, directory, distributedExecutionId) {
|
|
32
|
+
const hashes = JSON.stringify(taskExecutions.map((t) => ({
|
|
33
|
+
taskId: t.taskId,
|
|
34
|
+
hash: t.hash,
|
|
35
|
+
})));
|
|
36
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
37
|
+
output.note({
|
|
38
|
+
title: `Executed tasks with hashes: ${hashes}`,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
(0, fs_1.writeFileSync)(path.join(directory, `tasks-hashes-${distributedExecutionId}`), hashes);
|
|
42
|
+
}
|
|
43
|
+
function onComplete(lifeCycle, options, remoteCache, api, outputObfuscator, runStartTime, messages, endOfRunMessage, taskExecutions, versionOfNxBefore133, inner) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const runEndTime = new Date().toISOString();
|
|
46
|
+
if (environment_1.AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION) {
|
|
47
|
+
storeTaskHashes(taskExecutions, options.cacheDirectory || './node_modules/.cache/nx', environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_ID);
|
|
48
|
+
}
|
|
49
|
+
const branch = (0, environment_1.getBranch)();
|
|
50
|
+
const endRequest = yield Promise.all([
|
|
51
|
+
remoteCache.waitForStoreRequestsToComplete(),
|
|
52
|
+
api.endRun({
|
|
53
|
+
command: outputObfuscator.obfuscate((0, environment_1.parseCommand)()),
|
|
54
|
+
startTime: runStartTime,
|
|
55
|
+
endTime: runEndTime,
|
|
56
|
+
distributedExecutionId: environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_ID,
|
|
57
|
+
branch: branch,
|
|
58
|
+
scan: true,
|
|
59
|
+
runGroup: (0, environment_1.getRunGroup)(),
|
|
60
|
+
// only set sha if branch is set because we invoke a separate process,
|
|
61
|
+
// which adds a few millis
|
|
62
|
+
sha: branch ? (0, environment_1.extractGitSha)() : undefined,
|
|
63
|
+
inner: inner,
|
|
64
|
+
}, taskExecutions),
|
|
65
|
+
]);
|
|
66
|
+
// this workaround is required because prior to Nx 13.3 we printed
|
|
67
|
+
// the end message after the runner completes, so we need to wait for the
|
|
68
|
+
// message to appear in the right place
|
|
69
|
+
if (versionOfNxBefore133) {
|
|
70
|
+
setTimeout(() => {
|
|
71
|
+
messages.printMessages();
|
|
72
|
+
if (!messages.anyErrors && !inner) {
|
|
73
|
+
endOfRunMessage.printCacheHitsMessage();
|
|
74
|
+
}
|
|
75
|
+
}, 0);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
messages.printMessages();
|
|
79
|
+
if (!messages.anyErrors && !inner) {
|
|
80
|
+
endOfRunMessage.printCacheHitsMessage();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (environment_1.AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION) {
|
|
84
|
+
if (!endRequest[0]) {
|
|
85
|
+
output.error({
|
|
86
|
+
title: `Agent wasn't able to store artifacts`,
|
|
87
|
+
});
|
|
88
|
+
messages.printMessages();
|
|
89
|
+
process.exit(environment_1.DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE);
|
|
90
|
+
}
|
|
91
|
+
if (!endRequest[1]) {
|
|
92
|
+
output.error({
|
|
93
|
+
title: `Agent wasn't able to record its run`,
|
|
94
|
+
});
|
|
95
|
+
messages.printMessages();
|
|
96
|
+
process.exit(environment_1.DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
yield (0, metric_logger_1.submitRunMetrics)(options);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function createLifeCycle(runContext, options, outputObfuscator, tasks) {
|
|
103
|
+
const cloudEnabledLifeCycle = new cloud_enabled_life_cycle_1.CloudEnabledLifeCycle(runContext, options.cacheDirectory, !!options.skipNxCache, options.scan === undefined ? true : options.scan, options.cacheableOperations || [], outputObfuscator, tasks);
|
|
104
|
+
try {
|
|
105
|
+
const { CompositeLifeCycle } = require('../../../utilities/nx-imports');
|
|
106
|
+
if (!CompositeLifeCycle)
|
|
107
|
+
return cloudEnabledLifeCycle;
|
|
108
|
+
return new CompositeLifeCycle([options.lifeCycle, cloudEnabledLifeCycle]);
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
return cloudEnabledLifeCycle;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function cloudEnabledTasksRunner(tasks, options, context, inner = false) {
|
|
115
|
+
const runContext = {
|
|
116
|
+
statuses: {},
|
|
117
|
+
scheduledTasks: [],
|
|
118
|
+
requests: {},
|
|
119
|
+
allTasks: tasks,
|
|
120
|
+
};
|
|
121
|
+
const versionOfNxBefore133 = options.lifeCycle === undefined;
|
|
122
|
+
const taskExecutions = [];
|
|
123
|
+
const messages = new message_reporter_1.MessageReporter(options);
|
|
124
|
+
const api = createApi(messages, options, runContext);
|
|
125
|
+
const endOfRunMessage = new end_of_run_message_1.EndOfRunMessage(runContext, taskExecutions);
|
|
126
|
+
const outputObfuscator = new output_obfuscator_1.OutputObfuscator(options.maskedProperties);
|
|
127
|
+
const hashes = tasks.map((t) => t.hash).filter((h) => !!h);
|
|
128
|
+
const startRunRequest = api.startRun(environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_ID, hashes);
|
|
129
|
+
hashes.forEach((hash) => {
|
|
130
|
+
runContext.requests[hash] = startRunRequest;
|
|
131
|
+
});
|
|
132
|
+
const runStartTime = new Date().toISOString();
|
|
133
|
+
const lifeCycle = createLifeCycle(runContext, options, outputObfuscator, taskExecutions);
|
|
134
|
+
const encryption = new e2e_encryption_1.E2EEncryption(environment_1.ENCRYPTION_KEY || options.encryptionKey);
|
|
135
|
+
const errorApi = new error_reporter_api_1.ErrorReporterApi(options);
|
|
136
|
+
const fileStorage = new file_storage_1.FileStorage(encryption, errorApi, false);
|
|
137
|
+
const remoteCache = new cloud_remote_cache_1.CloudRemoteCache(messages, api, runContext, fileStorage);
|
|
138
|
+
// have to reset it so we don't capture inner tasks
|
|
139
|
+
delete process.env.NX_CLOUD_DISTRIBUTED_EXECUTION_ID;
|
|
140
|
+
const res = tasksRunner(tasks, Object.assign(Object.assign({}, options), { remoteCache, lifeCycle }), context);
|
|
141
|
+
// observable -> legacy
|
|
142
|
+
if (res.subscribe) {
|
|
143
|
+
const { Subject } = require('rxjs/internal/Subject');
|
|
144
|
+
const wrappedRes = new Subject();
|
|
145
|
+
res.subscribe({
|
|
146
|
+
next: (value) => wrappedRes.next(value),
|
|
147
|
+
error: (err) => wrappedRes.error(err),
|
|
148
|
+
complete: () => __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
yield onComplete(lifeCycle, options, remoteCache, api, outputObfuscator, runStartTime, messages, endOfRunMessage, taskExecutions, versionOfNxBefore133, inner);
|
|
150
|
+
wrappedRes.complete();
|
|
151
|
+
}),
|
|
152
|
+
});
|
|
153
|
+
return wrappedRes;
|
|
154
|
+
// promise
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
return res
|
|
158
|
+
.then((r) => __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
yield onComplete(lifeCycle, options, remoteCache, api, outputObfuscator, runStartTime, messages, endOfRunMessage, taskExecutions, versionOfNxBefore133, inner);
|
|
160
|
+
return r;
|
|
161
|
+
}))
|
|
162
|
+
.catch((e) => __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
yield onComplete(lifeCycle, options, remoteCache, api, outputObfuscator, runStartTime, messages, endOfRunMessage, taskExecutions, versionOfNxBefore133, inner);
|
|
164
|
+
throw e;
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
exports.cloudEnabledTasksRunner = cloudEnabledTasksRunner;
|
|
169
|
+
//# sourceMappingURL=cloud-enabled.runner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-enabled.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/lib/core/runners/cloud-enabled/cloud-enabled.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,6EAAyE;AACzE,iFAA2E;AAC3E,+EAA2E;AAC3E,yEAAmE;AACnE,kEAA8D;AAC9D,sEAAkE;AAClE,gEAWwC;AACxC,6DAAwD;AACxD,mDAA8C;AAE9C,2BAAmC;AACnC,6BAA6B;AAC7B,oEAAoE;
|
|
1
|
+
{"version":3,"file":"cloud-enabled.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/lib/core/runners/cloud-enabled/cloud-enabled.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,6EAAyE;AACzE,iFAA2E;AAC3E,+EAA2E;AAC3E,yEAAmE;AACnE,kEAA8D;AAC9D,sEAAkE;AAClE,gEAWwC;AAC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