@nrwl/nx-cloud 15.2.0-beta.6 → 15.2.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/generators.json +2 -1
- package/lib/core/api/error-reporter.api.js +1 -36
- package/lib/core/api/run-group.api.js +1 -68
- package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +1 -93
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +1 -316
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +1 -133
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +1 -170
- package/lib/core/runners/cloud-enabled/id-generator.js +1 -16
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +1 -80
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js +1 -154
- package/lib/core/runners/distributed-agent/execute-tasks.js +1 -114
- package/lib/core/runners/distributed-agent/invoke-tasks-using-nx-imperative-api.js +1 -58
- package/lib/core/runners/distributed-agent/invoke-tasks-using-run-many.js +1 -97
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +1 -143
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +1 -115
- package/lib/core/runners/distributed-execution/process-task.js +1 -45
- package/lib/core/runners/distributed-execution/process-tasks.js +1 -67
- package/lib/core/runners/distributed-execution/split-task-graph-into-stages.js +1 -37
- package/lib/core/runners/distributed-execution/task-graph-creator.js +1 -100
- package/lib/nx-cloud-tasks-runner.js.map +1 -1
- package/lib/utilities/environment.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,114 +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.executeTasks = void 0;
|
|
13
|
-
const create_unchanged_value_timeout_1 = require("../../../utilities/create-unchanged-value-timeout");
|
|
14
|
-
const environment_1 = require("../../../utilities/environment");
|
|
15
|
-
const waiter_1 = require("../../../utilities/waiter");
|
|
16
|
-
const { output } = require('../../../utilities/nx-imports');
|
|
17
|
-
function executeTasks(agentName, api, dteArtifactStorage, invokeTasks, targets) {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
let completedStatusCode = 0;
|
|
20
|
-
let apiResponse = null;
|
|
21
|
-
const failIfSameTasksAfterTimeout = (0, create_unchanged_value_timeout_1.createUnchangedValueTimeout)({
|
|
22
|
-
title: `No new messages received after ${environment_1.NO_MESSAGES_TIMEOUT / 1000} seconds`,
|
|
23
|
-
timeout: environment_1.NO_MESSAGES_TIMEOUT,
|
|
24
|
-
});
|
|
25
|
-
const waiter = new waiter_1.Waiter();
|
|
26
|
-
let completedTasks = [];
|
|
27
|
-
const startTime = new Date();
|
|
28
|
-
let executedAnyTasks = false;
|
|
29
|
-
const processedTasks = {};
|
|
30
|
-
while (true) {
|
|
31
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
32
|
-
output.note({
|
|
33
|
-
title: `${agentName} fetching tasks...`,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
apiResponse = yield api.tasks(apiResponse ? apiResponse.executionId : null, completedStatusCode, completedTasks, targets);
|
|
37
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
38
|
-
output.note({
|
|
39
|
-
title: `${agentName} received an API Response`,
|
|
40
|
-
bodyLines: [
|
|
41
|
-
`completed: ${apiResponse.completed}`,
|
|
42
|
-
`status: ${apiResponse.status}`,
|
|
43
|
-
`retryDuring: ${apiResponse.retryDuring}`,
|
|
44
|
-
`executionId: ${apiResponse.executionId}`,
|
|
45
|
-
`number of tasks: ${apiResponse.tasks.length}`,
|
|
46
|
-
`error: ${apiResponse.criticalErrorMessage}`,
|
|
47
|
-
`maxParallel: ${apiResponse.maxParallel}`,
|
|
48
|
-
],
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
if (apiResponse.criticalErrorMessage) {
|
|
52
|
-
output.error({
|
|
53
|
-
title: 'Distributed Execution Terminated',
|
|
54
|
-
bodyLines: ['Error:', apiResponse.criticalErrorMessage],
|
|
55
|
-
});
|
|
56
|
-
process.exit(0);
|
|
57
|
-
}
|
|
58
|
-
// run group is completed but it might be a rerun
|
|
59
|
-
// we will try several times before going further and
|
|
60
|
-
// completed the response
|
|
61
|
-
// we only do it if we haven't executed any tasks
|
|
62
|
-
if ((apiResponse === null || apiResponse === void 0 ? void 0 : apiResponse.retryDuring) &&
|
|
63
|
-
(apiResponse === null || apiResponse === void 0 ? void 0 : apiResponse.retryDuring) !== 0 &&
|
|
64
|
-
!executedAnyTasks &&
|
|
65
|
-
new Date().getTime() - startTime.getTime() > apiResponse.retryDuring) {
|
|
66
|
-
yield waiter.wait();
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
if ((apiResponse === null || apiResponse === void 0 ? void 0 : apiResponse.status) !== undefined) {
|
|
70
|
-
if (apiResponse.status === 'RUN_GROUP_COMPLETED' ||
|
|
71
|
-
apiResponse.status === 'NO_FURTHER_TASKS_TO_RUN') {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
else if (apiResponse.completed) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
// if status is present that use the status instead of completed, otherwise use completed
|
|
79
|
-
failIfSameTasksAfterTimeout(apiResponse.tasks.map((t) => t.taskId).join(''));
|
|
80
|
-
if (!apiResponse.executionId) {
|
|
81
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
82
|
-
output.note({
|
|
83
|
-
title: `${agentName} waiting...`,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
yield waiter.wait();
|
|
87
|
-
completedStatusCode = 0;
|
|
88
|
-
completedTasks = [];
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
waiter.reset();
|
|
92
|
-
executedAnyTasks = true;
|
|
93
|
-
if (apiResponse.completedTasks) {
|
|
94
|
-
for (const t of apiResponse.completedTasks) {
|
|
95
|
-
if (processedTasks[t.taskId])
|
|
96
|
-
continue;
|
|
97
|
-
output.note({
|
|
98
|
-
title: `${agentName} downloading artifacts for ${t.taskId} Hash: ${t.hash} Url: ${t.url}`,
|
|
99
|
-
});
|
|
100
|
-
yield dteArtifactStorage.retrieveAndExtract(t.hash, t.url);
|
|
101
|
-
processedTasks[t.taskId] = true;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
const r = yield invokeTasks(apiResponse.executionId, apiResponse.tasks, apiResponse.maxParallel);
|
|
105
|
-
for (const t of r.completedTasks) {
|
|
106
|
-
processedTasks[t.taskId] = true;
|
|
107
|
-
}
|
|
108
|
-
completedStatusCode = r.completedStatusCode;
|
|
109
|
-
completedTasks = r.completedTasks;
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
exports.executeTasks = executeTasks;
|
|
114
|
-
//# sourceMappingURL=execute-tasks.js.map
|
|
1
|
+
const a7_0x4f8f=['\x20downloading\x20artifacts\x20for\x20','wait','retryDuring:\x20','done','next','Error:','Distributed\x20Execution\x20Terminated','executionId:\x20','\x20waiting...','tasks','error','exit','completed','retryDuring','executeTasks','criticalErrorMessage','__esModule','../../../utilities/nx-imports','length','NO_MESSAGES_TIMEOUT','\x20Url:\x20','No\x20new\x20messages\x20received\x20after\x20','\x20Hash:\x20','throw','number\x20of\x20tasks:\x20','\x20seconds','hash','completed:\x20','join','completedStatusCode','../../../utilities/environment','completedTasks','reset','error:\x20','VERBOSE_LOGGING','taskId','executionId','url','getTime','../../../utilities/create-unchanged-value-timeout','maxParallel:\x20','note','maxParallel','value','then','createUnchangedValueTimeout','\x20fetching\x20tasks...','status','status:\x20','map'];(function(_0x143f26,_0x4f8f63){const _0x177518=function(_0x52c636){while(--_0x52c636){_0x143f26['push'](_0x143f26['shift']());}};_0x177518(++_0x4f8f63);}(a7_0x4f8f,0xb9));const a7_0x1775=function(_0x143f26,_0x4f8f63){_0x143f26=_0x143f26-0x0;let _0x177518=a7_0x4f8f[_0x143f26];return _0x177518;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x1e3228,_0x5ceb12,_0x3913f0,_0xfd5878){function _0x479f11(_0x531622){return _0x531622 instanceof _0x3913f0?_0x531622:new _0x3913f0(function(_0x3d9fe5){_0x3d9fe5(_0x531622);});}return new(_0x3913f0||(_0x3913f0=Promise))(function(_0x181979,_0x5387c7){function _0xd8483f(_0x1dfec5){try{_0x4cb0dc(_0xfd5878[a7_0x1775('0x13')](_0x1dfec5));}catch(_0x997286){_0x5387c7(_0x997286);}}function _0x3dd53a(_0x18da47){try{_0x4cb0dc(_0xfd5878[a7_0x1775('0x26')](_0x18da47));}catch(_0x49c590){_0x5387c7(_0x49c590);}}function _0x4cb0dc(_0x155fa5){_0x155fa5[a7_0x1775('0x12')]?_0x181979(_0x155fa5[a7_0x1775('0x8')]):_0x479f11(_0x155fa5['value'])[a7_0x1775('0x9')](_0xd8483f,_0x3dd53a);}_0x4cb0dc((_0xfd5878=_0xfd5878['apply'](_0x1e3228,_0x5ceb12||[]))[a7_0x1775('0x13')]());});};Object['defineProperty'](exports,a7_0x1775('0x1f'),{'value':!![]});exports[a7_0x1775('0x1d')]=void 0x0;const create_unchanged_value_timeout_1=require(a7_0x1775('0x4'));const environment_1=require(a7_0x1775('0x2d'));const waiter_1=require('../../../utilities/waiter');const {output}=require(a7_0x1775('0x20'));function executeTasks(_0x3c1dfa,_0x53dc8f,_0x46e567,_0x2f1c48,_0x43ff77){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x43e38d=0x0;let _0x442046=null;const _0x132092=(0x0,create_unchanged_value_timeout_1[a7_0x1775('0xa')])({'title':a7_0x1775('0x24')+environment_1[a7_0x1775('0x22')]/0x3e8+a7_0x1775('0x28'),'timeout':environment_1['NO_MESSAGES_TIMEOUT']});const _0x2dcf05=new waiter_1['Waiter']();let _0x3b17a0=[];const _0x1a7b23=new Date();let _0x5b7d53=![];const _0x2f5616={};while(!![]){if(environment_1['VERBOSE_LOGGING']){output[a7_0x1775('0x6')]({'title':_0x3c1dfa+a7_0x1775('0xb')});}_0x442046=yield _0x53dc8f[a7_0x1775('0x18')](_0x442046?_0x442046['executionId']:null,_0x43e38d,_0x3b17a0,_0x43ff77);if(environment_1[a7_0x1775('0x31')]){output[a7_0x1775('0x6')]({'title':_0x3c1dfa+'\x20received\x20an\x20API\x20Response','bodyLines':[a7_0x1775('0x2a')+_0x442046[a7_0x1775('0x1b')],a7_0x1775('0xd')+_0x442046[a7_0x1775('0xc')],a7_0x1775('0x11')+_0x442046[a7_0x1775('0x1c')],a7_0x1775('0x16')+_0x442046[a7_0x1775('0x1')],a7_0x1775('0x27')+_0x442046[a7_0x1775('0x18')][a7_0x1775('0x21')],a7_0x1775('0x30')+_0x442046[a7_0x1775('0x1e')],a7_0x1775('0x5')+_0x442046[a7_0x1775('0x7')]]});}if(_0x442046[a7_0x1775('0x1e')]){output[a7_0x1775('0x19')]({'title':a7_0x1775('0x15'),'bodyLines':[a7_0x1775('0x14'),_0x442046[a7_0x1775('0x1e')]]});process[a7_0x1775('0x1a')](0x0);}if((_0x442046===null||_0x442046===void 0x0?void 0x0:_0x442046[a7_0x1775('0x1c')])&&(_0x442046===null||_0x442046===void 0x0?void 0x0:_0x442046['retryDuring'])!==0x0&&!_0x5b7d53&&new Date()['getTime']()-_0x1a7b23[a7_0x1775('0x3')]()>_0x442046['retryDuring']){yield _0x2dcf05[a7_0x1775('0x10')]();continue;}if((_0x442046===null||_0x442046===void 0x0?void 0x0:_0x442046[a7_0x1775('0xc')])!==undefined){if(_0x442046[a7_0x1775('0xc')]==='RUN_GROUP_COMPLETED'||_0x442046[a7_0x1775('0xc')]==='NO_FURTHER_TASKS_TO_RUN'){return;}}else if(_0x442046[a7_0x1775('0x1b')]){return;}_0x132092(_0x442046[a7_0x1775('0x18')][a7_0x1775('0xe')](_0x49f56d=>_0x49f56d['taskId'])[a7_0x1775('0x2b')](''));if(!_0x442046[a7_0x1775('0x1')]){if(environment_1[a7_0x1775('0x31')]){output['note']({'title':_0x3c1dfa+a7_0x1775('0x17')});}yield _0x2dcf05[a7_0x1775('0x10')]();_0x43e38d=0x0;_0x3b17a0=[];continue;}_0x2dcf05[a7_0x1775('0x2f')]();_0x5b7d53=!![];if(_0x442046[a7_0x1775('0x2e')]){for(const _0x87dd4f of _0x442046['completedTasks']){if(_0x2f5616[_0x87dd4f[a7_0x1775('0x0')]])continue;output[a7_0x1775('0x6')]({'title':_0x3c1dfa+a7_0x1775('0xf')+_0x87dd4f[a7_0x1775('0x0')]+a7_0x1775('0x25')+_0x87dd4f[a7_0x1775('0x29')]+a7_0x1775('0x23')+_0x87dd4f[a7_0x1775('0x2')]});yield _0x46e567['retrieveAndExtract'](_0x87dd4f[a7_0x1775('0x29')],_0x87dd4f[a7_0x1775('0x2')]);_0x2f5616[_0x87dd4f[a7_0x1775('0x0')]]=!![];}}const _0x37ed7d=yield _0x2f1c48(_0x442046[a7_0x1775('0x1')],_0x442046['tasks'],_0x442046[a7_0x1775('0x7')]);for(const _0x58fb9a of _0x37ed7d['completedTasks']){_0x2f5616[_0x58fb9a['taskId']]=!![];}_0x43e38d=_0x37ed7d[a7_0x1775('0x2c')];_0x3b17a0=_0x37ed7d[a7_0x1775('0x2e')];}});}exports['executeTasks']=executeTasks;
|
|
@@ -1,58 +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.invokeTasksUsingNxImperativeApi = void 0;
|
|
13
|
-
const { initTasksRunner } = require('../../../utilities/nx-imports');
|
|
14
|
-
const parser = require("yargs-parser");
|
|
15
|
-
const serializer_overrides_1 = require("../../../utilities/serializer-overrides");
|
|
16
|
-
function invokeTasksUsingNxImperativeApi(options) {
|
|
17
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
const tasksRunner = yield initTasksRunner(options);
|
|
19
|
-
return (executionId, tasksToExecute, parallel) => __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const tasks = tasksToExecute.map((t) => {
|
|
21
|
-
const params = parser(t.params, {
|
|
22
|
-
configuration: {
|
|
23
|
-
'camel-case-expansion': false,
|
|
24
|
-
'dot-notation': true,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
const unparsed = (0, serializer_overrides_1.unparse)(params);
|
|
28
|
-
if (params._.length == 0) {
|
|
29
|
-
delete params._;
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
id: t.taskId,
|
|
33
|
-
target: {
|
|
34
|
-
project: t.projectName,
|
|
35
|
-
target: t.target,
|
|
36
|
-
configuration: t.configuration,
|
|
37
|
-
},
|
|
38
|
-
overrides: Object.assign(Object.assign({}, params), { __overrides_unparsed__: unparsed }),
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
|
-
process.env.NX_CACHE_FAILURES = 'true'; // this is only requires because of how we do uploads
|
|
42
|
-
process.env.NX_CLOUD_DISTRIBUTED_EXECUTION_ID = executionId;
|
|
43
|
-
process.env.NX_STREAM_OUTPUT = 'true';
|
|
44
|
-
process.env.NX_PREFIX_OUTPUT = 'true';
|
|
45
|
-
const r = yield tasksRunner.invoke({ tasks, parallel });
|
|
46
|
-
const completedTasks = Object.values(r.taskGraph.tasks);
|
|
47
|
-
return {
|
|
48
|
-
completedTasks: completedTasks.map((t) => ({
|
|
49
|
-
taskId: t.id,
|
|
50
|
-
hash: t.hash,
|
|
51
|
-
})),
|
|
52
|
-
completedStatusCode: r.status,
|
|
53
|
-
};
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
exports.invokeTasksUsingNxImperativeApi = invokeTasksUsingNxImperativeApi;
|
|
58
|
-
//# sourceMappingURL=invoke-tasks-using-nx-imperative-api.js.map
|
|
1
|
+
const a8_0xda3c=['map','tasks','assign','__awaiter','status','unparse','defineProperty','NX_CLOUD_DISTRIBUTED_EXECUTION_ID','throw','invokeTasksUsingNxImperativeApi','done','NX_STREAM_OUTPUT','hash','env','true','yargs-parser','taskGraph','value','next','then','length','../../../utilities/serializer-overrides','NX_PREFIX_OUTPUT','__esModule','NX_CACHE_FAILURES','apply','../../../utilities/nx-imports','params','target','configuration'];(function(_0x27023d,_0xda3ca5){const _0x5d040e=function(_0x1953f4){while(--_0x1953f4){_0x27023d['push'](_0x27023d['shift']());}};_0x5d040e(++_0xda3ca5);}(a8_0xda3c,0x107));const a8_0x5d04=function(_0x27023d,_0xda3ca5){_0x27023d=_0x27023d-0x0;let _0x5d040e=a8_0xda3c[_0x27023d];return _0x5d040e;};'use strict';var __awaiter=this&&this[a8_0x5d04('0xa')]||function(_0x145bf8,_0x457ca1,_0xfd5613,_0x265c48){function _0x332d2b(_0x514669){return _0x514669 instanceof _0xfd5613?_0x514669:new _0xfd5613(function(_0x3a400d){_0x3a400d(_0x514669);});}return new(_0xfd5613||(_0xfd5613=Promise))(function(_0x5cdcd0,_0x1bea63){function _0x1c9946(_0x43df4d){try{_0x5debbf(_0x265c48[a8_0x5d04('0x19')](_0x43df4d));}catch(_0x11a4e2){_0x1bea63(_0x11a4e2);}}function _0x2cf0f9(_0x5018ca){try{_0x5debbf(_0x265c48[a8_0x5d04('0xf')](_0x5018ca));}catch(_0x11c693){_0x1bea63(_0x11c693);}}function _0x5debbf(_0x8e69dd){_0x8e69dd[a8_0x5d04('0x11')]?_0x5cdcd0(_0x8e69dd[a8_0x5d04('0x18')]):_0x332d2b(_0x8e69dd['value'])[a8_0x5d04('0x1a')](_0x1c9946,_0x2cf0f9);}_0x5debbf((_0x265c48=_0x265c48[a8_0x5d04('0x2')](_0x145bf8,_0x457ca1||[]))[a8_0x5d04('0x19')]());});};Object[a8_0x5d04('0xd')](exports,a8_0x5d04('0x0'),{'value':!![]});exports[a8_0x5d04('0x10')]=void 0x0;const {initTasksRunner}=require(a8_0x5d04('0x3'));const parser=require(a8_0x5d04('0x16'));const serializer_overrides_1=require(a8_0x5d04('0x1c'));function invokeTasksUsingNxImperativeApi(_0x8ed6c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x236cc6=yield initTasksRunner(_0x8ed6c);return(_0x2643b3,_0x10e64c,_0x5d1954)=>__awaiter(this,void 0x0,void 0x0,function*(){const _0x1ab8e6=_0x10e64c[a8_0x5d04('0x7')](_0x59ce6e=>{const _0x30e200=parser(_0x59ce6e[a8_0x5d04('0x4')],{'configuration':{'camel-case-expansion':![],'dot-notation':!![]}});const _0x2b7b62=(0x0,serializer_overrides_1[a8_0x5d04('0xc')])(_0x30e200);if(_0x30e200['_'][a8_0x5d04('0x1b')]==0x0){delete _0x30e200['_'];}return{'id':_0x59ce6e['taskId'],'target':{'project':_0x59ce6e['projectName'],'target':_0x59ce6e[a8_0x5d04('0x5')],'configuration':_0x59ce6e[a8_0x5d04('0x6')]},'overrides':Object[a8_0x5d04('0x9')](Object[a8_0x5d04('0x9')]({},_0x30e200),{'__overrides_unparsed__':_0x2b7b62})};});process['env'][a8_0x5d04('0x1')]=a8_0x5d04('0x15');process[a8_0x5d04('0x14')][a8_0x5d04('0xe')]=_0x2643b3;process['env'][a8_0x5d04('0x12')]=a8_0x5d04('0x15');process[a8_0x5d04('0x14')][a8_0x5d04('0x1d')]=a8_0x5d04('0x15');const _0x157dd1=yield _0x236cc6['invoke']({'tasks':_0x1ab8e6,'parallel':_0x5d1954});const _0x10828a=Object['values'](_0x157dd1[a8_0x5d04('0x17')][a8_0x5d04('0x8')]);return{'completedTasks':_0x10828a[a8_0x5d04('0x7')](_0x344bc7=>({'taskId':_0x344bc7['id'],'hash':_0x344bc7[a8_0x5d04('0x13')]})),'completedStatusCode':_0x157dd1[a8_0x5d04('0xb')]};});});}exports[a8_0x5d04('0x10')]=invokeTasksUsingNxImperativeApi;
|
|
@@ -1,97 +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.invokeTasksUsingRunMany = void 0;
|
|
13
|
-
const environment_1 = require("../../../utilities/environment");
|
|
14
|
-
const child_process_1 = require("child_process");
|
|
15
|
-
const fs_1 = require("fs");
|
|
16
|
-
const { output } = require('../../../utilities/nx-imports');
|
|
17
|
-
function invokeTasksUsingRunMany(options) {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
const readCompleted = completedTasksReader(options);
|
|
20
|
-
return function invokeTasksUsingRunMany(executionId, tasksToExecute, parallel) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
let completedStatusCode = 0;
|
|
23
|
-
const completedTasks = [];
|
|
24
|
-
for (const g of groupByTarget(tasksToExecute)) {
|
|
25
|
-
const config = g.configuration
|
|
26
|
-
? `--configuration=${g.configuration}`
|
|
27
|
-
: ``;
|
|
28
|
-
const parallelStr = parallel > 1 ? ` --parallel --max-parallel=${parallel}` : ``;
|
|
29
|
-
// TODO use pnpx or yarn when needed
|
|
30
|
-
const command = `npx nx run-many --target=${g.target} ${config} --projects=${g.projects.join(',')} ${g.params}${parallelStr}`;
|
|
31
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
32
|
-
output.note({
|
|
33
|
-
title: `Executing: '${command}'`,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
try {
|
|
37
|
-
(0, child_process_1.execSync)(command, {
|
|
38
|
-
stdio: ['ignore', 'inherit', 'inherit'],
|
|
39
|
-
env: Object.assign(Object.assign({}, process.env), { NX_CACHE_FAILURES: 'true', NX_CLOUD_DISTRIBUTED_EXECUTION_ID: executionId, NX_STREAM_OUTPUT: 'true', NX_PREFIX_OUTPUT: 'true' }),
|
|
40
|
-
});
|
|
41
|
-
completedTasks.push(...readCompleted(executionId));
|
|
42
|
-
}
|
|
43
|
-
catch (e) {
|
|
44
|
-
if (e.status === environment_1.DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE) {
|
|
45
|
-
throw e;
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
completedStatusCode = 1;
|
|
49
|
-
completedTasks.push(...readCompleted(executionId));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return { completedStatusCode, completedTasks };
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
exports.invokeTasksUsingRunMany = invokeTasksUsingRunMany;
|
|
59
|
-
function groupByTarget(tasks) {
|
|
60
|
-
const res = [];
|
|
61
|
-
tasks.forEach((t) => {
|
|
62
|
-
const r = res.find((rr) => rr.target === t.target && rr.configuration === t.configuration);
|
|
63
|
-
if (r) {
|
|
64
|
-
r.projects.push(t.projectName);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
res.push({
|
|
68
|
-
target: t.target,
|
|
69
|
-
projects: [t.projectName],
|
|
70
|
-
params: t.params,
|
|
71
|
-
configuration: t.configuration,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
return res;
|
|
76
|
-
}
|
|
77
|
-
function completedTasksReader(options) {
|
|
78
|
-
const cacheDirectory = (0, environment_1.getNxCacheDirectory)(options);
|
|
79
|
-
return (distributedExecutionId) => {
|
|
80
|
-
const errorMessage = `Command execution failed (distributed task execution: ${distributedExecutionId}). Tasks hashes haven\'t been recorded.`;
|
|
81
|
-
let completedTasks;
|
|
82
|
-
try {
|
|
83
|
-
const taskHashesFile = `${cacheDirectory}/tasks-hashes-${distributedExecutionId}`;
|
|
84
|
-
completedTasks = JSON.parse((0, fs_1.readFileSync)(taskHashesFile).toString());
|
|
85
|
-
// remove it such that if the next command crashes we don't read an obsolete file
|
|
86
|
-
(0, fs_1.unlinkSync)(taskHashesFile);
|
|
87
|
-
}
|
|
88
|
-
catch (e) {
|
|
89
|
-
throw new Error(errorMessage);
|
|
90
|
-
}
|
|
91
|
-
if (completedTasks.length == 0) {
|
|
92
|
-
throw new Error(errorMessage);
|
|
93
|
-
}
|
|
94
|
-
return completedTasks;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=invoke-tasks-using-run-many.js.map
|
|
1
|
+
const a9_0x26a3=['target','npx\x20nx\x20run-many\x20--target=','true','projects','../../../utilities/environment','DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE','assign','length','--configuration=','/tasks-hashes-','inherit','readFileSync','parse','find','configuration','__esModule','unlinkSync','VERBOSE_LOGGING','\x20--projects=','value','toString','params','then','../../../utilities/nx-imports','Command\x20execution\x20failed\x20(distributed\x20task\x20execution:\x20','next','invokeTasksUsingRunMany','forEach','getNxCacheDirectory','ignore','projectName','defineProperty','Executing:\x20\x27','push','env','join','apply','execSync','status','child_process'];(function(_0x81c858,_0x26a3cf){const _0x1d0382=function(_0x5e5e0c){while(--_0x5e5e0c){_0x81c858['push'](_0x81c858['shift']());}};_0x1d0382(++_0x26a3cf);}(a9_0x26a3,0x86));const a9_0x1d03=function(_0x81c858,_0x26a3cf){_0x81c858=_0x81c858-0x0;let _0x1d0382=a9_0x26a3[_0x81c858];return _0x1d0382;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x1e02dd,_0x3b646b,_0x3ca009,_0x1935ac){function _0xb421ce(_0x357b93){return _0x357b93 instanceof _0x3ca009?_0x357b93:new _0x3ca009(function(_0x482524){_0x482524(_0x357b93);});}return new(_0x3ca009||(_0x3ca009=Promise))(function(_0x3819be,_0x3e0691){function _0x291468(_0x17297e){try{_0x2adaaf(_0x1935ac[a9_0x1d03('0xb')](_0x17297e));}catch(_0x5a4a9b){_0x3e0691(_0x5a4a9b);}}function _0xb42530(_0x2044d8){try{_0x2adaaf(_0x1935ac['throw'](_0x2044d8));}catch(_0x4db2c0){_0x3e0691(_0x4db2c0);}}function _0x2adaaf(_0x38439f){_0x38439f['done']?_0x3819be(_0x38439f['value']):_0xb421ce(_0x38439f[a9_0x1d03('0x5')])[a9_0x1d03('0x8')](_0x291468,_0xb42530);}_0x2adaaf((_0x1935ac=_0x1935ac[a9_0x1d03('0x16')](_0x1e02dd,_0x3b646b||[]))[a9_0x1d03('0xb')]());});};Object[a9_0x1d03('0x11')](exports,a9_0x1d03('0x1'),{'value':!![]});exports[a9_0x1d03('0xc')]=void 0x0;const environment_1=require(a9_0x1d03('0x1e'));const child_process_1=require(a9_0x1d03('0x19'));const fs_1=require('fs');const {output}=require(a9_0x1d03('0x9'));function invokeTasksUsingRunMany(_0x56d59b){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x333769=completedTasksReader(_0x56d59b);return function _0x561631(_0x387439,_0x5f1cbd,_0x50bc4e){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x33347a=0x0;const _0x5c1eeb=[];for(const _0x16d22c of groupByTarget(_0x5f1cbd)){const _0x336259=_0x16d22c[a9_0x1d03('0x0')]?a9_0x1d03('0x22')+_0x16d22c[a9_0x1d03('0x0')]:'';const _0xf69911=_0x50bc4e>0x1?'\x20--parallel\x20--max-parallel='+_0x50bc4e:'';const _0x15bcfc=a9_0x1d03('0x1b')+_0x16d22c[a9_0x1d03('0x1a')]+'\x20'+_0x336259+a9_0x1d03('0x4')+_0x16d22c[a9_0x1d03('0x1d')][a9_0x1d03('0x15')](',')+'\x20'+_0x16d22c['params']+_0xf69911;if(environment_1[a9_0x1d03('0x3')]){output['note']({'title':a9_0x1d03('0x12')+_0x15bcfc+'\x27'});}try{(0x0,child_process_1[a9_0x1d03('0x17')])(_0x15bcfc,{'stdio':[a9_0x1d03('0xf'),a9_0x1d03('0x24'),a9_0x1d03('0x24')],'env':Object[a9_0x1d03('0x20')](Object['assign']({},process[a9_0x1d03('0x14')]),{'NX_CACHE_FAILURES':a9_0x1d03('0x1c'),'NX_CLOUD_DISTRIBUTED_EXECUTION_ID':_0x387439,'NX_STREAM_OUTPUT':a9_0x1d03('0x1c'),'NX_PREFIX_OUTPUT':'true'})});_0x5c1eeb[a9_0x1d03('0x13')](..._0x333769(_0x387439));}catch(_0x246e1c){if(_0x246e1c[a9_0x1d03('0x18')]===environment_1[a9_0x1d03('0x1f')]){throw _0x246e1c;}else{_0x33347a=0x1;_0x5c1eeb['push'](..._0x333769(_0x387439));}}}return{'completedStatusCode':_0x33347a,'completedTasks':_0x5c1eeb};});};});}exports['invokeTasksUsingRunMany']=invokeTasksUsingRunMany;function groupByTarget(_0xfc8abb){const _0x1eb8be=[];_0xfc8abb[a9_0x1d03('0xd')](_0x58fb9e=>{const _0x5b790=_0x1eb8be[a9_0x1d03('0x27')](_0x42d420=>_0x42d420[a9_0x1d03('0x1a')]===_0x58fb9e[a9_0x1d03('0x1a')]&&_0x42d420[a9_0x1d03('0x0')]===_0x58fb9e[a9_0x1d03('0x0')]);if(_0x5b790){_0x5b790[a9_0x1d03('0x1d')][a9_0x1d03('0x13')](_0x58fb9e[a9_0x1d03('0x10')]);}else{_0x1eb8be['push']({'target':_0x58fb9e[a9_0x1d03('0x1a')],'projects':[_0x58fb9e['projectName']],'params':_0x58fb9e[a9_0x1d03('0x7')],'configuration':_0x58fb9e[a9_0x1d03('0x0')]});}});return _0x1eb8be;}function completedTasksReader(_0x1a6f33){const _0x3b86b7=(0x0,environment_1[a9_0x1d03('0xe')])(_0x1a6f33);return _0x420043=>{const _0x239bcd=a9_0x1d03('0xa')+_0x420043+').\x20Tasks\x20hashes\x20haven\x27t\x20been\x20recorded.';let _0x129140;try{const _0x565ea6=_0x3b86b7+a9_0x1d03('0x23')+_0x420043;_0x129140=JSON[a9_0x1d03('0x26')]((0x0,fs_1[a9_0x1d03('0x25')])(_0x565ea6)[a9_0x1d03('0x6')]());(0x0,fs_1[a9_0x1d03('0x2')])(_0x565ea6);}catch(_0x3532b5){throw new Error(_0x239bcd);}if(_0x129140[a9_0x1d03('0x21')]==0x0){throw new Error(_0x239bcd);}return _0x129140;};}
|
|
@@ -1,143 +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 axios_1 = require("../../../utilities/axios");
|
|
14
|
-
const environment_1 = require("../../../utilities/environment");
|
|
15
|
-
const metric_logger_1 = require("../../../utilities/metric-logger");
|
|
16
|
-
const serializer_overrides_1 = require("../../../utilities/serializer-overrides");
|
|
17
|
-
const { output } = require('../../../utilities/nx-imports');
|
|
18
|
-
class DistributedExecutionApi {
|
|
19
|
-
constructor(options) {
|
|
20
|
-
this.apiAxiosInstance = (0, axios_1.createApiAxiosInstance)(options);
|
|
21
|
-
}
|
|
22
|
-
start(params) {
|
|
23
|
-
var _a;
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('dteStart');
|
|
26
|
-
let resp;
|
|
27
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
28
|
-
output.note({
|
|
29
|
-
title: 'Starting a distributed execution',
|
|
30
|
-
bodyLines: [JSON.stringify(params, null, 2)],
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/start', params));
|
|
35
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
36
|
-
}
|
|
37
|
-
catch (e) {
|
|
38
|
-
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
39
|
-
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
40
|
-
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
41
|
-
throw e;
|
|
42
|
-
}
|
|
43
|
-
if (!resp.data.enabled) {
|
|
44
|
-
throw new Error(`Workspace is disabled. Cannot perform distributed task executions.`);
|
|
45
|
-
}
|
|
46
|
-
if (resp.data.error) {
|
|
47
|
-
throw new Error(resp.data.error);
|
|
48
|
-
}
|
|
49
|
-
return resp.data.id;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
status(id) {
|
|
53
|
-
var _a;
|
|
54
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('dteStatus');
|
|
56
|
-
try {
|
|
57
|
-
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/status', {
|
|
58
|
-
id,
|
|
59
|
-
}));
|
|
60
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
61
|
-
return resp.data;
|
|
62
|
-
}
|
|
63
|
-
catch (e) {
|
|
64
|
-
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
65
|
-
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
66
|
-
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
67
|
-
output.error({
|
|
68
|
-
title: e.message,
|
|
69
|
-
});
|
|
70
|
-
process.exit(1);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
completeRunGroupWithError(runGroup, error) {
|
|
75
|
-
var _a;
|
|
76
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('completeRunGroup');
|
|
78
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
79
|
-
output.note({
|
|
80
|
-
title: 'Completing run group with an error',
|
|
81
|
-
bodyLines: [`runGroup: ${runGroup}`, `error: ${error}`],
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
try {
|
|
85
|
-
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/complete-run-group', {
|
|
86
|
-
runGroup: runGroup,
|
|
87
|
-
criticalErrorMessage: error,
|
|
88
|
-
}), 3);
|
|
89
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
90
|
-
}
|
|
91
|
-
catch (e) {
|
|
92
|
-
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
93
|
-
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
94
|
-
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
exports.DistributedExecutionApi = DistributedExecutionApi;
|
|
100
|
-
function createStartRequest(runGroup, task, options) {
|
|
101
|
-
const tasksToExecute = task.map((arr) => {
|
|
102
|
-
return arr.map((t) => {
|
|
103
|
-
return {
|
|
104
|
-
taskId: t.id,
|
|
105
|
-
hash: t.hash,
|
|
106
|
-
projectName: t.target.project,
|
|
107
|
-
target: t.target.target,
|
|
108
|
-
configuration: t.target.configuration || null,
|
|
109
|
-
params: (0, serializer_overrides_1.serializeOverrides)(t),
|
|
110
|
-
};
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
const request = {
|
|
114
|
-
command: (0, environment_1.parseCommand)(),
|
|
115
|
-
branch: (0, environment_1.getBranch)(),
|
|
116
|
-
runGroup,
|
|
117
|
-
tasks: tasksToExecute,
|
|
118
|
-
maxParallel: calculateMaxParallel(options),
|
|
119
|
-
};
|
|
120
|
-
if (environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT) {
|
|
121
|
-
request.agentCount = environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT;
|
|
122
|
-
}
|
|
123
|
-
if (!environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE) {
|
|
124
|
-
request.stopAgentsOnFailure = false;
|
|
125
|
-
}
|
|
126
|
-
return request;
|
|
127
|
-
}
|
|
128
|
-
exports.createStartRequest = createStartRequest;
|
|
129
|
-
function calculateMaxParallel(options) {
|
|
130
|
-
if (options.parallel === 'false' || options.parallel === false) {
|
|
131
|
-
return 1;
|
|
132
|
-
}
|
|
133
|
-
else if (options.parallel === 'true' || options.parallel === true) {
|
|
134
|
-
return Number(options.maxParallel || 3);
|
|
135
|
-
}
|
|
136
|
-
else if (options.parallel === undefined) {
|
|
137
|
-
return options.maxParallel ? Number(options.maxParallel) : 3;
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
return Number(options.parallel) || 3;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
//# sourceMappingURL=distributed-execution.api.js.map
|
|
1
|
+
const a10_0xd991=['true','target','VERBOSE_LOGGING','post','NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE','getBranch','../../../utilities/environment','exit','apply','/nx-cloud/executions/complete-run-group','../../../utilities/metric-logger','then','createMetricRecorder','note','enabled','../../../utilities/serializer-overrides','throw','axiosException','createApiAxiosInstance','maxParallel','stopAgentsOnFailure','dteStart','createStartRequest','start','serializeOverrides','DistributedExecutionApi','/nx-cloud/executions/status','parallel','done','mapRespToPerfEntry','next','../../../utilities/axios','response','axiosMultipleTries','Workspace\x20is\x20disabled.\x20Cannot\x20perform\x20distributed\x20task\x20executions.','parseCommand','error:\x20','RUNNER_FAILURE_PERF_ENTRY','dteStatus','completeRunGroup','__esModule','message','false','recordMetric','map','__awaiter','status','data','project','runGroup:\x20','error','Starting\x20a\x20distributed\x20execution','../../../utilities/nx-imports','NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT','completeRunGroupWithError','stringify','hash','apiAxiosInstance','agentCount'];(function(_0x34aad0,_0xd9913d){const _0x4286d9=function(_0xa8fbb7){while(--_0xa8fbb7){_0x34aad0['push'](_0x34aad0['shift']());}};_0x4286d9(++_0xd9913d);}(a10_0xd991,0x141));const a10_0x4286=function(_0x34aad0,_0xd9913d){_0x34aad0=_0x34aad0-0x0;let _0x4286d9=a10_0xd991[_0x34aad0];return _0x4286d9;};'use strict';var __awaiter=this&&this[a10_0x4286('0x13')]||function(_0x3dd607,_0x188a87,_0x493a80,_0x1e0dce){function _0x3a90a9(_0x9c85bb){return _0x9c85bb instanceof _0x493a80?_0x9c85bb:new _0x493a80(function(_0x16e2fc){_0x16e2fc(_0x9c85bb);});}return new(_0x493a80||(_0x493a80=Promise))(function(_0x2a3f87,_0x2cac27){function _0x21a48a(_0x3401a6){try{_0x18ad7f(_0x1e0dce[a10_0x4286('0x4')](_0x3401a6));}catch(_0xd5e103){_0x2cac27(_0xd5e103);}}function _0x8e1b73(_0xa7fa){try{_0x18ad7f(_0x1e0dce[a10_0x4286('0x31')](_0xa7fa));}catch(_0xf6f2e1){_0x2cac27(_0xf6f2e1);}}function _0x18ad7f(_0x284114){_0x284114[a10_0x4286('0x2')]?_0x2a3f87(_0x284114['value']):_0x3a90a9(_0x284114['value'])[a10_0x4286('0x2c')](_0x21a48a,_0x8e1b73);}_0x18ad7f((_0x1e0dce=_0x1e0dce[a10_0x4286('0x29')](_0x3dd607,_0x188a87||[]))[a10_0x4286('0x4')]());});};Object['defineProperty'](exports,a10_0x4286('0xe'),{'value':!![]});exports['createStartRequest']=exports['DistributedExecutionApi']=void 0x0;const axios_1=require(a10_0x4286('0x5'));const environment_1=require(a10_0x4286('0x27'));const metric_logger_1=require(a10_0x4286('0x2b'));const serializer_overrides_1=require(a10_0x4286('0x30'));const {output}=require(a10_0x4286('0x1a'));class DistributedExecutionApi{constructor(_0x3779c2){this[a10_0x4286('0x1f')]=(0x0,axios_1[a10_0x4286('0x33')])(_0x3779c2);}[a10_0x4286('0x38')](_0x45d32a){var _0x444195;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3126c3=(0x0,metric_logger_1['createMetricRecorder'])(a10_0x4286('0x36'));let _0x3fb903;if(environment_1[a10_0x4286('0x23')]){output[a10_0x4286('0x2e')]({'title':a10_0x4286('0x19'),'bodyLines':[JSON[a10_0x4286('0x1d')](_0x45d32a,null,0x2)]});}try{_0x3fb903=yield(0x0,axios_1[a10_0x4286('0x7')])(()=>this['apiAxiosInstance'][a10_0x4286('0x24')]('/nx-cloud/executions/start',_0x45d32a));_0x3126c3[a10_0x4286('0x11')]((0x0,metric_logger_1[a10_0x4286('0x3')])(_0x3fb903));}catch(_0x59de05){_0x3126c3[a10_0x4286('0x11')](((_0x444195=_0x59de05===null||_0x59de05===void 0x0?void 0x0:_0x59de05[a10_0x4286('0x32')])===null||_0x444195===void 0x0?void 0x0:_0x444195['response'])?(0x0,metric_logger_1['mapRespToPerfEntry'])(_0x59de05[a10_0x4286('0x32')]['response']):metric_logger_1[a10_0x4286('0xb')]);throw _0x59de05;}if(!_0x3fb903[a10_0x4286('0x15')][a10_0x4286('0x2f')]){throw new Error(a10_0x4286('0x8'));}if(_0x3fb903[a10_0x4286('0x15')][a10_0x4286('0x18')]){throw new Error(_0x3fb903[a10_0x4286('0x15')][a10_0x4286('0x18')]);}return _0x3fb903[a10_0x4286('0x15')]['id'];});}[a10_0x4286('0x14')](_0xbc95c2){var _0x2ed0fd;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x430863=(0x0,metric_logger_1['createMetricRecorder'])(a10_0x4286('0xc'));try{const _0x1c9da6=yield(0x0,axios_1[a10_0x4286('0x7')])(()=>this[a10_0x4286('0x1f')][a10_0x4286('0x24')](a10_0x4286('0x0'),{'id':_0xbc95c2}));_0x430863['recordMetric']((0x0,metric_logger_1[a10_0x4286('0x3')])(_0x1c9da6));return _0x1c9da6[a10_0x4286('0x15')];}catch(_0x5d0969){_0x430863['recordMetric'](((_0x2ed0fd=_0x5d0969===null||_0x5d0969===void 0x0?void 0x0:_0x5d0969[a10_0x4286('0x32')])===null||_0x2ed0fd===void 0x0?void 0x0:_0x2ed0fd['response'])?(0x0,metric_logger_1[a10_0x4286('0x3')])(_0x5d0969[a10_0x4286('0x32')]['response']):metric_logger_1[a10_0x4286('0xb')]);output[a10_0x4286('0x18')]({'title':_0x5d0969[a10_0x4286('0xf')]});process[a10_0x4286('0x28')](0x1);}});}[a10_0x4286('0x1c')](_0x3f9668,_0x39e4f7){var _0x46cf8e;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x238f38=(0x0,metric_logger_1[a10_0x4286('0x2d')])(a10_0x4286('0xd'));if(environment_1[a10_0x4286('0x23')]){output['note']({'title':'Completing\x20run\x20group\x20with\x20an\x20error','bodyLines':[a10_0x4286('0x17')+_0x3f9668,a10_0x4286('0xa')+_0x39e4f7]});}try{const _0x32d47f=yield(0x0,axios_1[a10_0x4286('0x7')])(()=>this['apiAxiosInstance'][a10_0x4286('0x24')](a10_0x4286('0x2a'),{'runGroup':_0x3f9668,'criticalErrorMessage':_0x39e4f7}),0x3);_0x238f38[a10_0x4286('0x11')]((0x0,metric_logger_1[a10_0x4286('0x3')])(_0x32d47f));}catch(_0x144f06){_0x238f38[a10_0x4286('0x11')](((_0x46cf8e=_0x144f06===null||_0x144f06===void 0x0?void 0x0:_0x144f06[a10_0x4286('0x32')])===null||_0x46cf8e===void 0x0?void 0x0:_0x46cf8e[a10_0x4286('0x6')])?(0x0,metric_logger_1[a10_0x4286('0x3')])(_0x144f06[a10_0x4286('0x32')][a10_0x4286('0x6')]):metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);}});}}exports[a10_0x4286('0x3a')]=DistributedExecutionApi;function createStartRequest(_0x47d458,_0x1f910b,_0x34ede9){const _0x410d6e=_0x1f910b[a10_0x4286('0x12')](_0x1a60a2=>{return _0x1a60a2[a10_0x4286('0x12')](_0x18f5fe=>{return{'taskId':_0x18f5fe['id'],'hash':_0x18f5fe[a10_0x4286('0x1e')],'projectName':_0x18f5fe[a10_0x4286('0x22')][a10_0x4286('0x16')],'target':_0x18f5fe[a10_0x4286('0x22')][a10_0x4286('0x22')],'configuration':_0x18f5fe[a10_0x4286('0x22')]['configuration']||null,'params':(0x0,serializer_overrides_1[a10_0x4286('0x39')])(_0x18f5fe)};});});const _0x5f112b={'command':(0x0,environment_1[a10_0x4286('0x9')])(),'branch':(0x0,environment_1[a10_0x4286('0x26')])(),'runGroup':_0x47d458,'tasks':_0x410d6e,'maxParallel':calculateMaxParallel(_0x34ede9)};if(environment_1[a10_0x4286('0x1b')]){_0x5f112b[a10_0x4286('0x20')]=environment_1[a10_0x4286('0x1b')];}if(!environment_1[a10_0x4286('0x25')]){_0x5f112b[a10_0x4286('0x35')]=![];}return _0x5f112b;}exports[a10_0x4286('0x37')]=createStartRequest;function calculateMaxParallel(_0x4e3719){if(_0x4e3719['parallel']===a10_0x4286('0x10')||_0x4e3719[a10_0x4286('0x1')]===![]){return 0x1;}else if(_0x4e3719['parallel']===a10_0x4286('0x21')||_0x4e3719[a10_0x4286('0x1')]===!![]){return Number(_0x4e3719['maxParallel']||0x3);}else if(_0x4e3719[a10_0x4286('0x1')]===undefined){return _0x4e3719['maxParallel']?Number(_0x4e3719[a10_0x4286('0x34')]):0x3;}else{return Number(_0x4e3719[a10_0x4286('0x1')])||0x3;}}
|
|
@@ -1,115 +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.nxCloudDistributedTasksRunner = void 0;
|
|
13
|
-
const environment_1 = require("../../../utilities/environment");
|
|
14
|
-
const metric_logger_1 = require("../../../utilities/metric-logger");
|
|
15
|
-
const error_reporter_api_1 = require("../../api/error-reporter.api");
|
|
16
|
-
const print_run_group_error_1 = require("../../error/print-run-group-error");
|
|
17
|
-
const e2e_encryption_1 = require("../../file-storage/e2e-encryption");
|
|
18
|
-
const file_storage_1 = require("../../file-storage/file-storage");
|
|
19
|
-
const distributed_execution_api_1 = require("./distributed-execution.api");
|
|
20
|
-
const split_task_graph_into_stages_1 = require("./split-task-graph-into-stages");
|
|
21
|
-
const task_graph_creator_1 = require("./task-graph-creator");
|
|
22
|
-
const process_tasks_1 = require("./process-tasks");
|
|
23
|
-
const dte_artifact_storage_1 = require("../../../utilities/dte-artifact-storage");
|
|
24
|
-
const { output } = require('../../../utilities/nx-imports');
|
|
25
|
-
class NoopLifeCycle {
|
|
26
|
-
scheduleTask(task) { }
|
|
27
|
-
startTask(task) { }
|
|
28
|
-
endTasks(tasks) { }
|
|
29
|
-
}
|
|
30
|
-
const nxCloudDistributedTasksRunner = (tasks, options, context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
-
if (options.skipNxCache) {
|
|
32
|
-
output.warn({
|
|
33
|
-
title: `--skip-nx-cache is ignored when using distributed tasks execution (DTE).`,
|
|
34
|
-
bodyLine: [`DTE needs the cache to share files between agents.`],
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
38
|
-
output.note({
|
|
39
|
-
title: 'Starting distributed command execution',
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
options.lifeCycle = new NoopLifeCycle();
|
|
43
|
-
const runGroup = (0, environment_1.getRunGroup)();
|
|
44
|
-
if (!runGroup) {
|
|
45
|
-
(0, print_run_group_error_1.printRunGroupError)();
|
|
46
|
-
return process.exit(1);
|
|
47
|
-
}
|
|
48
|
-
const encryption = new e2e_encryption_1.E2EEncryption(environment_1.ENCRYPTION_KEY || options.encryptionKey);
|
|
49
|
-
const errorReporter = new error_reporter_api_1.ErrorReporterApi(options);
|
|
50
|
-
const dteArtifactStorage = new dte_artifact_storage_1.DteArtifactStorage(new file_storage_1.FileStorage(encryption, errorReporter), (0, environment_1.getNxCacheDirectory)(options));
|
|
51
|
-
const api = new distributed_execution_api_1.DistributedExecutionApi(options);
|
|
52
|
-
attachSignalListenersToCompleteRunGroupOnError(api, runGroup);
|
|
53
|
-
try {
|
|
54
|
-
const taskGraph = getTaskGraph(context, tasks, options);
|
|
55
|
-
const r = yield runDistributedExecution(api, options, dteArtifactStorage, runGroup, taskGraph);
|
|
56
|
-
if (r.commandStatus === 0) {
|
|
57
|
-
output.success({
|
|
58
|
-
title: 'Successfully completed running the command.',
|
|
59
|
-
bodyLines: [`See run details at ${r.runUrl}`],
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
output.error({
|
|
64
|
-
title: 'Command execution failed.',
|
|
65
|
-
bodyLines: [`See run details at ${r.runUrl}`],
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
yield (0, metric_logger_1.submitRunMetrics)(options);
|
|
69
|
-
process.exit(r.commandStatus);
|
|
70
|
-
}
|
|
71
|
-
catch (e) {
|
|
72
|
-
output.error({
|
|
73
|
-
title: 'Unable to complete a run.',
|
|
74
|
-
bodyLines: [e.message],
|
|
75
|
-
});
|
|
76
|
-
if (e.axiosException) {
|
|
77
|
-
console.log(e.axiosException);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
console.log(e);
|
|
81
|
-
}
|
|
82
|
-
try {
|
|
83
|
-
yield api.completeRunGroupWithError(runGroup, `Main job terminated with an error: "${e.message}"`);
|
|
84
|
-
}
|
|
85
|
-
finally {
|
|
86
|
-
process.exit(1);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
exports.nxCloudDistributedTasksRunner = nxCloudDistributedTasksRunner;
|
|
91
|
-
function getTaskGraph(context, tasks, options) {
|
|
92
|
-
if (context.taskGraph) {
|
|
93
|
-
return context.taskGraph;
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
return (0, task_graph_creator_1.createTaskGraphCompat)(options, context.projectGraph, tasks);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function attachSignalListenersToCompleteRunGroupOnError(api, runGroup) {
|
|
100
|
-
process.on('SIGINT', () => __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
yield api.completeRunGroupWithError(runGroup, 'Main job was terminated via SIGINT');
|
|
102
|
-
process.exit(1);
|
|
103
|
-
}));
|
|
104
|
-
process.on('SIGTERM', () => __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
yield api.completeRunGroupWithError(runGroup, 'Main job was terminated via SIGTERM');
|
|
106
|
-
process.exit(1);
|
|
107
|
-
}));
|
|
108
|
-
}
|
|
109
|
-
function runDistributedExecution(api, options, dteArtifactStorage, runGroup, taskGraph) {
|
|
110
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
-
const id = yield api.start((0, distributed_execution_api_1.createStartRequest)(runGroup, (0, split_task_graph_into_stages_1.splitTasksIntoStages)(taskGraph), options));
|
|
112
|
-
return yield (0, process_tasks_1.processTasks)(api, dteArtifactStorage, id, Object.values(taskGraph.tasks));
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
//# sourceMappingURL=distributed-execution.runner.js.map
|
|
1
|
+
const a11_0x4183=['Starting\x20distributed\x20command\x20execution','next','createStartRequest','getNxCacheDirectory','../../error/print-run-group-error','DistributedExecutionApi','Command\x20execution\x20failed.','getRunGroup','scheduleTask','./distributed-execution.api','apply','value','start','../../api/error-reporter.api','endTasks','../../file-storage/file-storage','../../../utilities/nx-imports','then','note','startTask','runUrl','DTE\x20needs\x20the\x20cache\x20to\x20share\x20files\x20between\x20agents.','defineProperty','message','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','DteArtifactStorage','VERBOSE_LOGGING','submitRunMetrics','../../../utilities/metric-logger','axiosException','./process-tasks','nxCloudDistributedTasksRunner','../../../utilities/dte-artifact-storage','exit','__esModule','lifeCycle','Unable\x20to\x20complete\x20a\x20run.','Main\x20job\x20was\x20terminated\x20via\x20SIGTERM','done','See\x20run\x20details\x20at\x20','encryptionKey','tasks','processTasks','completeRunGroupWithError','ErrorReporterApi','values','taskGraph','commandStatus','E2EEncryption','printRunGroupError','__awaiter','success','createTaskGraphCompat','error','../../file-storage/e2e-encryption','splitTasksIntoStages','Main\x20job\x20was\x20terminated\x20via\x20SIGINT'];(function(_0x484e03,_0x4183ab){const _0x31a863=function(_0x2a15a3){while(--_0x2a15a3){_0x484e03['push'](_0x484e03['shift']());}};_0x31a863(++_0x4183ab);}(a11_0x4183,0x76));const a11_0x31a8=function(_0x484e03,_0x4183ab){_0x484e03=_0x484e03-0x0;let _0x31a863=a11_0x4183[_0x484e03];return _0x31a863;};'use strict';var __awaiter=this&&this[a11_0x31a8('0x2e')]||function(_0x57e1b0,_0x271a94,_0x1ffc3e,_0x9c8515){function _0x45b21e(_0x19729b){return _0x19729b instanceof _0x1ffc3e?_0x19729b:new _0x1ffc3e(function(_0x4ebdd8){_0x4ebdd8(_0x19729b);});}return new(_0x1ffc3e||(_0x1ffc3e=Promise))(function(_0x544d1e,_0x2b9d58){function _0x436b05(_0x4449ec){try{_0x21642f(_0x9c8515['next'](_0x4449ec));}catch(_0xcfbedd){_0x2b9d58(_0xcfbedd);}}function _0x59f709(_0x5cb96d){try{_0x21642f(_0x9c8515['throw'](_0x5cb96d));}catch(_0x3ff88e){_0x2b9d58(_0x3ff88e);}}function _0x21642f(_0x42aacb){_0x42aacb[a11_0x31a8('0x22')]?_0x544d1e(_0x42aacb[a11_0x31a8('0x7')]):_0x45b21e(_0x42aacb[a11_0x31a8('0x7')])[a11_0x31a8('0xd')](_0x436b05,_0x59f709);}_0x21642f((_0x9c8515=_0x9c8515[a11_0x31a8('0x6')](_0x57e1b0,_0x271a94||[]))[a11_0x31a8('0x36')]());});};Object[a11_0x31a8('0x12')](exports,a11_0x31a8('0x1e'),{'value':!![]});exports[a11_0x31a8('0x1b')]=void 0x0;const environment_1=require('../../../utilities/environment');const metric_logger_1=require(a11_0x31a8('0x18'));const error_reporter_api_1=require(a11_0x31a8('0x9'));const print_run_group_error_1=require(a11_0x31a8('0x0'));const e2e_encryption_1=require(a11_0x31a8('0x32'));const file_storage_1=require(a11_0x31a8('0xb'));const distributed_execution_api_1=require(a11_0x31a8('0x5'));const split_task_graph_into_stages_1=require('./split-task-graph-into-stages');const task_graph_creator_1=require('./task-graph-creator');const process_tasks_1=require(a11_0x31a8('0x1a'));const dte_artifact_storage_1=require(a11_0x31a8('0x1c'));const {output}=require(a11_0x31a8('0xc'));class NoopLifeCycle{[a11_0x31a8('0x4')](_0x2ccdde){}[a11_0x31a8('0xf')](_0x20f551){}[a11_0x31a8('0xa')](_0xd520f3){}}const nxCloudDistributedTasksRunner=(_0x5ec865,_0xd72763,_0x598c96)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(_0xd72763['skipNxCache']){output['warn']({'title':'--skip-nx-cache\x20is\x20ignored\x20when\x20using\x20distributed\x20tasks\x20execution\x20(DTE).','bodyLine':[a11_0x31a8('0x11')]});}if(environment_1[a11_0x31a8('0x16')]){output[a11_0x31a8('0xe')]({'title':a11_0x31a8('0x35')});}_0xd72763[a11_0x31a8('0x1f')]=new NoopLifeCycle();const _0x3d9605=(0x0,environment_1[a11_0x31a8('0x3')])();if(!_0x3d9605){(0x0,print_run_group_error_1[a11_0x31a8('0x2d')])();return process[a11_0x31a8('0x1d')](0x1);}const _0x235404=new e2e_encryption_1[(a11_0x31a8('0x2c'))](environment_1['ENCRYPTION_KEY']||_0xd72763[a11_0x31a8('0x24')]);const _0x1a3957=new error_reporter_api_1[(a11_0x31a8('0x28'))](_0xd72763);const _0x89f01c=new dte_artifact_storage_1[(a11_0x31a8('0x15'))](new file_storage_1['FileStorage'](_0x235404,_0x1a3957),(0x0,environment_1[a11_0x31a8('0x38')])(_0xd72763));const _0x587c2c=new distributed_execution_api_1[(a11_0x31a8('0x1'))](_0xd72763);attachSignalListenersToCompleteRunGroupOnError(_0x587c2c,_0x3d9605);try{const _0x550918=getTaskGraph(_0x598c96,_0x5ec865,_0xd72763);const _0x467217=yield runDistributedExecution(_0x587c2c,_0xd72763,_0x89f01c,_0x3d9605,_0x550918);if(_0x467217[a11_0x31a8('0x2b')]===0x0){output[a11_0x31a8('0x2f')]({'title':'Successfully\x20completed\x20running\x20the\x20command.','bodyLines':[a11_0x31a8('0x23')+_0x467217['runUrl']]});}else{output[a11_0x31a8('0x31')]({'title':a11_0x31a8('0x2'),'bodyLines':[a11_0x31a8('0x23')+_0x467217[a11_0x31a8('0x10')]]});}yield(0x0,metric_logger_1[a11_0x31a8('0x17')])(_0xd72763);process['exit'](_0x467217[a11_0x31a8('0x2b')]);}catch(_0x1db09e){output[a11_0x31a8('0x31')]({'title':a11_0x31a8('0x20'),'bodyLines':[_0x1db09e[a11_0x31a8('0x13')]]});if(_0x1db09e[a11_0x31a8('0x19')]){console['log'](_0x1db09e['axiosException']);}else{console['log'](_0x1db09e);}try{yield _0x587c2c['completeRunGroupWithError'](_0x3d9605,a11_0x31a8('0x14')+_0x1db09e[a11_0x31a8('0x13')]+'\x22');}finally{process[a11_0x31a8('0x1d')](0x1);}}});exports['nxCloudDistributedTasksRunner']=nxCloudDistributedTasksRunner;function getTaskGraph(_0xb4c7c4,_0x4430aa,_0x4a40d0){if(_0xb4c7c4[a11_0x31a8('0x2a')]){return _0xb4c7c4[a11_0x31a8('0x2a')];}else{return(0x0,task_graph_creator_1[a11_0x31a8('0x30')])(_0x4a40d0,_0xb4c7c4['projectGraph'],_0x4430aa);}}function attachSignalListenersToCompleteRunGroupOnError(_0x2b50c5,_0x1aa82a){process['on']('SIGINT',()=>__awaiter(this,void 0x0,void 0x0,function*(){yield _0x2b50c5[a11_0x31a8('0x27')](_0x1aa82a,a11_0x31a8('0x34'));process[a11_0x31a8('0x1d')](0x1);}));process['on']('SIGTERM',()=>__awaiter(this,void 0x0,void 0x0,function*(){yield _0x2b50c5[a11_0x31a8('0x27')](_0x1aa82a,a11_0x31a8('0x21'));process[a11_0x31a8('0x1d')](0x1);}));}function runDistributedExecution(_0x532b36,_0x412f3d,_0x5d84c7,_0x4c7e83,_0x23af28){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x22930a=yield _0x532b36[a11_0x31a8('0x8')]((0x0,distributed_execution_api_1[a11_0x31a8('0x37')])(_0x4c7e83,(0x0,split_task_graph_into_stages_1[a11_0x31a8('0x33')])(_0x23af28),_0x412f3d));return yield(0x0,process_tasks_1[a11_0x31a8('0x26')])(_0x532b36,_0x5d84c7,_0x22930a,Object[a11_0x31a8('0x29')](_0x23af28[a11_0x31a8('0x25')]));});}
|