@nrwl/nx-cloud 14.1.3 → 14.2.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core/api/error-reporter.api.js +36 -1
- package/lib/core/api/run-group.api.js +65 -1
- package/lib/core/commands/record-output.js +18 -12
- package/lib/core/commands/record-output.js.map +1 -1
- package/lib/core/file-storage/file-storage.d.ts +1 -0
- package/lib/core/file-storage/file-storage.js +51 -6
- package/lib/core/file-storage/file-storage.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +138 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +169 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +113 -1
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +166 -1
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +79 -1
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js +243 -1
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js.map +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +131 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +206 -1
- package/lib/core/runners/distributed-execution/split-task-graph-into-stages.js +37 -1
- package/lib/core/runners/distributed-execution/task-graph-creator.js +77 -1
- package/lib/utilities/create-no-new-messages-timeout.js +1 -1
- package/lib/utilities/create-no-new-messages-timeout.js.map +1 -1
- package/lib/utilities/environment.d.ts +1 -1
- package/lib/utilities/environment.js +5 -3
- package/lib/utilities/environment.js.map +1 -1
- package/package.json +1 -1
- package/project.json +36 -0
|
@@ -1 +1,206 @@
|
|
|
1
|
-
const a7_0x375d=['url','../../../utilities/metric-logger','defineProperty','terminalOutput','executionId:\x20','target','../../../utilities/create-no-new-messages-timeout','./split-task-graph-into-stages','projectGraph','Processing\x20task\x20','find','splitTasksIntoStages','Error:','commandStatus','write','logCommand','scheduleTask','Distributed\x20Execution\x20Terminated','nodes','executionStatus','Retrieving\x20artifacts\x20from\x20','run','serializeOverrides','hash','../../api/error-reporter.api','encryptionKey','./distributed-execution.api','start','wait','Command\x20execution\x20failed.','next','completeRunGroupWithError','note','taskId','retrieve','cacheDirectory','error:\x20','push','stdout','success','throw','targetDependencies','assign','Extracting\x20artifacts','../../../utilities/nx-imports','DistributedExecutionApi','__awaiter','then','../../../utilities/environment','createTaskGraph','VERBOSE_LOGGING','../../error/print-run-group-error','ErrorReporterApi','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','../../../utilities/waiter','strictlyOrderedTargets','endTask','printRunGroupError','createStartRequest','runUrl','parse','apply','../../../utilities/serializer-overrides','nxCloudDistributedTasksRunner','status','addVerticalSeparator','done','project','submitRunMetrics','taskGraph','lifeCycle','get','value','length','Waiter','log','Starting\x20distributed\x20command\x20execution','../../file-storage/file-storage','tasks','axiosException','exit','getRunGroup','FileStorage','Unable\x20to\x20complete\x20a\x20run.','values','message','error','criticalErrorMessage','/nx.json','See\x20run\x20details\x20at\x20','completedTasks','./task-graph-creator'];(function(_0x1ecb14,_0x375ddc){const _0x43d3f=function(_0x339209){while(--_0x339209){_0x1ecb14['push'](_0x1ecb14['shift']());}};_0x43d3f(++_0x375ddc);}(a7_0x375d,0xe5));const a7_0x43d3=function(_0x1ecb14,_0x375ddc){_0x1ecb14=_0x1ecb14-0x0;let _0x43d3f=a7_0x375d[_0x1ecb14];return _0x43d3f;};'use strict';var __awaiter=this&&this[a7_0x43d3('0x1')]||function(_0xd67633,_0x47f7f1,_0x130e7f,_0x2841a7){function _0x341ba2(_0x369102){return _0x369102 instanceof _0x130e7f?_0x369102:new _0x130e7f(function(_0x5b44f0){_0x5b44f0(_0x369102);});}return new(_0x130e7f||(_0x130e7f=Promise))(function(_0x293ae7,_0x5f558a){function _0x4a8d9b(_0x37c331){try{_0x2388a1(_0x2841a7[a7_0x43d3('0x4d')](_0x37c331));}catch(_0x9b03e2){_0x5f558a(_0x9b03e2);}}function _0x3bd8de(_0x33adaf){try{_0x2388a1(_0x2841a7[a7_0x43d3('0x57')](_0x33adaf));}catch(_0x32de5b){_0x5f558a(_0x32de5b);}}function _0x2388a1(_0x48fd62){_0x48fd62[a7_0x43d3('0x15')]?_0x293ae7(_0x48fd62[a7_0x43d3('0x1b')]):_0x341ba2(_0x48fd62['value'])[a7_0x43d3('0x2')](_0x4a8d9b,_0x3bd8de);}_0x2388a1((_0x2841a7=_0x2841a7[a7_0x43d3('0x10')](_0xd67633,_0x47f7f1||[]))[a7_0x43d3('0x4d')]());});};Object[a7_0x43d3('0x31')](exports,'__esModule',{'value':!![]});exports[a7_0x43d3('0x12')]=void 0x0;const stripJsonComments=require('strip-json-comments');const fs_1=require('fs');const distributed_execution_api_1=require(a7_0x43d3('0x49'));const file_storage_1=require(a7_0x43d3('0x20'));const e2e_encryption_1=require('../../file-storage/e2e-encryption');const waiter_1=require(a7_0x43d3('0x9'));const environment_1=require(a7_0x43d3('0x3'));const print_run_group_error_1=require(a7_0x43d3('0x6'));const create_no_new_messages_timeout_1=require(a7_0x43d3('0x35'));const metric_logger_1=require(a7_0x43d3('0x30'));const error_reporter_api_1=require(a7_0x43d3('0x47'));const serializer_overrides_1=require(a7_0x43d3('0x11'));const task_graph_creator_1=require(a7_0x43d3('0x2e'));const split_task_graph_into_stages_1=require(a7_0x43d3('0x36'));const {output,workspaceRoot,getOutputs,Cache}=require(a7_0x43d3('0x5b'));class NoopLifeCycle{[a7_0x43d3('0x3f')](_0x2cea6b){}['startTask'](_0x1a5f32){}[a7_0x43d3('0xb')](_0xbb22ae,_0x5e8138){}}function runDistributedExecution(_0x4db44e,_0x44c72e,_0x3041d9,_0x32db1a,_0x78b4ff,_0x316e4f,_0x4adef6){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x32f782=yield _0x4db44e[a7_0x43d3('0x4a')]((0x0,distributed_execution_api_1[a7_0x43d3('0xd')])(_0x316e4f,(0x0,split_task_graph_into_stages_1[a7_0x43d3('0x3a')])(_0x4adef6),_0x44c72e));return yield processTasks(_0x4db44e,_0x32db1a,_0x78b4ff,_0x44c72e,_0x32f782,Object[a7_0x43d3('0x27')](_0x4adef6[a7_0x43d3('0x21')]),_0x3041d9);});}function processTasks(_0x1c7541,_0x5c6057,_0x34e15a,_0x59b2a1,_0x462fb4,_0x34447b,_0x4c8201){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3b5cfb={};const _0x5aa5ba=(0x0,create_no_new_messages_timeout_1['createNoNewMessagesTimeout'])();const _0x43d9b9=new waiter_1[(a7_0x43d3('0x1d'))]();while(!![]){if(environment_1[a7_0x43d3('0x5')]){output[a7_0x43d3('0x4f')]({'title':'Waiting...'});}yield _0x43d9b9[a7_0x43d3('0x4b')]();const _0x5b9c2b=yield _0x1c7541[a7_0x43d3('0x13')](_0x462fb4);if(environment_1['VERBOSE_LOGGING']){output[a7_0x43d3('0x4f')]({'title':'Status\x20update','bodyLines':[a7_0x43d3('0x33')+_0x462fb4,'executionStatus:\x20'+_0x5b9c2b['executionStatus'],'number\x20of\x20completed\x20tasks:\x20'+_0x5b9c2b[a7_0x43d3('0x2d')]['length'],a7_0x43d3('0x53')+_0x5b9c2b['criticalErrorMessage']]});}if(_0x5b9c2b[a7_0x43d3('0x2a')]){output[a7_0x43d3('0x29')]({'title':a7_0x43d3('0x40'),'bodyLines':[a7_0x43d3('0x3b'),_0x5b9c2b['criticalErrorMessage']]});process[a7_0x43d3('0x23')](0x1);}_0x5aa5ba(_0x5b9c2b['completedTasks'][a7_0x43d3('0x1c')]);for(const _0x5e5aa9 of _0x5b9c2b[a7_0x43d3('0x2d')]){if(_0x3b5cfb[_0x5e5aa9[a7_0x43d3('0x50')]])continue;yield processTask(_0x5c6057,_0x34e15a,_0x4c8201,_0x59b2a1,_0x34447b,_0x5e5aa9);_0x43d9b9['reset']();_0x3b5cfb[_0x5e5aa9[a7_0x43d3('0x50')]]=!![];}if(_0x5b9c2b[a7_0x43d3('0x42')]==='COMPLETED'){return{'commandStatus':_0x5b9c2b[a7_0x43d3('0x3c')],'runUrl':_0x5b9c2b[a7_0x43d3('0xe')]};}}});}function processTask(_0x323cb3,_0x2cf516,_0xdfe5e6,_0x24fc8a,_0x28318d,_0x382690){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1[a7_0x43d3('0x5')]){output[a7_0x43d3('0x4f')]({'title':a7_0x43d3('0x38')+_0x382690[a7_0x43d3('0x50')]});}const _0x2becdf=_0x28318d[a7_0x43d3('0x39')](_0x51a7db=>_0x382690['taskId']===_0x51a7db['id']);if(!_0x2becdf){throw new Error('Found\x20unknown\x20task:\x20'+_0x382690[a7_0x43d3('0x50')]);}if(environment_1[a7_0x43d3('0x5')]){output['note']({'title':a7_0x43d3('0x43')+_0x382690['url']});}yield _0x323cb3[a7_0x43d3('0x51')](_0x382690[a7_0x43d3('0x46')],_0x382690[a7_0x43d3('0x2f')],_0x24fc8a[a7_0x43d3('0x52')]||'./node_modules/.cache/nx');const _0x5e31d6=yield _0x2cf516[a7_0x43d3('0x1a')](Object[a7_0x43d3('0x59')](Object[a7_0x43d3('0x59')]({},_0x2becdf),{'hash':_0x382690[a7_0x43d3('0x46')]}));const _0x2190ad=getOutputs(_0xdfe5e6[a7_0x43d3('0x37')][a7_0x43d3('0x41')],_0x2becdf);if(environment_1['VERBOSE_LOGGING']){output[a7_0x43d3('0x4f')]({'title':a7_0x43d3('0x5a'),'bodyLines':_0x2190ad});}yield _0x2cf516['copyFilesFromCache'](_0x382690['hash'],_0x5e31d6,_0x2190ad);output[a7_0x43d3('0x3e')](getCommand(_0x2becdf));process[a7_0x43d3('0x55')][a7_0x43d3('0x3d')](_0x5e31d6[a7_0x43d3('0x32')]);output[a7_0x43d3('0x14')]();});}function getCommand(_0x159854){const _0x34526d=_0x159854[a7_0x43d3('0x34')]['configuration']?':'+_0x159854[a7_0x43d3('0x34')]['configuration']:'';return['nx',a7_0x43d3('0x44'),_0x159854[a7_0x43d3('0x34')][a7_0x43d3('0x16')]+':'+_0x159854[a7_0x43d3('0x34')]['target']+_0x34526d,(0x0,serializer_overrides_1[a7_0x43d3('0x45')])(_0x159854)]['join']('\x20');}const nxCloudDistributedTasksRunner=(_0x29ca14,_0x84d231,_0x4229b8)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(environment_1[a7_0x43d3('0x5')]){output[a7_0x43d3('0x4f')]({'title':a7_0x43d3('0x1f')});}_0x84d231[a7_0x43d3('0x19')]=new NoopLifeCycle();const _0x5a5f80=(0x0,environment_1[a7_0x43d3('0x24')])();if(!_0x5a5f80){(0x0,print_run_group_error_1[a7_0x43d3('0xc')])();return process[a7_0x43d3('0x23')](0x1);}const _0x41c1ff=new e2e_encryption_1['E2EEncryption'](environment_1['ENCRYPTION_KEY']||_0x84d231[a7_0x43d3('0x48')]);const _0x419505=new error_reporter_api_1[(a7_0x43d3('0x7'))](_0x84d231);const _0x433fde=new file_storage_1[(a7_0x43d3('0x25'))](_0x41c1ff,_0x419505,!![]);const _0x546861=new Cache(_0x84d231);const _0x3d9ecb=new distributed_execution_api_1[(a7_0x43d3('0x0'))](_0x84d231);try{const _0x2f26cf=getTaskGraph(_0x4229b8,_0x29ca14,_0x84d231);const _0x39117d=yield runDistributedExecution(_0x3d9ecb,_0x84d231,_0x4229b8,_0x433fde,_0x546861,_0x5a5f80,_0x2f26cf);if(_0x39117d[a7_0x43d3('0x3c')]===0x0){output[a7_0x43d3('0x56')]({'title':'Successfully\x20completed\x20running\x20the\x20command.','bodyLines':[a7_0x43d3('0x2c')+_0x39117d[a7_0x43d3('0xe')]]});}else{output['error']({'title':a7_0x43d3('0x4c'),'bodyLines':[a7_0x43d3('0x2c')+_0x39117d[a7_0x43d3('0xe')]]});}yield(0x0,metric_logger_1[a7_0x43d3('0x17')])(_0x84d231);process[a7_0x43d3('0x23')](_0x39117d[a7_0x43d3('0x3c')]);}catch(_0x30628d){output[a7_0x43d3('0x29')]({'title':a7_0x43d3('0x26'),'bodyLines':[_0x30628d[a7_0x43d3('0x28')]]});if(_0x30628d[a7_0x43d3('0x22')]){console[a7_0x43d3('0x1e')](_0x30628d[a7_0x43d3('0x22')]);}else{console[a7_0x43d3('0x1e')](_0x30628d);}try{yield _0x3d9ecb[a7_0x43d3('0x4e')](_0x5a5f80,a7_0x43d3('0x8')+_0x30628d[a7_0x43d3('0x28')]+'\x22');}finally{process[a7_0x43d3('0x23')](0x1);}}});exports[a7_0x43d3('0x12')]=nxCloudDistributedTasksRunner;function getTaskGraph(_0x8eb455,_0x128698,_0x254048){if(_0x8eb455[a7_0x43d3('0x18')]){return _0x8eb455[a7_0x43d3('0x18')];}else{const _0x4d9244=JSON[a7_0x43d3('0xf')](stripJsonComments((0x0,fs_1['readFileSync'])(workspaceRoot+a7_0x43d3('0x2b'))['toString']()));return new task_graph_creator_1['TaskGraphCreator'](_0x8eb455['projectGraph'],getDefaultDependencyConfigs(_0x4d9244,_0x254048))[a7_0x43d3('0x4')](_0x128698);}}function getDefaultDependencyConfigs(_0x21e48f,_0x15e7ac){var _0x527733,_0x33b5ca;const _0x56fdd6=(_0x527733=_0x21e48f[a7_0x43d3('0x58')])!==null&&_0x527733!==void 0x0?_0x527733:{};const _0x4b24cc=_0x15e7ac?(_0x33b5ca=_0x15e7ac[a7_0x43d3('0xa')])!==null&&_0x33b5ca!==void 0x0?_0x33b5ca:['build']:[];for(const _0x5ecc82 of _0x4b24cc){_0x56fdd6[_0x5ecc82]=_0x56fdd6[_0x5ecc82]||[];_0x56fdd6[_0x5ecc82][a7_0x43d3('0x54')]({'target':_0x5ecc82,'projects':'dependencies'});}return _0x56fdd6;}
|
|
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.nxCloudDistributedTasksRunner = void 0;
|
|
13
|
+
const stripJsonComments = require("strip-json-comments");
|
|
14
|
+
const fs_1 = require("fs");
|
|
15
|
+
const distributed_execution_api_1 = require("./distributed-execution.api");
|
|
16
|
+
const file_storage_1 = require("../../file-storage/file-storage");
|
|
17
|
+
const e2e_encryption_1 = require("../../file-storage/e2e-encryption");
|
|
18
|
+
const waiter_1 = require("../../../utilities/waiter");
|
|
19
|
+
const environment_1 = require("../../../utilities/environment");
|
|
20
|
+
const print_run_group_error_1 = require("../../error/print-run-group-error");
|
|
21
|
+
const create_no_new_messages_timeout_1 = require("../../../utilities/create-no-new-messages-timeout");
|
|
22
|
+
const metric_logger_1 = require("../../../utilities/metric-logger");
|
|
23
|
+
const error_reporter_api_1 = require("../../api/error-reporter.api");
|
|
24
|
+
const serializer_overrides_1 = require("../../../utilities/serializer-overrides");
|
|
25
|
+
const task_graph_creator_1 = require("./task-graph-creator");
|
|
26
|
+
const split_task_graph_into_stages_1 = require("./split-task-graph-into-stages");
|
|
27
|
+
const { output, workspaceRoot, getOutputs, Cache, } = require('../../../utilities/nx-imports');
|
|
28
|
+
class NoopLifeCycle {
|
|
29
|
+
scheduleTask(task) { }
|
|
30
|
+
startTask(task) { }
|
|
31
|
+
endTask(task, code) { }
|
|
32
|
+
}
|
|
33
|
+
function runDistributedExecution(api, options, context, fileStorage, cache, runGroup, taskGraph) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const id = yield api.start((0, distributed_execution_api_1.createStartRequest)(runGroup, (0, split_task_graph_into_stages_1.splitTasksIntoStages)(taskGraph), options));
|
|
36
|
+
return yield processTasks(api, fileStorage, cache, options, id, Object.values(taskGraph.tasks), context);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function processTasks(api, fileStorage, cache, options, executionId, tasks, context) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const processedTasks = {};
|
|
42
|
+
const failIfNumberOfCompletedTasksDoesNotChangeIn30Mins = (0, create_no_new_messages_timeout_1.createNoNewMessagesTimeout)();
|
|
43
|
+
const waiter = new waiter_1.Waiter();
|
|
44
|
+
while (true) {
|
|
45
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
46
|
+
output.note({
|
|
47
|
+
title: 'Waiting...',
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
yield waiter.wait();
|
|
51
|
+
const r = yield api.status(executionId);
|
|
52
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
53
|
+
output.note({
|
|
54
|
+
title: `Status update`,
|
|
55
|
+
bodyLines: [
|
|
56
|
+
`executionId: ${executionId}`,
|
|
57
|
+
`executionStatus: ${r.executionStatus}`,
|
|
58
|
+
`number of completed tasks: ${r.completedTasks.length}`,
|
|
59
|
+
`error: ${r.criticalErrorMessage}`,
|
|
60
|
+
],
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
if (r.criticalErrorMessage) {
|
|
64
|
+
output.error({
|
|
65
|
+
title: 'Distributed Execution Terminated',
|
|
66
|
+
bodyLines: ['Error:', r.criticalErrorMessage],
|
|
67
|
+
});
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
failIfNumberOfCompletedTasksDoesNotChangeIn30Mins(r.completedTasks.length);
|
|
71
|
+
for (const t of r.completedTasks) {
|
|
72
|
+
if (processedTasks[t.taskId])
|
|
73
|
+
continue;
|
|
74
|
+
yield processTask(fileStorage, cache, context, options, tasks, t);
|
|
75
|
+
waiter.reset();
|
|
76
|
+
processedTasks[t.taskId] = true;
|
|
77
|
+
}
|
|
78
|
+
if (r.executionStatus === 'COMPLETED') {
|
|
79
|
+
return { commandStatus: r.commandStatus, runUrl: r.runUrl };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function processTask(fileStorage, cache, context, options, tasks, completedTask) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
87
|
+
output.note({
|
|
88
|
+
title: `Processing task ${completedTask.taskId}`,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
const matchingTask = tasks.find((tt) => completedTask.taskId === tt.id);
|
|
92
|
+
if (!matchingTask) {
|
|
93
|
+
throw new Error(`Found unknown task: ${completedTask.taskId}`);
|
|
94
|
+
}
|
|
95
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
96
|
+
output.note({
|
|
97
|
+
title: `Retrieving artifacts from ${completedTask.url}`,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
yield fileStorage.retrieve(completedTask.hash, completedTask.url, options.cacheDirectory || './node_modules/.cache/nx');
|
|
101
|
+
const cachedResult = yield cache.get(Object.assign(Object.assign({}, matchingTask), { hash: completedTask.hash }));
|
|
102
|
+
const outputs = getOutputs(context.projectGraph.nodes, matchingTask);
|
|
103
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
104
|
+
output.note({
|
|
105
|
+
title: `Extracting artifacts`,
|
|
106
|
+
bodyLines: outputs,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
yield cache.copyFilesFromCache(completedTask.hash, cachedResult, outputs);
|
|
110
|
+
output.logCommand(getCommand(matchingTask));
|
|
111
|
+
process.stdout.write(cachedResult.terminalOutput);
|
|
112
|
+
output.addVerticalSeparator();
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function getCommand(task) {
|
|
116
|
+
const config = task.target.configuration
|
|
117
|
+
? `:${task.target.configuration}`
|
|
118
|
+
: '';
|
|
119
|
+
return [
|
|
120
|
+
'nx',
|
|
121
|
+
'run',
|
|
122
|
+
`${task.target.project}:${task.target.target}${config}`,
|
|
123
|
+
(0, serializer_overrides_1.serializeOverrides)(task),
|
|
124
|
+
].join(' ');
|
|
125
|
+
}
|
|
126
|
+
const nxCloudDistributedTasksRunner = (tasks, options, context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
127
|
+
if (environment_1.VERBOSE_LOGGING) {
|
|
128
|
+
output.note({
|
|
129
|
+
title: 'Starting distributed command execution',
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
options.lifeCycle = new NoopLifeCycle();
|
|
133
|
+
const runGroup = (0, environment_1.getRunGroup)();
|
|
134
|
+
if (!runGroup) {
|
|
135
|
+
(0, print_run_group_error_1.printRunGroupError)();
|
|
136
|
+
return process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
const encryption = new e2e_encryption_1.E2EEncryption(environment_1.ENCRYPTION_KEY || options.encryptionKey);
|
|
139
|
+
const errorReporter = new error_reporter_api_1.ErrorReporterApi(options);
|
|
140
|
+
const fileStorage = new file_storage_1.FileStorage(encryption, errorReporter, true);
|
|
141
|
+
const cache = new Cache(options);
|
|
142
|
+
const api = new distributed_execution_api_1.DistributedExecutionApi(options);
|
|
143
|
+
try {
|
|
144
|
+
const taskGraph = getTaskGraph(context, tasks, options);
|
|
145
|
+
const r = yield runDistributedExecution(api, options, context, fileStorage, cache, runGroup, taskGraph);
|
|
146
|
+
if (r.commandStatus === 0) {
|
|
147
|
+
output.success({
|
|
148
|
+
title: 'Successfully completed running the command.',
|
|
149
|
+
bodyLines: [`See run details at ${r.runUrl}`],
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
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.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
|
+
try {
|
|
173
|
+
yield api.completeRunGroupWithError(runGroup, `Main job terminated with an error: "${e.message}"`);
|
|
174
|
+
}
|
|
175
|
+
finally {
|
|
176
|
+
process.exit(1);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
exports.nxCloudDistributedTasksRunner = nxCloudDistributedTasksRunner;
|
|
181
|
+
function getTaskGraph(context, tasks, options) {
|
|
182
|
+
if (context.taskGraph) {
|
|
183
|
+
return context.taskGraph;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
const nxjson = JSON.parse(stripJsonComments((0, fs_1.readFileSync)(`${workspaceRoot}/nx.json`).toString()));
|
|
187
|
+
return new task_graph_creator_1.TaskGraphCreator(context.projectGraph, getDefaultDependencyConfigs(nxjson, options)).createTaskGraph(tasks);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
function getDefaultDependencyConfigs(nxJson, runnerOptions) {
|
|
191
|
+
var _a, _b;
|
|
192
|
+
const defaults = (_a = nxJson.targetDependencies) !== null && _a !== void 0 ? _a : {};
|
|
193
|
+
const strictlyOrderedTargets = runnerOptions
|
|
194
|
+
? (_b = runnerOptions.strictlyOrderedTargets) !== null && _b !== void 0 ? _b : ['build']
|
|
195
|
+
: [];
|
|
196
|
+
// Strictly Ordered Targets depend on their dependencies
|
|
197
|
+
for (const target of strictlyOrderedTargets) {
|
|
198
|
+
defaults[target] = defaults[target] || [];
|
|
199
|
+
defaults[target].push({
|
|
200
|
+
target,
|
|
201
|
+
projects: 'dependencies',
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
return defaults;
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=distributed-execution.runner.js.map
|
|
@@ -1 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.splitTasksIntoStages = void 0;
|
|
4
|
+
function splitTasksIntoStages(taskGraph) {
|
|
5
|
+
const stages = [];
|
|
6
|
+
const notStagedTaskIds = new Set(Object.values(taskGraph.tasks).map((t) => t.id));
|
|
7
|
+
let stageIndex = 0;
|
|
8
|
+
// Loop through tasks and try to stage them. As tasks are staged, they are removed from the loop
|
|
9
|
+
while (notStagedTaskIds.size > 0) {
|
|
10
|
+
const currentStage = (stages[stageIndex] = []);
|
|
11
|
+
for (const taskId of notStagedTaskIds) {
|
|
12
|
+
let ready = true;
|
|
13
|
+
for (const dependency of taskGraph.dependencies[taskId]) {
|
|
14
|
+
if (notStagedTaskIds.has(dependency)) {
|
|
15
|
+
// dependency has not been staged yet, this task is not ready to be staged.
|
|
16
|
+
ready = false;
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
// Some dependency still has not been staged, skip it for now, it will be processed again
|
|
21
|
+
if (!ready) {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
// All the dependencies have been staged, let's stage it.
|
|
25
|
+
const task = taskGraph.tasks[taskId];
|
|
26
|
+
currentStage.push(task);
|
|
27
|
+
}
|
|
28
|
+
// Remove the entire new stage of tasks from the list
|
|
29
|
+
for (const task of currentStage) {
|
|
30
|
+
notStagedTaskIds.delete(task.id);
|
|
31
|
+
}
|
|
32
|
+
stageIndex++;
|
|
33
|
+
}
|
|
34
|
+
return stages;
|
|
35
|
+
}
|
|
36
|
+
exports.splitTasksIntoStages = splitTasksIntoStages;
|
|
37
|
+
//# sourceMappingURL=split-task-graph-into-stages.js.map
|
|
@@ -1 +1,77 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskGraphCreator = void 0;
|
|
4
|
+
const { getDependencyConfigs } = require('../../../utilities/nx-imports');
|
|
5
|
+
/**
|
|
6
|
+
* This is only used for versions of Nx prior to 14 where the task graph
|
|
7
|
+
* wasn't part of the context so we have to recreate it
|
|
8
|
+
*/
|
|
9
|
+
class TaskGraphCreator {
|
|
10
|
+
constructor(projectGraph, defaultTargetDependencies) {
|
|
11
|
+
this.projectGraph = projectGraph;
|
|
12
|
+
this.defaultTargetDependencies = defaultTargetDependencies;
|
|
13
|
+
}
|
|
14
|
+
createTaskGraph(tasks) {
|
|
15
|
+
const graph = {
|
|
16
|
+
roots: [],
|
|
17
|
+
tasks: {},
|
|
18
|
+
dependencies: {},
|
|
19
|
+
};
|
|
20
|
+
for (const task of tasks) {
|
|
21
|
+
this.addTaskToGraph(task, graph);
|
|
22
|
+
const dependencyConfigs = getDependencyConfigs(task.target, this.defaultTargetDependencies, this.projectGraph);
|
|
23
|
+
if (!dependencyConfigs) {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
this.addTaskDependencies(task, dependencyConfigs, tasks, graph);
|
|
27
|
+
}
|
|
28
|
+
graph.roots = Object.keys(graph.dependencies).filter((k) => graph.dependencies[k].length === 0);
|
|
29
|
+
return graph;
|
|
30
|
+
}
|
|
31
|
+
addTaskDependencies(task, dependencyConfigs, tasks, graph) {
|
|
32
|
+
for (const dependencyConfig of dependencyConfigs) {
|
|
33
|
+
if (dependencyConfig.projects === 'self') {
|
|
34
|
+
for (const t of tasks) {
|
|
35
|
+
if (t.target.project === task.target.project &&
|
|
36
|
+
t.target.target === dependencyConfig.target) {
|
|
37
|
+
graph.dependencies[task.id].push(t.id);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else if (dependencyConfig.projects === 'dependencies') {
|
|
42
|
+
const seen = new Set();
|
|
43
|
+
this.addDependencies(task.target.project, dependencyConfig.target, tasks, graph, task.id, seen);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
addDependencies(project, target, tasks, graph, taskId, seen) {
|
|
48
|
+
seen.add(project);
|
|
49
|
+
const dependencies = this.projectGraph.dependencies[project];
|
|
50
|
+
if (dependencies) {
|
|
51
|
+
const projectDependencies = dependencies.map((dependency) => dependency.target);
|
|
52
|
+
for (const projectDependency of projectDependencies) {
|
|
53
|
+
if (seen.has(projectDependency)) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const dependency = this.findTask({ project: projectDependency, target }, tasks);
|
|
57
|
+
if (dependency) {
|
|
58
|
+
if (graph.dependencies[taskId].indexOf(dependency.id) === -1) {
|
|
59
|
+
graph.dependencies[taskId].push(dependency.id);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
this.addDependencies(projectDependency, target, tasks, graph, taskId, seen);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
findTask({ project, target }, tasks) {
|
|
69
|
+
return tasks.find((t) => t.target.project === project && t.target.target === target);
|
|
70
|
+
}
|
|
71
|
+
addTaskToGraph(task, graph) {
|
|
72
|
+
graph.tasks[task.id] = task;
|
|
73
|
+
graph.dependencies[task.id] = [];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.TaskGraphCreator = TaskGraphCreator;
|
|
77
|
+
//# sourceMappingURL=task-graph-creator.js.map
|
|
@@ -14,7 +14,7 @@ function createNoNewMessagesTimeout() {
|
|
|
14
14
|
else {
|
|
15
15
|
if (new Date().getTime() - valueIsSetAt.getTime() > environment_1.NO_MESSAGES_TIMEOUT) {
|
|
16
16
|
output.error({
|
|
17
|
-
title:
|
|
17
|
+
title: `No new messages received in ${environment_1.NO_MESSAGES_TIMEOUT / 1000} seconds`,
|
|
18
18
|
});
|
|
19
19
|
process.exit(1);
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-no-new-messages-timeout.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/create-no-new-messages-timeout.ts"],"names":[],"mappings":";;;AAAA,+CAAoD;AACpD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAE3C,SAAgB,0BAA0B;IACxC,IAAI,KAAK,GAAG,IAAI,MAAM,EAAE,CAAC;IACzB,IAAI,YAAY,CAAC;IACjB,OAAO,CAAC,QAAQ,EAAE,EAAE;QAClB,IAAI,KAAK,KAAK,QAAQ,EAAE;YACtB,KAAK,GAAG,QAAQ,CAAC;YACjB,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC;SAC3B;aAAM;YACL,IAAI,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,YAAY,CAAC,OAAO,EAAE,GAAG,iCAAmB,EAAE;gBACvE,MAAM,CAAC,KAAK,CAAC;oBACX,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"create-no-new-messages-timeout.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/create-no-new-messages-timeout.ts"],"names":[],"mappings":";;;AAAA,+CAAoD;AACpD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAE3C,SAAgB,0BAA0B;IACxC,IAAI,KAAK,GAAG,IAAI,MAAM,EAAE,CAAC;IACzB,IAAI,YAAY,CAAC;IACjB,OAAO,CAAC,QAAQ,EAAE,EAAE;QAClB,IAAI,KAAK,KAAK,QAAQ,EAAE;YACtB,KAAK,GAAG,QAAQ,CAAC;YACjB,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC;SAC3B;aAAM;YACL,IAAI,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,YAAY,CAAC,OAAO,EAAE,GAAG,iCAAmB,EAAE;gBACvE,MAAM,CAAC,KAAK,CAAC;oBACX,KAAK,EAAE,+BACL,iCAAmB,GAAG,IACxB,UAAU;iBACX,CAAC,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACjB;SACF;IACH,CAAC,CAAC;AACJ,CAAC;AAlBD,gEAkBC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CloudTaskRunnerOptions } from '../core/models/cloud-task-runner-options';
|
|
2
2
|
import { MachineInfo } from '../core/models/machine-info.model';
|
|
3
3
|
export declare const UNLIMITED_TIMEOUT = 9999999;
|
|
4
|
-
export declare const NO_MESSAGES_TIMEOUT
|
|
4
|
+
export declare const NO_MESSAGES_TIMEOUT: number;
|
|
5
5
|
export declare const UNLIMITED_FILE_SIZE: number;
|
|
6
6
|
export declare const NX_CLOUD_UNLIMITED_OUTPUT: boolean;
|
|
7
7
|
export declare const DEFAULT_FILE_SIZE_LIMIT: number;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseCommand = exports.getMachineInfo = exports.getBranch = exports.getRunGroup = exports.extractGitSha = exports.NX_CLOUD_NO_TIMEOUTS = exports.VERBOSE_LOGGING = exports.ENCRYPTION_KEY = exports.ACCESS_TOKEN = exports.NX_CLOUD_FORCE_METRICS = exports.NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE = exports.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT = exports.NUMBER_OF_AXIOS_RETRIES = exports.NX_CLOUD_DISTRIBUTED_EXECUTION = exports.AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION = exports.NX_CLOUD_DISTRIBUTED_EXECUTION_ID = exports.NX_INVOKED_BY_RUNNER = exports.DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE = exports.DEFAULT_FILE_SIZE_LIMIT = exports.NX_CLOUD_UNLIMITED_OUTPUT = exports.UNLIMITED_FILE_SIZE = exports.NO_MESSAGES_TIMEOUT = exports.UNLIMITED_TIMEOUT = void 0;
|
|
4
|
-
const node_machine_id_1 = require("node-machine-id");
|
|
5
4
|
const child_process_1 = require("child_process");
|
|
5
|
+
const dotenv = require("dotenv");
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
|
+
const node_machine_id_1 = require("node-machine-id");
|
|
7
8
|
const path_1 = require("path");
|
|
8
|
-
const dotenv = require("dotenv");
|
|
9
9
|
const { workspaceRoot } = require('./nx-imports');
|
|
10
10
|
exports.UNLIMITED_TIMEOUT = 9999999;
|
|
11
|
-
exports.NO_MESSAGES_TIMEOUT =
|
|
11
|
+
exports.NO_MESSAGES_TIMEOUT = process.env.NX_CLOUD_AGENT_TIMEOUT_MS
|
|
12
|
+
? Number(process.env.NX_CLOUD_AGENT_TIMEOUT_MS)
|
|
13
|
+
: 3600000; // 60 minutes
|
|
12
14
|
exports.UNLIMITED_FILE_SIZE = 1000 * 1000 * 10000;
|
|
13
15
|
exports.NX_CLOUD_UNLIMITED_OUTPUT = process.env.NX_CLOUD_UNLIMITED_OUTPUT === 'true';
|
|
14
16
|
exports.DEFAULT_FILE_SIZE_LIMIT = 1000 * 1000 * 300;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/environment.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/environment.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AACzC,iCAAiC;AACjC,2BAAkC;AAClC,qDAAgD;AAChD,+BAAmC;AAInC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAErC,QAAA,iBAAiB,GAAG,OAAO,CAAC;AAC5B,QAAA,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB;IACtE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC;IAC/C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,oCAMC"}
|
package/package.json
CHANGED
package/project.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
|
3
|
+
"sourceRoot": "libs/nx-packages/nx-cloud/src",
|
|
4
|
+
"projectType": "library",
|
|
5
|
+
"generators": {},
|
|
6
|
+
"targets": {
|
|
7
|
+
"test": {
|
|
8
|
+
"executor": "@nrwl/jest:jest",
|
|
9
|
+
"options": {
|
|
10
|
+
"jestConfig": "libs/nx-packages/nx-cloud/jest.config.ts",
|
|
11
|
+
"passWithNoTests": true
|
|
12
|
+
},
|
|
13
|
+
"outputs": ["coverage/libs/nx-packages/nx-cloud"]
|
|
14
|
+
},
|
|
15
|
+
"build": {
|
|
16
|
+
"executor": "@nrwl/js:tsc",
|
|
17
|
+
"options": {
|
|
18
|
+
"outputPath": "dist/libs/nx-packages/nx-cloud",
|
|
19
|
+
"tsConfig": "libs/nx-packages/nx-cloud/tsconfig.lib.json",
|
|
20
|
+
"packageJson": "libs/nx-packages/nx-cloud/package.json",
|
|
21
|
+
"main": "libs/nx-packages/nx-cloud/index.ts",
|
|
22
|
+
"assets": [
|
|
23
|
+
"libs/nx-packages/nx-cloud/**/*.md",
|
|
24
|
+
"libs/nx-packages/nx-cloud/LICENSE",
|
|
25
|
+
{
|
|
26
|
+
"input": "libs/nx-packages/nx-cloud",
|
|
27
|
+
"glob": "**/*.json",
|
|
28
|
+
"output": "."
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"updateBuildableProjectDepsInPackageJson": false
|
|
32
|
+
},
|
|
33
|
+
"outputs": ["{options.outputPath}"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|