@nrwl/nx-cloud 14.2.0 → 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/file-storage/file-storage.js +38 -1
- 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_0x37ea=['Processing\x20task\x20','parse','start','write','note','__esModule','stdout','executionId:\x20','Command\x20execution\x20failed.','commandStatus','ErrorReporterApi','./task-graph-creator','project','../../file-storage/file-storage','Unable\x20to\x20complete\x20a\x20run.','log','encryptionKey','DistributedExecutionApi','strip-json-comments','ENCRYPTION_KEY','VERBOSE_LOGGING','executionStatus:\x20','completeRunGroupWithError','logCommand','values','push','cacheDirectory','/nx.json','TaskGraphCreator','copyFilesFromCache','nxCloudDistributedTasksRunner','completedTasks','executionStatus','taskGraph','error','criticalErrorMessage','reset','Waiter','addVerticalSeparator','Starting\x20distributed\x20command\x20execution','submitRunMetrics','../../../utilities/serializer-overrides','retrieve','value','get','url','number\x20of\x20completed\x20tasks:\x20','nodes','Waiting...','Status\x20update','Found\x20unknown\x20task:\x20','../../error/print-run-group-error','Retrieving\x20artifacts\x20from\x20','message','assign','createNoNewMessagesTimeout','./node_modules/.cache/nx','hash','length','projectGraph','createTaskGraph','axiosException','terminalOutput','Error:','Distributed\x20Execution\x20Terminated','runUrl','__awaiter','splitTasksIntoStages','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','../../../utilities/nx-imports','next','serializeOverrides','target','configuration','createStartRequest','scheduleTask','targetDependencies','startTask','exit','dependencies','../../../utilities/create-no-new-messages-timeout','../../../utilities/waiter','Successfully\x20completed\x20running\x20the\x20command.','taskId'];(function(_0x52e5f3,_0x37ea81){const _0x21105f=function(_0x5f1313){while(--_0x5f1313){_0x52e5f3['push'](_0x52e5f3['shift']());}};_0x21105f(++_0x37ea81);}(a7_0x37ea,0x1c0));const a7_0x2110=function(_0x52e5f3,_0x37ea81){_0x52e5f3=_0x52e5f3-0x0;let _0x21105f=a7_0x37ea[_0x52e5f3];return _0x21105f;};'use strict';var __awaiter=this&&this[a7_0x2110('0x26')]||function(_0x1a56e7,_0x2ddfa9,_0x47676e,_0x59c121){function _0x57a7dc(_0x1c6467){return _0x1c6467 instanceof _0x47676e?_0x1c6467:new _0x47676e(function(_0x4d08e9){_0x4d08e9(_0x1c6467);});}return new(_0x47676e||(_0x47676e=Promise))(function(_0x248065,_0x2a5ebd){function _0xac444f(_0x557861){try{_0x4fb081(_0x59c121['next'](_0x557861));}catch(_0x4baa0b){_0x2a5ebd(_0x4baa0b);}}function _0x6b403c(_0x148063){try{_0x4fb081(_0x59c121['throw'](_0x148063));}catch(_0x569192){_0x2a5ebd(_0x569192);}}function _0x4fb081(_0x2aa6ae){_0x2aa6ae['done']?_0x248065(_0x2aa6ae[a7_0x2110('0xf')]):_0x57a7dc(_0x2aa6ae['value'])['then'](_0xac444f,_0x6b403c);}_0x4fb081((_0x59c121=_0x59c121['apply'](_0x1a56e7,_0x2ddfa9||[]))[a7_0x2110('0x2a')]());});};Object['defineProperty'](exports,a7_0x2110('0x3d'),{'value':!![]});exports[a7_0x2110('0x2')]=void 0x0;const stripJsonComments=require(a7_0x2110('0x4a'));const fs_1=require('fs');const distributed_execution_api_1=require('./distributed-execution.api');const file_storage_1=require(a7_0x2110('0x45'));const e2e_encryption_1=require('../../file-storage/e2e-encryption');const waiter_1=require(a7_0x2110('0x35'));const environment_1=require('../../../utilities/environment');const print_run_group_error_1=require(a7_0x2110('0x17'));const create_no_new_messages_timeout_1=require(a7_0x2110('0x34'));const metric_logger_1=require('../../../utilities/metric-logger');const error_reporter_api_1=require('../../api/error-reporter.api');const serializer_overrides_1=require(a7_0x2110('0xd'));const task_graph_creator_1=require(a7_0x2110('0x43'));const split_task_graph_into_stages_1=require('./split-task-graph-into-stages');const {output,workspaceRoot,getOutputs,Cache}=require(a7_0x2110('0x29'));class NoopLifeCycle{[a7_0x2110('0x2f')](_0x1b277b){}[a7_0x2110('0x31')](_0x26ca54){}['endTask'](_0x33e2b2,_0x303a28){}}function runDistributedExecution(_0x4d3098,_0x297729,_0x54791c,_0x158def,_0x2c6984,_0x2af478,_0x548078){return __awaiter(this,void 0x0,void 0x0,function*(){const _0xfbbef3=yield _0x4d3098[a7_0x2110('0x3a')]((0x0,distributed_execution_api_1[a7_0x2110('0x2e')])(_0x2af478,(0x0,split_task_graph_into_stages_1[a7_0x2110('0x27')])(_0x548078),_0x297729));return yield processTasks(_0x4d3098,_0x158def,_0x2c6984,_0x297729,_0xfbbef3,Object[a7_0x2110('0x50')](_0x548078['tasks']),_0x54791c);});}function processTasks(_0x215c04,_0x36e60e,_0x328fd1,_0x40885a,_0x2bc7e2,_0x402edd,_0x229fb6){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4e6094={};const _0x494780=(0x0,create_no_new_messages_timeout_1[a7_0x2110('0x1b')])();const _0xbe69cb=new waiter_1[(a7_0x2110('0x9'))]();while(!![]){if(environment_1[a7_0x2110('0x4c')]){output['note']({'title':a7_0x2110('0x14')});}yield _0xbe69cb['wait']();const _0x22655e=yield _0x215c04['status'](_0x2bc7e2);if(environment_1[a7_0x2110('0x4c')]){output['note']({'title':a7_0x2110('0x15'),'bodyLines':[a7_0x2110('0x3f')+_0x2bc7e2,a7_0x2110('0x4d')+_0x22655e[a7_0x2110('0x4')],a7_0x2110('0x12')+_0x22655e[a7_0x2110('0x3')][a7_0x2110('0x1e')],'error:\x20'+_0x22655e[a7_0x2110('0x7')]]});}if(_0x22655e[a7_0x2110('0x7')]){output[a7_0x2110('0x6')]({'title':a7_0x2110('0x24'),'bodyLines':[a7_0x2110('0x23'),_0x22655e['criticalErrorMessage']]});process[a7_0x2110('0x32')](0x1);}_0x494780(_0x22655e[a7_0x2110('0x3')][a7_0x2110('0x1e')]);for(const _0x3f90fc of _0x22655e[a7_0x2110('0x3')]){if(_0x4e6094[_0x3f90fc[a7_0x2110('0x37')]])continue;yield processTask(_0x36e60e,_0x328fd1,_0x229fb6,_0x40885a,_0x402edd,_0x3f90fc);_0xbe69cb[a7_0x2110('0x8')]();_0x4e6094[_0x3f90fc[a7_0x2110('0x37')]]=!![];}if(_0x22655e[a7_0x2110('0x4')]==='COMPLETED'){return{'commandStatus':_0x22655e[a7_0x2110('0x41')],'runUrl':_0x22655e[a7_0x2110('0x25')]};}}});}function processTask(_0x1aa5df,_0x4803f5,_0x3a6aab,_0x4f823f,_0x2f9376,_0x12407b){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1[a7_0x2110('0x4c')]){output[a7_0x2110('0x3c')]({'title':a7_0x2110('0x38')+_0x12407b[a7_0x2110('0x37')]});}const _0x417e9a=_0x2f9376['find'](_0x19394b=>_0x12407b[a7_0x2110('0x37')]===_0x19394b['id']);if(!_0x417e9a){throw new Error(a7_0x2110('0x16')+_0x12407b[a7_0x2110('0x37')]);}if(environment_1[a7_0x2110('0x4c')]){output[a7_0x2110('0x3c')]({'title':a7_0x2110('0x18')+_0x12407b[a7_0x2110('0x11')]});}yield _0x1aa5df[a7_0x2110('0xe')](_0x12407b['hash'],_0x12407b[a7_0x2110('0x11')],_0x4f823f[a7_0x2110('0x52')]||a7_0x2110('0x1c'));const _0x444ddf=yield _0x4803f5[a7_0x2110('0x10')](Object[a7_0x2110('0x1a')](Object['assign']({},_0x417e9a),{'hash':_0x12407b[a7_0x2110('0x1d')]}));const _0x569ddc=getOutputs(_0x3a6aab[a7_0x2110('0x1f')][a7_0x2110('0x13')],_0x417e9a);if(environment_1[a7_0x2110('0x4c')]){output[a7_0x2110('0x3c')]({'title':'Extracting\x20artifacts','bodyLines':_0x569ddc});}yield _0x4803f5[a7_0x2110('0x1')](_0x12407b[a7_0x2110('0x1d')],_0x444ddf,_0x569ddc);output[a7_0x2110('0x4f')](getCommand(_0x417e9a));process[a7_0x2110('0x3e')][a7_0x2110('0x3b')](_0x444ddf[a7_0x2110('0x22')]);output[a7_0x2110('0xa')]();});}function getCommand(_0x1ad239){const _0x36eed5=_0x1ad239[a7_0x2110('0x2c')]['configuration']?':'+_0x1ad239[a7_0x2110('0x2c')][a7_0x2110('0x2d')]:'';return['nx','run',_0x1ad239[a7_0x2110('0x2c')][a7_0x2110('0x44')]+':'+_0x1ad239['target'][a7_0x2110('0x2c')]+_0x36eed5,(0x0,serializer_overrides_1[a7_0x2110('0x2b')])(_0x1ad239)]['join']('\x20');}const nxCloudDistributedTasksRunner=(_0xd187de,_0x1b14a8,_0x2316be)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(environment_1[a7_0x2110('0x4c')]){output['note']({'title':a7_0x2110('0xb')});}_0x1b14a8['lifeCycle']=new NoopLifeCycle();const _0x1bd8ff=(0x0,environment_1['getRunGroup'])();if(!_0x1bd8ff){(0x0,print_run_group_error_1['printRunGroupError'])();return process[a7_0x2110('0x32')](0x1);}const _0x236526=new e2e_encryption_1['E2EEncryption'](environment_1[a7_0x2110('0x4b')]||_0x1b14a8[a7_0x2110('0x48')]);const _0x36ce70=new error_reporter_api_1[(a7_0x2110('0x42'))](_0x1b14a8);const _0x322bb9=new file_storage_1['FileStorage'](_0x236526,_0x36ce70,!![]);const _0x5d52c3=new Cache(_0x1b14a8);const _0x55a004=new distributed_execution_api_1[(a7_0x2110('0x49'))](_0x1b14a8);try{const _0x3d9e72=getTaskGraph(_0x2316be,_0xd187de,_0x1b14a8);const _0x170421=yield runDistributedExecution(_0x55a004,_0x1b14a8,_0x2316be,_0x322bb9,_0x5d52c3,_0x1bd8ff,_0x3d9e72);if(_0x170421[a7_0x2110('0x41')]===0x0){output['success']({'title':a7_0x2110('0x36'),'bodyLines':['See\x20run\x20details\x20at\x20'+_0x170421[a7_0x2110('0x25')]]});}else{output[a7_0x2110('0x6')]({'title':a7_0x2110('0x40'),'bodyLines':['See\x20run\x20details\x20at\x20'+_0x170421[a7_0x2110('0x25')]]});}yield(0x0,metric_logger_1[a7_0x2110('0xc')])(_0x1b14a8);process[a7_0x2110('0x32')](_0x170421[a7_0x2110('0x41')]);}catch(_0x42b4e1){output['error']({'title':a7_0x2110('0x46'),'bodyLines':[_0x42b4e1[a7_0x2110('0x19')]]});if(_0x42b4e1[a7_0x2110('0x21')]){console['log'](_0x42b4e1[a7_0x2110('0x21')]);}else{console[a7_0x2110('0x47')](_0x42b4e1);}try{yield _0x55a004[a7_0x2110('0x4e')](_0x1bd8ff,a7_0x2110('0x28')+_0x42b4e1[a7_0x2110('0x19')]+'\x22');}finally{process['exit'](0x1);}}});exports[a7_0x2110('0x2')]=nxCloudDistributedTasksRunner;function getTaskGraph(_0x14b43f,_0x1698a1,_0x569fe6){if(_0x14b43f['taskGraph']){return _0x14b43f[a7_0x2110('0x5')];}else{const _0x1d4d8f=JSON[a7_0x2110('0x39')](stripJsonComments((0x0,fs_1['readFileSync'])(workspaceRoot+a7_0x2110('0x53'))['toString']()));return new task_graph_creator_1[(a7_0x2110('0x0'))](_0x14b43f[a7_0x2110('0x1f')],getDefaultDependencyConfigs(_0x1d4d8f,_0x569fe6))[a7_0x2110('0x20')](_0x1698a1);}}function getDefaultDependencyConfigs(_0x757c30,_0x2e73f4){var _0x2d2b59,_0xe4d8b3;const _0x348134=(_0x2d2b59=_0x757c30[a7_0x2110('0x30')])!==null&&_0x2d2b59!==void 0x0?_0x2d2b59:{};const _0x1fc672=_0x2e73f4?(_0xe4d8b3=_0x2e73f4['strictlyOrderedTargets'])!==null&&_0xe4d8b3!==void 0x0?_0xe4d8b3:['build']:[];for(const _0x261de0 of _0x1fc672){_0x348134[_0x261de0]=_0x348134[_0x261de0]||[];_0x348134[_0x261de0][a7_0x2110('0x51')]({'target':_0x261de0,'projects':a7_0x2110('0x33')});}return _0x348134;}
|
|
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,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa;AACb,QAAA,mBAAmB,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAC1C,QAAA,yBAAyB,GACpC,OAAO,CAAC,GAAG,CAAC,yBAAyB,KAAK,MAAM,CAAC;AACtC,QAAA,uBAAuB,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC;AAC5C,QAAA,qDAAqD,GAAG,GAAG,CAAC;AAC5D,QAAA,oBAAoB,GAC/B,OAAO,CAAC,GAAG,CAAC,oBAAoB,KAAK,MAAM;IAC3C,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO,CAAC;AACtB,QAAA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,+BAAa,GAAE,CAAC;SAC7B;QAAC,WAAM,GAAE;KACX;IAED,OAAO;QACL,SAAS;QACT,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE;QACvB,OAAO,EAAG,EAAU,CAAC,OAAO,CAAC,CAAC,CAAE,EAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE;QACzD,QAAQ,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM;KAC3B,CAAC;AACJ,CAAC;AAjBD,wCAiBC;AAED,SAAgB,YAAY;;IAC1B,MAAM,GAAG,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,iBAAiB,mCAAI,SAAS,CAAC;IACvD,MAAM,OAAO,GAAG,IAAA,YAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5C,MAAM,IAAI,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAClD,MAAM,GAAG,GAAG,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AACrC,CAAC;AAND,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
|
+
}
|