@nrwl/nx-cloud 13.1.0-beta.1 → 13.1.3
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/run-group.api.js +1 -59
- package/lib/core/api/run-group.api.js.map +1 -1
- package/lib/core/file-storage/file-storage.d.ts +1 -2
- package/lib/core/file-storage/file-storage.js +3 -4
- package/lib/core/file-storage/file-storage.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +1 -120
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +1 -167
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +1 -113
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +1 -153
- package/lib/core/runners/cloud-enabled/cloud-run.api.js.map +1 -1
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +1 -73
- package/lib/core/runners/distributed-agent/distributed-agent.api.js.map +1 -1
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js +1 -239
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +1 -122
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +1 -308
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js.map +1 -1
- package/lib/nx-cloud-tasks-runner.js +3 -2
- package/lib/nx-cloud-tasks-runner.js.map +1 -1
- package/lib/utilities/axios.js +16 -28
- package/lib/utilities/axios.js.map +1 -1
- package/lib/utilities/environment.d.ts +1 -1
- package/lib/utilities/environment.js +2 -4
- package/lib/utilities/environment.js.map +1 -1
- package/lib/utilities/metric-logger.js +2 -2
- package/lib/utilities/metric-logger.js.map +1 -1
- package/lib/utilities/print-message.js +8 -1
- package/lib/utilities/print-message.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,122 +1 @@
|
|
|
1
|
-
|
|
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.createStartRequest = exports.DistributedExecutionApi = void 0;
|
|
13
|
-
const output_1 = require("@nrwl/workspace/src/utilities/output");
|
|
14
|
-
const axios_1 = require("../../../utilities/axios");
|
|
15
|
-
const utils_1 = require("@nrwl/workspace/src/tasks-runner/utils");
|
|
16
|
-
const environment_1 = require("../../../utilities/environment");
|
|
17
|
-
const metric_logger_1 = require("../../../utilities/metric-logger");
|
|
18
|
-
class DistributedExecutionApi {
|
|
19
|
-
constructor(options) {
|
|
20
|
-
this.apiAxiosInstance = (0, axios_1.createApiAxiosInstance)(options);
|
|
21
|
-
}
|
|
22
|
-
start(params) {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('dteStart');
|
|
25
|
-
let resp;
|
|
26
|
-
try {
|
|
27
|
-
resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/start', params));
|
|
28
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
29
|
-
}
|
|
30
|
-
catch (e) {
|
|
31
|
-
recorder.recordMetric(metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
32
|
-
throw e;
|
|
33
|
-
}
|
|
34
|
-
if (!resp.data.enabled) {
|
|
35
|
-
throw new Error(`Workspace is disabled. Cannot perform distributed task executions.`);
|
|
36
|
-
}
|
|
37
|
-
if (resp.data.error) {
|
|
38
|
-
throw new Error(resp.data.error);
|
|
39
|
-
}
|
|
40
|
-
return resp.data.id;
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
status(id) {
|
|
44
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('dteStatus');
|
|
46
|
-
try {
|
|
47
|
-
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/status', {
|
|
48
|
-
id,
|
|
49
|
-
}));
|
|
50
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
51
|
-
return resp.data;
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
recorder.recordMetric(metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
55
|
-
output_1.output.error({
|
|
56
|
-
title: e.message,
|
|
57
|
-
});
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
completeRunGroupWithError(runGroup, error) {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('completeRunGroup');
|
|
65
|
-
try {
|
|
66
|
-
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/complete-run-group', {
|
|
67
|
-
runGroup: runGroup,
|
|
68
|
-
criticalErrorMessage: error,
|
|
69
|
-
}), 3);
|
|
70
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
71
|
-
}
|
|
72
|
-
catch (e) {
|
|
73
|
-
recorder.recordMetric(metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
exports.DistributedExecutionApi = DistributedExecutionApi;
|
|
79
|
-
function createStartRequest(runGroup, task, options) {
|
|
80
|
-
const tasksToExecute = task.map((arr) => {
|
|
81
|
-
return arr.map((t) => {
|
|
82
|
-
return {
|
|
83
|
-
taskId: t.id,
|
|
84
|
-
hash: t.hash,
|
|
85
|
-
projectName: t.target.project,
|
|
86
|
-
target: t.target.target,
|
|
87
|
-
configuration: t.target.configuration || null,
|
|
88
|
-
params: (0, utils_1.unparse)(t.overrides).join(' '),
|
|
89
|
-
};
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
const request = {
|
|
93
|
-
command: (0, environment_1.parseCommand)(),
|
|
94
|
-
branch: (0, environment_1.getBranch)(),
|
|
95
|
-
runGroup,
|
|
96
|
-
tasks: tasksToExecute,
|
|
97
|
-
maxParallel: calculateMaxParallel(options),
|
|
98
|
-
};
|
|
99
|
-
if (environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT) {
|
|
100
|
-
request.agentCount = environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT;
|
|
101
|
-
}
|
|
102
|
-
if (!environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE) {
|
|
103
|
-
request.stopAgentsOnFailure = false;
|
|
104
|
-
}
|
|
105
|
-
return request;
|
|
106
|
-
}
|
|
107
|
-
exports.createStartRequest = createStartRequest;
|
|
108
|
-
function calculateMaxParallel(options) {
|
|
109
|
-
if (options.parallel === 'false' || options.parallel === false) {
|
|
110
|
-
return 1;
|
|
111
|
-
}
|
|
112
|
-
else if (options.parallel === 'true' || options.parallel === true) {
|
|
113
|
-
return Number(options.maxParallel || 3);
|
|
114
|
-
}
|
|
115
|
-
else if (options.parallel === undefined) {
|
|
116
|
-
return options.maxParallel ? Number(options.maxParallel) : 3;
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
return Number(options.parallel) || 3;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
//# sourceMappingURL=distributed-execution.api.js.map
|
|
1
|
+
const a6_0x2f15=['done','__awaiter','dteStart','status','recordMetric','value','stopAgentsOnFailure','axiosMultipleTries','unparse','data','dteStatus','overrides','getBranch','enabled','createApiAxiosInstance','map','maxParallel','completeRunGroupWithError','target','apiAxiosInstance','parallel','/nx-cloud/executions/start','/nx-cloud/executions/complete-run-group','post','DistributedExecutionApi','createMetricRecorder','configuration','throw','RUNNER_FAILURE_PERF_ENTRY','@nrwl/workspace/src/tasks-runner/utils','start','../../../utilities/metric-logger','../../../utilities/environment','error','apply','defineProperty','hash','next','then','/nx-cloud/executions/status','project','NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE','@nrwl/workspace/src/utilities/output','agentCount','mapRespToPerfEntry','../../../utilities/axios','false','NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT','output'];(function(_0x2b416a,_0x2f15ac){const _0x3e22a0=function(_0x237613){while(--_0x237613){_0x2b416a['push'](_0x2b416a['shift']());}};_0x3e22a0(++_0x2f15ac);}(a6_0x2f15,0x119));const a6_0x3e22=function(_0x2b416a,_0x2f15ac){_0x2b416a=_0x2b416a-0x0;let _0x3e22a0=a6_0x2f15[_0x2b416a];return _0x3e22a0;};'use strict';var __awaiter=this&&this[a6_0x3e22('0xe')]||function(_0x3fbd2b,_0x1b0eab,_0x193dca,_0xe6979e){function _0x39cc49(_0x267922){return _0x267922 instanceof _0x193dca?_0x267922:new _0x193dca(function(_0x311244){_0x311244(_0x267922);});}return new(_0x193dca||(_0x193dca=Promise))(function(_0x5689e2,_0x34ff93){function _0x7288ce(_0x4c84ff){try{_0x380aa2(_0xe6979e[a6_0x3e22('0x1')](_0x4c84ff));}catch(_0x15d626){_0x34ff93(_0x15d626);}}function _0x1864e7(_0x2217ae){try{_0x380aa2(_0xe6979e[a6_0x3e22('0x28')](_0x2217ae));}catch(_0x7b0924){_0x34ff93(_0x7b0924);}}function _0x380aa2(_0x181718){_0x181718[a6_0x3e22('0xd')]?_0x5689e2(_0x181718[a6_0x3e22('0x12')]):_0x39cc49(_0x181718[a6_0x3e22('0x12')])[a6_0x3e22('0x2')](_0x7288ce,_0x1864e7);}_0x380aa2((_0xe6979e=_0xe6979e[a6_0x3e22('0x2f')](_0x3fbd2b,_0x1b0eab||[]))['next']());});};Object[a6_0x3e22('0x30')](exports,'__esModule',{'value':!![]});exports['createStartRequest']=exports[a6_0x3e22('0x25')]=void 0x0;const output_1=require(a6_0x3e22('0x6'));const axios_1=require(a6_0x3e22('0x9'));const utils_1=require(a6_0x3e22('0x2a'));const environment_1=require(a6_0x3e22('0x2d'));const metric_logger_1=require(a6_0x3e22('0x2c'));class DistributedExecutionApi{constructor(_0x2e810b){this['apiAxiosInstance']=(0x0,axios_1[a6_0x3e22('0x1b')])(_0x2e810b);}[a6_0x3e22('0x2b')](_0x29a789){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5ed780=(0x0,metric_logger_1[a6_0x3e22('0x26')])(a6_0x3e22('0xf'));let _0x2751de;try{_0x2751de=yield(0x0,axios_1['axiosMultipleTries'])(()=>this[a6_0x3e22('0x20')][a6_0x3e22('0x24')](a6_0x3e22('0x22'),_0x29a789));_0x5ed780[a6_0x3e22('0x11')]((0x0,metric_logger_1[a6_0x3e22('0x8')])(_0x2751de));}catch(_0x1e9ec4){_0x5ed780[a6_0x3e22('0x11')](metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);throw _0x1e9ec4;}if(!_0x2751de['data'][a6_0x3e22('0x1a')]){throw new Error('Workspace\x20is\x20disabled.\x20Cannot\x20perform\x20distributed\x20task\x20executions.');}if(_0x2751de[a6_0x3e22('0x16')][a6_0x3e22('0x2e')]){throw new Error(_0x2751de[a6_0x3e22('0x16')][a6_0x3e22('0x2e')]);}return _0x2751de[a6_0x3e22('0x16')]['id'];});}[a6_0x3e22('0x10')](_0x5bb1a7){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x16e160=(0x0,metric_logger_1['createMetricRecorder'])(a6_0x3e22('0x17'));try{const _0x395a32=yield(0x0,axios_1[a6_0x3e22('0x14')])(()=>this['apiAxiosInstance'][a6_0x3e22('0x24')](a6_0x3e22('0x3'),{'id':_0x5bb1a7}));_0x16e160['recordMetric']((0x0,metric_logger_1[a6_0x3e22('0x8')])(_0x395a32));return _0x395a32[a6_0x3e22('0x16')];}catch(_0x1f9860){_0x16e160['recordMetric'](metric_logger_1[a6_0x3e22('0x29')]);output_1[a6_0x3e22('0xc')][a6_0x3e22('0x2e')]({'title':_0x1f9860['message']});process['exit'](0x1);}});}[a6_0x3e22('0x1e')](_0x34dbb5,_0x4af1bf){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x20ca73=(0x0,metric_logger_1[a6_0x3e22('0x26')])('completeRunGroup');try{const _0x5318ef=yield(0x0,axios_1[a6_0x3e22('0x14')])(()=>this['apiAxiosInstance']['post'](a6_0x3e22('0x23'),{'runGroup':_0x34dbb5,'criticalErrorMessage':_0x4af1bf}),0x3);_0x20ca73[a6_0x3e22('0x11')]((0x0,metric_logger_1['mapRespToPerfEntry'])(_0x5318ef));}catch(_0x4a033d){_0x20ca73[a6_0x3e22('0x11')](metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);}});}}exports[a6_0x3e22('0x25')]=DistributedExecutionApi;function createStartRequest(_0x4d6a66,_0x415e40,_0x1f1282){const _0x2e7aa9=_0x415e40['map'](_0x1f45da=>{return _0x1f45da[a6_0x3e22('0x1c')](_0x41e7d=>{return{'taskId':_0x41e7d['id'],'hash':_0x41e7d[a6_0x3e22('0x0')],'projectName':_0x41e7d['target'][a6_0x3e22('0x4')],'target':_0x41e7d[a6_0x3e22('0x1f')][a6_0x3e22('0x1f')],'configuration':_0x41e7d[a6_0x3e22('0x1f')][a6_0x3e22('0x27')]||null,'params':(0x0,utils_1[a6_0x3e22('0x15')])(_0x41e7d[a6_0x3e22('0x18')])['join']('\x20')};});});const _0x2fd8ef={'command':(0x0,environment_1['parseCommand'])(),'branch':(0x0,environment_1[a6_0x3e22('0x19')])(),'runGroup':_0x4d6a66,'tasks':_0x2e7aa9,'maxParallel':calculateMaxParallel(_0x1f1282)};if(environment_1[a6_0x3e22('0xb')]){_0x2fd8ef[a6_0x3e22('0x7')]=environment_1[a6_0x3e22('0xb')];}if(!environment_1[a6_0x3e22('0x5')]){_0x2fd8ef[a6_0x3e22('0x13')]=![];}return _0x2fd8ef;}exports['createStartRequest']=createStartRequest;function calculateMaxParallel(_0x26e34e){if(_0x26e34e['parallel']===a6_0x3e22('0xa')||_0x26e34e[a6_0x3e22('0x21')]===![]){return 0x1;}else if(_0x26e34e[a6_0x3e22('0x21')]==='true'||_0x26e34e[a6_0x3e22('0x21')]===!![]){return Number(_0x26e34e[a6_0x3e22('0x1d')]||0x3);}else if(_0x26e34e['parallel']===undefined){return _0x26e34e['maxParallel']?Number(_0x26e34e[a6_0x3e22('0x1d')]):0x3;}else{return Number(_0x26e34e['parallel'])||0x3;}}
|
|
@@ -1,308 +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.TaskGraphCreator = exports.nxCloudDistributedTasksRunner = void 0;
|
|
13
|
-
const Observable_1 = require("rxjs/internal/Observable");
|
|
14
|
-
const cache_1 = require("@nrwl/workspace/src/tasks-runner/cache");
|
|
15
|
-
const output_1 = require("@nrwl/workspace/src/utilities/output");
|
|
16
|
-
const utils_1 = require("@nrwl/workspace/src/tasks-runner/utils");
|
|
17
|
-
const stripJsonComments = require("strip-json-comments");
|
|
18
|
-
const fs_1 = require("fs");
|
|
19
|
-
const distributed_execution_api_1 = require("./distributed-execution.api");
|
|
20
|
-
const file_storage_1 = require("../../file-storage/file-storage");
|
|
21
|
-
const e2e_encryption_1 = require("../../file-storage/e2e-encryption");
|
|
22
|
-
const waiter_1 = require("../../../utilities/waiter");
|
|
23
|
-
const environment_1 = require("../../../utilities/environment");
|
|
24
|
-
const print_run_group_error_1 = require("../../error/print-run-group-error");
|
|
25
|
-
const create_no_new_messages_timeout_1 = require("../../../utilities/create-no-new-messages-timeout");
|
|
26
|
-
const metric_logger_1 = require("../../../utilities/metric-logger");
|
|
27
|
-
class NoopLifeCycle {
|
|
28
|
-
scheduleTask(task) { }
|
|
29
|
-
startTask(task) { }
|
|
30
|
-
endTask(task, code) { }
|
|
31
|
-
}
|
|
32
|
-
function runDistributedExecution(api, options, context, fileStorage, cache, runGroup, tasks) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
const nxjson = JSON.parse(stripJsonComments((0, fs_1.readFileSync)('nx.json').toString()));
|
|
35
|
-
const stages = new TaskOrderer(context.projectGraph, getDefaultDependencyConfigs(nxjson, options)).splitTasksIntoStages(tasks);
|
|
36
|
-
const id = yield api.start((0, distributed_execution_api_1.createStartRequest)(runGroup, stages, options));
|
|
37
|
-
return yield processTasks(api, fileStorage, cache, options, id, tasks, context);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function processTasks(api, fileStorage, cache, options, executionId, tasks, context) {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
const processedTasks = {};
|
|
43
|
-
const failIfNumberOfCompletedTasksDoesNotChangeIn30Mins = (0, create_no_new_messages_timeout_1.createNoNewMessagesTimeout)();
|
|
44
|
-
const waiter = new waiter_1.Waiter();
|
|
45
|
-
while (true) {
|
|
46
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
47
|
-
output_1.output.note({
|
|
48
|
-
title: 'Waiting...',
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
yield waiter.wait();
|
|
52
|
-
const r = yield api.status(executionId);
|
|
53
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
54
|
-
output_1.output.note({
|
|
55
|
-
title: `Status update`,
|
|
56
|
-
bodyLines: [
|
|
57
|
-
`executionId: ${executionId}`,
|
|
58
|
-
`executionStatus: ${r.executionStatus}`,
|
|
59
|
-
`number of completed tasks: ${r.completedTasks.length}`,
|
|
60
|
-
`error: ${r.criticalErrorMessage}`,
|
|
61
|
-
],
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
if (r.criticalErrorMessage) {
|
|
65
|
-
output_1.output.error({
|
|
66
|
-
title: 'Distributed Execution Terminated',
|
|
67
|
-
bodyLines: ['Error:', r.criticalErrorMessage],
|
|
68
|
-
});
|
|
69
|
-
process.exit(1);
|
|
70
|
-
}
|
|
71
|
-
failIfNumberOfCompletedTasksDoesNotChangeIn30Mins(r.completedTasks.length);
|
|
72
|
-
for (const t of r.completedTasks) {
|
|
73
|
-
if (processedTasks[t.taskId])
|
|
74
|
-
continue;
|
|
75
|
-
yield processTask(fileStorage, cache, context, options, tasks, t);
|
|
76
|
-
waiter.reset();
|
|
77
|
-
processedTasks[t.taskId] = true;
|
|
78
|
-
}
|
|
79
|
-
if (r.executionStatus === 'COMPLETED') {
|
|
80
|
-
return { commandStatus: r.commandStatus, runUrl: r.runUrl };
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
function processTask(fileStorage, cache, context, options, tasks, completedTask) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
88
|
-
output_1.output.note({
|
|
89
|
-
title: `Processing task ${completedTask.taskId}`,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
const matchingTask = tasks.find((tt) => completedTask.taskId === tt.id);
|
|
93
|
-
if (!matchingTask) {
|
|
94
|
-
throw new Error(`Found unknown task: ${completedTask.taskId}`);
|
|
95
|
-
}
|
|
96
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
97
|
-
output_1.output.note({
|
|
98
|
-
title: `Retrieving artifacts from ${completedTask.url}`,
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
yield fileStorage.retrieve(completedTask.hash, completedTask.url, options.cacheDirectory || './node_modules/.cache/nx');
|
|
102
|
-
const cachedResult = yield cache.get(Object.assign(Object.assign({}, matchingTask), { hash: completedTask.hash }));
|
|
103
|
-
const outputs = (0, utils_1.getOutputs)(context.projectGraph.nodes, matchingTask);
|
|
104
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
105
|
-
output_1.output.note({
|
|
106
|
-
title: `Extracting artifacts`,
|
|
107
|
-
bodyLines: outputs,
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
yield cache.copyFilesFromCache(completedTask.hash, cachedResult, outputs);
|
|
111
|
-
output_1.output.logCommand(getCommand(matchingTask));
|
|
112
|
-
process.stdout.write(cachedResult.terminalOutput);
|
|
113
|
-
output_1.output.addVerticalSeparator();
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
function getCommand(task) {
|
|
117
|
-
const args = (0, utils_1.unparse)(task.overrides || {});
|
|
118
|
-
const config = task.target.configuration
|
|
119
|
-
? `:${task.target.configuration}`
|
|
120
|
-
: '';
|
|
121
|
-
return [
|
|
122
|
-
'nx',
|
|
123
|
-
'run',
|
|
124
|
-
`${task.target.project}:${task.target.target}${config}`,
|
|
125
|
-
...args,
|
|
126
|
-
].join(' ');
|
|
127
|
-
}
|
|
128
|
-
const nxCloudDistributedTasksRunner = (tasks, options, context) => {
|
|
129
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
130
|
-
output_1.output.note({
|
|
131
|
-
title: 'Starting distributed command execution',
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
options.lifeCycle = new NoopLifeCycle();
|
|
135
|
-
const runGroup = (0, environment_1.getRunGroup)();
|
|
136
|
-
if (!runGroup) {
|
|
137
|
-
(0, print_run_group_error_1.printRunGroupError)();
|
|
138
|
-
return process.exit(1);
|
|
139
|
-
}
|
|
140
|
-
const encryption = new e2e_encryption_1.E2EEncryption(environment_1.ENCRYPTION_KEY || options.encryptionKey);
|
|
141
|
-
const fileStorage = new file_storage_1.FileStorage(encryption, environment_1.NUMBER_OF_TRIES);
|
|
142
|
-
const cache = new cache_1.Cache(options);
|
|
143
|
-
const api = new distributed_execution_api_1.DistributedExecutionApi(options);
|
|
144
|
-
runDistributedExecution(api, options, context, fileStorage, cache, runGroup, tasks)
|
|
145
|
-
.then((r) => __awaiter(void 0, void 0, void 0, function* () {
|
|
146
|
-
if (r.commandStatus === 0) {
|
|
147
|
-
output_1.output.success({
|
|
148
|
-
title: 'Successfully completed running the command.',
|
|
149
|
-
bodyLines: [`See run details at ${r.runUrl}`],
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
output_1.output.error({
|
|
154
|
-
title: 'Command execution failed.',
|
|
155
|
-
bodyLines: [`See run details at ${r.runUrl}`],
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
yield (0, metric_logger_1.submitRunMetrics)(options);
|
|
159
|
-
process.exit(r.commandStatus);
|
|
160
|
-
}))
|
|
161
|
-
.catch((e) => {
|
|
162
|
-
output_1.output.error({
|
|
163
|
-
title: 'Unable to complete a run.',
|
|
164
|
-
bodyLines: [e.message],
|
|
165
|
-
});
|
|
166
|
-
if (e.axiosException) {
|
|
167
|
-
console.log(e.axiosException);
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
console.log(e);
|
|
171
|
-
}
|
|
172
|
-
api
|
|
173
|
-
.completeRunGroupWithError(runGroup, `Main job terminated with an error: "${e.message}"`)
|
|
174
|
-
.finally(() => process.exit(1));
|
|
175
|
-
});
|
|
176
|
-
return new Observable_1.Observable(() => { });
|
|
177
|
-
};
|
|
178
|
-
exports.nxCloudDistributedTasksRunner = nxCloudDistributedTasksRunner;
|
|
179
|
-
class TaskOrderer {
|
|
180
|
-
constructor(projectGraph, defaultTargetDependencies) {
|
|
181
|
-
this.projectGraph = projectGraph;
|
|
182
|
-
this.defaultTargetDependencies = defaultTargetDependencies;
|
|
183
|
-
}
|
|
184
|
-
splitTasksIntoStages(tasks) {
|
|
185
|
-
if (tasks.length === 0)
|
|
186
|
-
return [];
|
|
187
|
-
const stages = [];
|
|
188
|
-
const taskGraph = this.createTaskGraph(tasks);
|
|
189
|
-
const notStagedTaskIds = new Set(tasks.map((t) => t.id));
|
|
190
|
-
let stageIndex = 0;
|
|
191
|
-
// Loop through tasks and try to stage them. As tasks are staged, they are removed from the loop
|
|
192
|
-
while (notStagedTaskIds.size > 0) {
|
|
193
|
-
const currentStage = (stages[stageIndex] = []);
|
|
194
|
-
for (const taskId of notStagedTaskIds) {
|
|
195
|
-
let ready = true;
|
|
196
|
-
for (const dependency of taskGraph.dependencies[taskId]) {
|
|
197
|
-
if (notStagedTaskIds.has(dependency)) {
|
|
198
|
-
// dependency has not been staged yet, this task is not ready to be staged.
|
|
199
|
-
ready = false;
|
|
200
|
-
break;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
// Some dependency still has not been staged, skip it for now, it will be processed again
|
|
204
|
-
if (!ready) {
|
|
205
|
-
continue;
|
|
206
|
-
}
|
|
207
|
-
// All the dependencies have been staged, let's stage it.
|
|
208
|
-
const task = taskGraph.tasks[taskId];
|
|
209
|
-
currentStage.push(task);
|
|
210
|
-
}
|
|
211
|
-
// Remove the entire new stage of tasks from the list
|
|
212
|
-
for (const task of currentStage) {
|
|
213
|
-
notStagedTaskIds.delete(task.id);
|
|
214
|
-
}
|
|
215
|
-
stageIndex++;
|
|
216
|
-
}
|
|
217
|
-
return stages;
|
|
218
|
-
}
|
|
219
|
-
createTaskGraph(tasks) {
|
|
220
|
-
const t = new TaskGraphCreator(this.projectGraph, this.defaultTargetDependencies);
|
|
221
|
-
return t.createTaskGraph(tasks);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
class TaskGraphCreator {
|
|
225
|
-
constructor(projectGraph, defaultTargetDependencies) {
|
|
226
|
-
this.projectGraph = projectGraph;
|
|
227
|
-
this.defaultTargetDependencies = defaultTargetDependencies;
|
|
228
|
-
}
|
|
229
|
-
createTaskGraph(tasks) {
|
|
230
|
-
const graph = {
|
|
231
|
-
roots: [],
|
|
232
|
-
tasks: {},
|
|
233
|
-
dependencies: {},
|
|
234
|
-
};
|
|
235
|
-
for (const task of tasks) {
|
|
236
|
-
this.addTaskToGraph(task, graph);
|
|
237
|
-
const dependencyConfigs = (0, utils_1.getDependencyConfigs)(task.target, this.defaultTargetDependencies, this.projectGraph);
|
|
238
|
-
if (!dependencyConfigs) {
|
|
239
|
-
continue;
|
|
240
|
-
}
|
|
241
|
-
this.addTaskDependencies(task, dependencyConfigs, tasks, graph);
|
|
242
|
-
}
|
|
243
|
-
graph.roots = Object.keys(graph.dependencies).filter((k) => graph.dependencies[k].length === 0);
|
|
244
|
-
return graph;
|
|
245
|
-
}
|
|
246
|
-
addTaskDependencies(task, dependencyConfigs, tasks, graph) {
|
|
247
|
-
for (const dependencyConfig of dependencyConfigs) {
|
|
248
|
-
if (dependencyConfig.projects === 'self') {
|
|
249
|
-
for (const t of tasks) {
|
|
250
|
-
if (t.target.project === task.target.project &&
|
|
251
|
-
t.target.target === dependencyConfig.target) {
|
|
252
|
-
graph.dependencies[task.id].push(t.id);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
else if (dependencyConfig.projects === 'dependencies') {
|
|
257
|
-
const seen = new Set();
|
|
258
|
-
this.addDependencies(task.target.project, dependencyConfig.target, tasks, graph, task.id, seen);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
addDependencies(project, target, tasks, graph, taskId, seen) {
|
|
263
|
-
seen.add(project);
|
|
264
|
-
const dependencies = this.projectGraph.dependencies[project];
|
|
265
|
-
if (dependencies) {
|
|
266
|
-
const projectDependencies = dependencies.map((dependency) => dependency.target);
|
|
267
|
-
for (const projectDependency of projectDependencies) {
|
|
268
|
-
if (seen.has(projectDependency)) {
|
|
269
|
-
continue;
|
|
270
|
-
}
|
|
271
|
-
const dependency = this.findTask({ project: projectDependency, target }, tasks);
|
|
272
|
-
if (dependency) {
|
|
273
|
-
if (graph.dependencies[taskId].indexOf(dependency.id) === -1) {
|
|
274
|
-
graph.dependencies[taskId].push(dependency.id);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
this.addDependencies(projectDependency, target, tasks, graph, taskId, seen);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
findTask({ project, target }, tasks) {
|
|
284
|
-
return tasks.find((t) => t.target.project === project && t.target.target === target);
|
|
285
|
-
}
|
|
286
|
-
addTaskToGraph(task, graph) {
|
|
287
|
-
graph.tasks[task.id] = task;
|
|
288
|
-
graph.dependencies[task.id] = [];
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
exports.TaskGraphCreator = TaskGraphCreator;
|
|
292
|
-
function getDefaultDependencyConfigs(nxJson, runnerOptions) {
|
|
293
|
-
var _a, _b;
|
|
294
|
-
const defaults = (_a = nxJson.targetDependencies) !== null && _a !== void 0 ? _a : {};
|
|
295
|
-
const strictlyOrderedTargets = runnerOptions
|
|
296
|
-
? (_b = runnerOptions.strictlyOrderedTargets) !== null && _b !== void 0 ? _b : ['build']
|
|
297
|
-
: [];
|
|
298
|
-
// Strictly Ordered Targets depend on their dependencies
|
|
299
|
-
for (const target of strictlyOrderedTargets) {
|
|
300
|
-
defaults[target] = defaults[target] || [];
|
|
301
|
-
defaults[target].push({
|
|
302
|
-
target,
|
|
303
|
-
projects: 'dependencies',
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
return defaults;
|
|
307
|
-
}
|
|
308
|
-
//# sourceMappingURL=distributed-execution.runner.js.map
|
|
1
|
+
const a7_0x1293=['strip-json-comments','defineProperty','url','VERBOSE_LOGGING','log','Cache','copyFilesFromCache','assign','Error:','endTask','splitTasksIntoStages','COMPLETED','projects','criticalErrorMessage','runUrl','nodes','@nrwl/workspace/src/tasks-runner/utils','targetDependencies','roots','nxCloudDistributedTasksRunner','target','message','@nrwl/workspace/src/utilities/output','value','FileStorage','../../error/print-run-group-error','Successfully\x20completed\x20running\x20the\x20command.','__esModule','completedTasks','output','has','push','getOutputs','catch','stdout','get','../../file-storage/file-storage','parse','Distributed\x20Execution\x20Terminated','findTask','project','addVerticalSeparator','addDependencies','getRunGroup','TaskGraphCreator','error','run','../../file-storage/e2e-encryption','add','executionStatus','Starting\x20distributed\x20command\x20execution','cacheDirectory','apply','overrides','wait','reset','find','number\x20of\x20completed\x20tasks:\x20','projectGraph','then','executionId:\x20','finally','Command\x20execution\x20failed.','../../../utilities/waiter','Waiter','Found\x20unknown\x20task:\x20','done','Observable','encryptionKey','write','./node_modules/.cache/nx','start','commandStatus','map','Status\x20update','length','logCommand','scheduleTask','submitRunMetrics','dependencies','toString','error:\x20','filter','printRunGroupError','taskId','createTaskGraph','Retrieving\x20artifacts\x20from\x20','Unable\x20to\x20complete\x20a\x20run.','keys','hash','Waiting...','nx.json','addTaskToGraph','note','executionStatus:\x20','readFileSync','defaultTargetDependencies','retrieve','Processing\x20task\x20','./distributed-execution.api','join','configuration','exit','../../../utilities/environment','self','throw','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','../../../utilities/create-no-new-messages-timeout','../../../utilities/metric-logger'];(function(_0x4d2178,_0x1293f5){const _0x117ac4=function(_0x5cb452){while(--_0x5cb452){_0x4d2178['push'](_0x4d2178['shift']());}};_0x117ac4(++_0x1293f5);}(a7_0x1293,0x1a8));const a7_0x117a=function(_0x4d2178,_0x1293f5){_0x4d2178=_0x4d2178-0x0;let _0x117ac4=a7_0x1293[_0x4d2178];return _0x117ac4;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x14d8f7,_0x18e2de,_0x3097f2,_0x143819){function _0x3b4d57(_0x5e0dd1){return _0x5e0dd1 instanceof _0x3097f2?_0x5e0dd1:new _0x3097f2(function(_0x3e6ed5){_0x3e6ed5(_0x5e0dd1);});}return new(_0x3097f2||(_0x3097f2=Promise))(function(_0x596df9,_0x4d2b9d){function _0x3806c1(_0xeeebf8){try{_0x4b05c7(_0x143819['next'](_0xeeebf8));}catch(_0x127ceb){_0x4d2b9d(_0x127ceb);}}function _0x48d17e(_0x3c804f){try{_0x4b05c7(_0x143819[a7_0x117a('0x8')](_0x3c804f));}catch(_0x341fa5){_0x4d2b9d(_0x341fa5);}}function _0x4b05c7(_0x5dfe3c){_0x5dfe3c[a7_0x117a('0x4e')]?_0x596df9(_0x5dfe3c[a7_0x117a('0x23')]):_0x3b4d57(_0x5dfe3c[a7_0x117a('0x23')])[a7_0x117a('0x47')](_0x3806c1,_0x48d17e);}_0x4b05c7((_0x143819=_0x143819[a7_0x117a('0x40')](_0x14d8f7,_0x18e2de||[]))['next']());});};Object[a7_0x117a('0xd')](exports,a7_0x117a('0x27'),{'value':!![]});exports[a7_0x117a('0x38')]=exports[a7_0x117a('0x1f')]=void 0x0;const Observable_1=require('rxjs/internal/Observable');const cache_1=require('@nrwl/workspace/src/tasks-runner/cache');const output_1=require(a7_0x117a('0x22'));const utils_1=require(a7_0x117a('0x1c'));const stripJsonComments=require(a7_0x117a('0xc'));const fs_1=require('fs');const distributed_execution_api_1=require(a7_0x117a('0x2'));const file_storage_1=require(a7_0x117a('0x30'));const e2e_encryption_1=require(a7_0x117a('0x3b'));const waiter_1=require(a7_0x117a('0x4b'));const environment_1=require(a7_0x117a('0x6'));const print_run_group_error_1=require(a7_0x117a('0x25'));const create_no_new_messages_timeout_1=require(a7_0x117a('0xa'));const metric_logger_1=require(a7_0x117a('0xb'));class NoopLifeCycle{[a7_0x117a('0x59')](_0x14beb1){}['startTask'](_0xc6a11e){}[a7_0x117a('0x15')](_0xaa1122,_0x4bf946){}}function runDistributedExecution(_0x267dc9,_0x4b3119,_0x1f4d78,_0x11d500,_0x58409f,_0x30b676,_0xd1a14c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1fdbef=JSON[a7_0x117a('0x31')](stripJsonComments((0x0,fs_1[a7_0x117a('0x6b')])(a7_0x117a('0x67'))[a7_0x117a('0x5c')]()));const _0x2ee37c=new TaskOrderer(_0x1f4d78[a7_0x117a('0x46')],getDefaultDependencyConfigs(_0x1fdbef,_0x4b3119))[a7_0x117a('0x16')](_0xd1a14c);const _0x456b78=yield _0x267dc9[a7_0x117a('0x53')]((0x0,distributed_execution_api_1['createStartRequest'])(_0x30b676,_0x2ee37c,_0x4b3119));return yield processTasks(_0x267dc9,_0x11d500,_0x58409f,_0x4b3119,_0x456b78,_0xd1a14c,_0x1f4d78);});}function processTasks(_0xa6f994,_0x2ee042,_0xd4ad5f,_0x427a76,_0x49e8c6,_0x5d0533,_0x2ec04c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x417e6e={};const _0x513f78=(0x0,create_no_new_messages_timeout_1['createNoNewMessagesTimeout'])();const _0x412b18=new waiter_1[(a7_0x117a('0x4c'))]();while(!![]){if(environment_1[a7_0x117a('0xf')]){output_1[a7_0x117a('0x29')][a7_0x117a('0x69')]({'title':a7_0x117a('0x66')});}yield _0x412b18[a7_0x117a('0x42')]();const _0x520e16=yield _0xa6f994['status'](_0x49e8c6);if(environment_1['VERBOSE_LOGGING']){output_1[a7_0x117a('0x29')][a7_0x117a('0x69')]({'title':a7_0x117a('0x56'),'bodyLines':[a7_0x117a('0x48')+_0x49e8c6,a7_0x117a('0x6a')+_0x520e16[a7_0x117a('0x3d')],a7_0x117a('0x45')+_0x520e16[a7_0x117a('0x28')][a7_0x117a('0x57')],a7_0x117a('0x5d')+_0x520e16[a7_0x117a('0x19')]]});}if(_0x520e16[a7_0x117a('0x19')]){output_1[a7_0x117a('0x29')][a7_0x117a('0x39')]({'title':a7_0x117a('0x32'),'bodyLines':[a7_0x117a('0x14'),_0x520e16[a7_0x117a('0x19')]]});process[a7_0x117a('0x5')](0x1);}_0x513f78(_0x520e16[a7_0x117a('0x28')][a7_0x117a('0x57')]);for(const _0x531e73 of _0x520e16[a7_0x117a('0x28')]){if(_0x417e6e[_0x531e73[a7_0x117a('0x60')]])continue;yield processTask(_0x2ee042,_0xd4ad5f,_0x2ec04c,_0x427a76,_0x5d0533,_0x531e73);_0x412b18[a7_0x117a('0x43')]();_0x417e6e[_0x531e73[a7_0x117a('0x60')]]=!![];}if(_0x520e16[a7_0x117a('0x3d')]===a7_0x117a('0x17')){return{'commandStatus':_0x520e16[a7_0x117a('0x54')],'runUrl':_0x520e16[a7_0x117a('0x1a')]};}}});}function processTask(_0x2bd2e5,_0x5c0c70,_0x15304f,_0x5516c0,_0x33b9e9,_0x2726aa){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1[a7_0x117a('0xf')]){output_1['output']['note']({'title':a7_0x117a('0x1')+_0x2726aa[a7_0x117a('0x60')]});}const _0x3c6451=_0x33b9e9[a7_0x117a('0x44')](_0x5ddeef=>_0x2726aa[a7_0x117a('0x60')]===_0x5ddeef['id']);if(!_0x3c6451){throw new Error(a7_0x117a('0x4d')+_0x2726aa[a7_0x117a('0x60')]);}if(environment_1[a7_0x117a('0xf')]){output_1['output'][a7_0x117a('0x69')]({'title':a7_0x117a('0x62')+_0x2726aa[a7_0x117a('0xe')]});}yield _0x2bd2e5[a7_0x117a('0x0')](_0x2726aa['hash'],_0x2726aa[a7_0x117a('0xe')],_0x5516c0[a7_0x117a('0x3f')]||a7_0x117a('0x52'));const _0x117737=yield _0x5c0c70[a7_0x117a('0x2f')](Object['assign'](Object[a7_0x117a('0x13')]({},_0x3c6451),{'hash':_0x2726aa[a7_0x117a('0x65')]}));const _0x339c4b=(0x0,utils_1[a7_0x117a('0x2c')])(_0x15304f['projectGraph'][a7_0x117a('0x1b')],_0x3c6451);if(environment_1[a7_0x117a('0xf')]){output_1['output'][a7_0x117a('0x69')]({'title':'Extracting\x20artifacts','bodyLines':_0x339c4b});}yield _0x5c0c70[a7_0x117a('0x12')](_0x2726aa[a7_0x117a('0x65')],_0x117737,_0x339c4b);output_1[a7_0x117a('0x29')][a7_0x117a('0x58')](getCommand(_0x3c6451));process[a7_0x117a('0x2e')][a7_0x117a('0x51')](_0x117737['terminalOutput']);output_1[a7_0x117a('0x29')][a7_0x117a('0x35')]();});}function getCommand(_0x1169d7){const _0x4e0802=(0x0,utils_1['unparse'])(_0x1169d7[a7_0x117a('0x41')]||{});const _0x6c4863=_0x1169d7[a7_0x117a('0x20')][a7_0x117a('0x4')]?':'+_0x1169d7[a7_0x117a('0x20')][a7_0x117a('0x4')]:'';return['nx',a7_0x117a('0x3a'),_0x1169d7[a7_0x117a('0x20')]['project']+':'+_0x1169d7[a7_0x117a('0x20')][a7_0x117a('0x20')]+_0x6c4863,..._0x4e0802][a7_0x117a('0x3')]('\x20');}const nxCloudDistributedTasksRunner=(_0x3b8fc0,_0x417e47,_0x476f08)=>{if(environment_1['VERBOSE_LOGGING']){output_1[a7_0x117a('0x29')][a7_0x117a('0x69')]({'title':a7_0x117a('0x3e')});}_0x417e47['lifeCycle']=new NoopLifeCycle();const _0x5aa690=(0x0,environment_1[a7_0x117a('0x37')])();if(!_0x5aa690){(0x0,print_run_group_error_1[a7_0x117a('0x5f')])();return process['exit'](0x1);}const _0x2db312=new e2e_encryption_1['E2EEncryption'](environment_1['ENCRYPTION_KEY']||_0x417e47[a7_0x117a('0x50')]);const _0x295809=new file_storage_1[(a7_0x117a('0x24'))](_0x2db312);const _0x40a308=new cache_1[(a7_0x117a('0x11'))](_0x417e47);const _0x1ac293=new distributed_execution_api_1['DistributedExecutionApi'](_0x417e47);runDistributedExecution(_0x1ac293,_0x417e47,_0x476f08,_0x295809,_0x40a308,_0x5aa690,_0x3b8fc0)[a7_0x117a('0x47')](_0x14fdb3=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(_0x14fdb3[a7_0x117a('0x54')]===0x0){output_1['output']['success']({'title':a7_0x117a('0x26'),'bodyLines':['See\x20run\x20details\x20at\x20'+_0x14fdb3['runUrl']]});}else{output_1[a7_0x117a('0x29')][a7_0x117a('0x39')]({'title':a7_0x117a('0x4a'),'bodyLines':['See\x20run\x20details\x20at\x20'+_0x14fdb3[a7_0x117a('0x1a')]]});}yield(0x0,metric_logger_1[a7_0x117a('0x5a')])(_0x417e47);process[a7_0x117a('0x5')](_0x14fdb3[a7_0x117a('0x54')]);}))[a7_0x117a('0x2d')](_0x5b918e=>{output_1[a7_0x117a('0x29')][a7_0x117a('0x39')]({'title':a7_0x117a('0x63'),'bodyLines':[_0x5b918e[a7_0x117a('0x21')]]});if(_0x5b918e['axiosException']){console[a7_0x117a('0x10')](_0x5b918e['axiosException']);}else{console[a7_0x117a('0x10')](_0x5b918e);}_0x1ac293['completeRunGroupWithError'](_0x5aa690,a7_0x117a('0x9')+_0x5b918e[a7_0x117a('0x21')]+'\x22')[a7_0x117a('0x49')](()=>process[a7_0x117a('0x5')](0x1));});return new Observable_1[(a7_0x117a('0x4f'))](()=>{});};exports[a7_0x117a('0x1f')]=nxCloudDistributedTasksRunner;class TaskOrderer{constructor(_0xf561d7,_0x379372){this[a7_0x117a('0x46')]=_0xf561d7;this[a7_0x117a('0x6c')]=_0x379372;}[a7_0x117a('0x16')](_0x2d58e9){if(_0x2d58e9['length']===0x0)return[];const _0x19746e=[];const _0x15ac72=this[a7_0x117a('0x61')](_0x2d58e9);const _0x4ee0f7=new Set(_0x2d58e9[a7_0x117a('0x55')](_0x32f29a=>_0x32f29a['id']));let _0x2b0139=0x0;while(_0x4ee0f7['size']>0x0){const _0x10faa3=_0x19746e[_0x2b0139]=[];for(const _0x4bec5d of _0x4ee0f7){let _0x49bef5=!![];for(const _0x50d146 of _0x15ac72[a7_0x117a('0x5b')][_0x4bec5d]){if(_0x4ee0f7[a7_0x117a('0x2a')](_0x50d146)){_0x49bef5=![];break;}}if(!_0x49bef5){continue;}const _0x57e476=_0x15ac72['tasks'][_0x4bec5d];_0x10faa3[a7_0x117a('0x2b')](_0x57e476);}for(const _0x53c9e4 of _0x10faa3){_0x4ee0f7['delete'](_0x53c9e4['id']);}_0x2b0139++;}return _0x19746e;}[a7_0x117a('0x61')](_0x177fff){const _0x3ec95e=new TaskGraphCreator(this[a7_0x117a('0x46')],this[a7_0x117a('0x6c')]);return _0x3ec95e[a7_0x117a('0x61')](_0x177fff);}}class TaskGraphCreator{constructor(_0x59cc07,_0x9bf8ce){this[a7_0x117a('0x46')]=_0x59cc07;this[a7_0x117a('0x6c')]=_0x9bf8ce;}[a7_0x117a('0x61')](_0x50590a){const _0x165036={'roots':[],'tasks':{},'dependencies':{}};for(const _0x29a72b of _0x50590a){this[a7_0x117a('0x68')](_0x29a72b,_0x165036);const _0x169bdd=(0x0,utils_1['getDependencyConfigs'])(_0x29a72b[a7_0x117a('0x20')],this['defaultTargetDependencies'],this['projectGraph']);if(!_0x169bdd){continue;}this['addTaskDependencies'](_0x29a72b,_0x169bdd,_0x50590a,_0x165036);}_0x165036[a7_0x117a('0x1e')]=Object[a7_0x117a('0x64')](_0x165036['dependencies'])[a7_0x117a('0x5e')](_0x5213b0=>_0x165036['dependencies'][_0x5213b0]['length']===0x0);return _0x165036;}['addTaskDependencies'](_0x53ca2a,_0x4d6709,_0x52aca8,_0x4ff1c8){for(const _0x3e9563 of _0x4d6709){if(_0x3e9563['projects']===a7_0x117a('0x7')){for(const _0xd49658 of _0x52aca8){if(_0xd49658[a7_0x117a('0x20')]['project']===_0x53ca2a[a7_0x117a('0x20')][a7_0x117a('0x34')]&&_0xd49658[a7_0x117a('0x20')][a7_0x117a('0x20')]===_0x3e9563[a7_0x117a('0x20')]){_0x4ff1c8[a7_0x117a('0x5b')][_0x53ca2a['id']][a7_0x117a('0x2b')](_0xd49658['id']);}}}else if(_0x3e9563[a7_0x117a('0x18')]==='dependencies'){const _0x48a77d=new Set();this[a7_0x117a('0x36')](_0x53ca2a[a7_0x117a('0x20')]['project'],_0x3e9563['target'],_0x52aca8,_0x4ff1c8,_0x53ca2a['id'],_0x48a77d);}}}[a7_0x117a('0x36')](_0x3fc9ad,_0x295db4,_0x1fbfff,_0x3b5f71,_0x54bbc5,_0x3e4f9){_0x3e4f9[a7_0x117a('0x3c')](_0x3fc9ad);const _0xf28254=this[a7_0x117a('0x46')][a7_0x117a('0x5b')][_0x3fc9ad];if(_0xf28254){const _0x18efc4=_0xf28254[a7_0x117a('0x55')](_0x35d729=>_0x35d729[a7_0x117a('0x20')]);for(const _0x322636 of _0x18efc4){if(_0x3e4f9['has'](_0x322636)){continue;}const _0x523369=this['findTask']({'project':_0x322636,'target':_0x295db4},_0x1fbfff);if(_0x523369){if(_0x3b5f71[a7_0x117a('0x5b')][_0x54bbc5]['indexOf'](_0x523369['id'])===-0x1){_0x3b5f71['dependencies'][_0x54bbc5][a7_0x117a('0x2b')](_0x523369['id']);}}else{this['addDependencies'](_0x322636,_0x295db4,_0x1fbfff,_0x3b5f71,_0x54bbc5,_0x3e4f9);}}}}[a7_0x117a('0x33')]({project,target},_0x3ded17){return _0x3ded17[a7_0x117a('0x44')](_0x30d74d=>_0x30d74d['target'][a7_0x117a('0x34')]===project&&_0x30d74d[a7_0x117a('0x20')][a7_0x117a('0x20')]===target);}[a7_0x117a('0x68')](_0x5610c5,_0x2940ee){_0x2940ee['tasks'][_0x5610c5['id']]=_0x5610c5;_0x2940ee[a7_0x117a('0x5b')][_0x5610c5['id']]=[];}}exports[a7_0x117a('0x38')]=TaskGraphCreator;function getDefaultDependencyConfigs(_0x5c9da6,_0x209aa0){var _0xdcd5e7,_0x2643e8;const _0x3f7b17=(_0xdcd5e7=_0x5c9da6[a7_0x117a('0x1d')])!==null&&_0xdcd5e7!==void 0x0?_0xdcd5e7:{};const _0x41876a=_0x209aa0?(_0x2643e8=_0x209aa0['strictlyOrderedTargets'])!==null&&_0x2643e8!==void 0x0?_0x2643e8:['build']:[];for(const _0x4afa1c of _0x41876a){_0x3f7b17[_0x4afa1c]=_0x3f7b17[_0x4afa1c]||[];_0x3f7b17[_0x4afa1c][a7_0x117a('0x2b')]({'target':_0x4afa1c,'projects':'dependencies'});}return _0x3f7b17;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distributed-execution.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/runners/distributed-execution/distributed-execution.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,yDAAsD;AACtD,kEAA+D;AAC/D,iEAA8D;AAC9D,kEAIgD;AAChD,yDAAyD;AACzD,2BAAkC;AAClC,2EAGqC;AAErC,kEAA8D;AAC9D,sEAAkE;AAClE,sDAAmD;AACnD,gEAKwC;AACxC,6EAAuE;AACvE,sGAA+F;AAC/F,oEAAoE;AAEpE,MAAM,aAAa;IACjB,YAAY,CAAC,IAAU,IAAS,CAAC;IAEjC,SAAS,CAAC,IAAU,IAAS,CAAC;IAE9B,OAAO,CAAC,IAAU,EAAE,IAAY,IAAS,CAAC;CAC3C;AAED,SAAe,uBAAuB,CACpC,GAA4B,EAC5B,OAA+B,EAC/B,OAAY,EACZ,WAAwB,EACxB,KAAY,EACZ,QAAgB,EAChB,KAAa;;QAEb,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CACvB,iBAAiB,CAAC,IAAA,iBAAY,EAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,CACtD,CAAC;QACF,MAAM,MAAM,GAAG,IAAI,WAAW,CAC5B,OAAO,CAAC,YAAY,EACpB,2BAA2B,CAAC,MAAM,EAAE,OAAc,CAAC,CACpD,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAE9B,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,KAAK,CAAC,IAAA,8CAAkB,EAAC,QAAQ,EAAE,MAAM,EAA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C,IAAU,EAAE,KAAU;QAC3C,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;QAC5B,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;IACnC,CAAC;CACF;AAvHD,4CAuHC;AAED,SAAS,2BAA2B,CAClC,MAAW,EACX,aAEC;;IAED,MAAM,QAAQ,GAA0B,MAAA,MAAM,CAAC,kBAAkB,mCAAI,EAAE,CAAC;IAExE,MAAM,sBAAsB,GAAG,aAAa;QAC1C,CAAC,CAAC,MAAA,aAAa,CAAC,sBAAsB,mCAAI,CAAC,OAAO,CAAC;QACnD,CAAC,CAAC,EAAE,CAAC;IACP,wDAAwD;IACxD,KAAK,MAAM,MAAM,IAAI,sBAAsB,EAAE;QAC3C,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC1C,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;YACpB,MAAM;YACN,QAAQ,EAAE,cAAc;SACzB,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"distributed-execution.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/runners/distributed-execution/distributed-execution.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,yDAAsD;AACtD,kEAA+D;AAC/D,iEAA8D;AAC9D,kEAIgD;AAChD,yDAAyD;AACzD,2BAAkC;AAClC,2EAGqC;AAErC,kEAA8D;AAC9D,sEAAkE;AAClE,sDAAmD;AACnD,gEAIwC;AACxC,6EAAuE;AACvE,sGAA+F;AAC/F,oEAAoE;AAEpE,MAAM,aAAa;IACjB,YAAY,CAAC,IAAU,IAAS,CAAC;IAEjC,SAAS,CAAC,IAAU,IAAS,CAAC;IAE9B,OAAO,CAAC,IAAU,EAAE,IAAY,IAAS,CAAC;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,7 +53,7 @@ const nxCloudTasksRunner = (tasks, options, context) => {
|
|
|
53
53
|
function verifyNxCloudWorkspaceEnabled(options) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
55
|
const axiosInstance = (0, axios_1.createApiAxiosInstance)(options);
|
|
56
|
-
return yield (0, axios_1.axiosMultipleTries)(() => axiosInstance.get('/nx-cloud/executions/workspace-status')
|
|
56
|
+
return yield (0, axios_1.axiosMultipleTries)(() => axiosInstance.get('/nx-cloud/executions/workspace-status'));
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
function verifyAllOperationsAreCacheableOnMainJob(tasks, options) {
|
|
@@ -63,8 +63,9 @@ function verifyAllOperationsAreCacheableOnMainJob(tasks, options) {
|
|
|
63
63
|
output_1.output.error({
|
|
64
64
|
title: `Distributed task execution only works for cacheable targets`,
|
|
65
65
|
bodyLines: [
|
|
66
|
-
`Target ${task.target.project}:${task.target.target} cannot be executed.`,
|
|
66
|
+
`Target '${task.target.project}:${task.target.target}' cannot be executed.`,
|
|
67
67
|
`To be able to replay the output of the target, distributed task execution only supports cacheable targets.`,
|
|
68
|
+
`You can verify that '${task.target.target}' is part of the list of cacheable targets in the 'nx.json' file.`,
|
|
68
69
|
`You can invoke this command without distribution by doing "NX_CLOUD_DISTRIBUTED_EXECUTION=false nx ...".`,
|
|
69
70
|
],
|
|
70
71
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nx-cloud-tasks-runner.js","sourceRoot":"","sources":["../../../../../libs/nx-packages/nx-cloud/src/lib/nx-cloud-tasks-runner.ts"],"names":[],"mappings":";;;;;;;;;;;AAMA,wDAAqD;AACrD,iEAA8D;AAC9D,sFAAiF;AACjF,iEAA8D;AAE9D,
|
|
1
|
+
{"version":3,"file":"nx-cloud-tasks-runner.js","sourceRoot":"","sources":["../../../../../libs/nx-packages/nx-cloud/src/lib/nx-cloud-tasks-runner.ts"],"names":[],"mappings":";;;;;;;;;;;AAMA,wDAAq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CAAC;gBACX,KAAK,EAAE,6DAA6D;gBACpE,SAAS,EAAE;oBACT,UAAU,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,sBAAsB;oBACzE,4GAA4G;oBAC5G,4BAA4B,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,6EAA6E;iBACnJ;aACF,CAAC,CAAC;YACH,OAAO,CAAC,IAAI,CAAC,mEAAqD,CAAC,CAAC;SACrE;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kBAAe,kBAAkB,CAAC"}
|
package/lib/utilities/axios.js
CHANGED
|
@@ -35,44 +35,32 @@ function createApiAxiosInstance(options) {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
exports.createApiAxiosInstance = createApiAxiosInstance;
|
|
38
|
-
function axiosMultipleTries(axiosCallCreator, attemptsLeft =
|
|
38
|
+
function axiosMultipleTries(axiosCallCreator, attemptsLeft = environment_1.NUMBER_OF_AXIOS_RETRIES) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
try {
|
|
41
41
|
return yield axiosCallCreator();
|
|
42
42
|
}
|
|
43
43
|
catch (e) {
|
|
44
44
|
const code = e.code || (e.response && e.response.status === 404 ? 404 : undefined);
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
code === 'EAI_AGAIN' ||
|
|
48
|
-
code === 'ENOTFOUND' ||
|
|
49
|
-
code === 'EPROTO' ||
|
|
50
|
-
code === 404 ||
|
|
51
|
-
code === 503) {
|
|
52
|
-
if (attemptsLeft === 1) {
|
|
53
|
-
throw new AxiosException('timeout', `Cannot connect to Nx Cloud. Code: ${code}`, e);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
57
|
-
output_1.output.note({
|
|
58
|
-
title: `Received ${code}. Retrying in under 10 seconds.`,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
yield (0, waiter_1.wait)(10000 * Math.random());
|
|
62
|
-
return axiosMultipleTries(axiosCallCreator, attemptsLeft - 1);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
if (!e.response) {
|
|
67
|
-
throw new AxiosException('failure', `Error when connecting to Nx Cloud. Error: ${e.message}`, e);
|
|
68
|
-
}
|
|
69
|
-
let message = e.response.data.message
|
|
45
|
+
if (attemptsLeft === 0) {
|
|
46
|
+
let message = e.response
|
|
70
47
|
? e.response.data.message
|
|
71
|
-
|
|
48
|
+
? e.response.data.message
|
|
49
|
+
: e.response.data
|
|
50
|
+
: e.message;
|
|
72
51
|
if (typeof message !== 'string') {
|
|
73
52
|
message = e.message;
|
|
74
53
|
}
|
|
75
|
-
throw new AxiosException('failure', `Error when connecting to Nx Cloud. Error: ${message}
|
|
54
|
+
throw new AxiosException('failure', `Error when connecting to Nx Cloud. Code: ${code}. Error: ${message}.`, e);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
58
|
+
output_1.output.note({
|
|
59
|
+
title: `Received ${code}. Retrying in under 10 seconds.`,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
yield (0, waiter_1.wait)(10000 * Math.random());
|
|
63
|
+
return axiosMultipleTries(axiosCallCreator, attemptsLeft - 1);
|
|
76
64
|
}
|
|
77
65
|
}
|
|
78
66
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/src/lib/utilities/axios.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAC9D,+
|
|
1
|
+
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/src/lib/utilities/axios.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAC9D,+CAMuB;AACvB,qCAAg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