@lage-run/scheduler 0.4.7 → 0.4.9
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/CHANGELOG.json +43 -1
- package/CHANGELOG.md +20 -2
- package/lib/WrappedTarget.d.ts +2 -0
- package/lib/WrappedTarget.js +16 -7
- package/lib/WrappedTarget.js.map +1 -1
- package/lib/categorizeTargetRuns.js +1 -0
- package/lib/categorizeTargetRuns.js.map +1 -1
- package/package.json +3 -3
- package/lib/formatDuration.d.ts +0 -2
- package/lib/formatDuration.js +0 -22
- package/lib/formatDuration.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,49 @@
|
|
|
2
2
|
"name": "@lage-run/scheduler",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 12 Oct 2022 21:06:57 GMT",
|
|
6
|
+
"tag": "@lage-run/scheduler_v0.4.9",
|
|
7
|
+
"version": "0.4.9",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "kchau@microsoft.com",
|
|
12
|
+
"package": "@lage-run/scheduler",
|
|
13
|
+
"commit": "933546a2096fe5e84132293dd1524ea4beb09ee5",
|
|
14
|
+
"comment": "uses the separate package for formatting hrtime"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@lage-run/scheduler",
|
|
19
|
+
"comment": "Bump @lage-run/format-hrtime to v0.1.1",
|
|
20
|
+
"commit": "933546a2096fe5e84132293dd1524ea4beb09ee5"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@lage-run/scheduler",
|
|
25
|
+
"comment": "Bump @lage-run/scheduler-types to v0.1.10",
|
|
26
|
+
"commit": "933546a2096fe5e84132293dd1524ea4beb09ee5"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Sat, 08 Oct 2022 19:11:01 GMT",
|
|
33
|
+
"tag": "@lage-run/scheduler_v0.4.8",
|
|
34
|
+
"version": "0.4.8",
|
|
35
|
+
"comments": {
|
|
36
|
+
"patch": [
|
|
37
|
+
{
|
|
38
|
+
"author": "ken@gizzar.com",
|
|
39
|
+
"package": "@lage-run/scheduler",
|
|
40
|
+
"commit": "c1138dc23bd0312d66b425b6a6570de335cdd23c",
|
|
41
|
+
"comment": "remove unneeded dep"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"date": "Sat, 08 Oct 2022 18:44:41 GMT",
|
|
6
48
|
"tag": "@lage-run/scheduler_v0.4.7",
|
|
7
49
|
"version": "0.4.7",
|
|
8
50
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Change Log - @lage-run/scheduler
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 12 Oct 2022 21:06:57 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.4.9
|
|
8
|
+
|
|
9
|
+
Wed, 12 Oct 2022 21:06:57 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- uses the separate package for formatting hrtime (kchau@microsoft.com)
|
|
14
|
+
- Bump @lage-run/format-hrtime to v0.1.1
|
|
15
|
+
- Bump @lage-run/scheduler-types to v0.1.10
|
|
16
|
+
|
|
17
|
+
## 0.4.8
|
|
18
|
+
|
|
19
|
+
Sat, 08 Oct 2022 19:11:01 GMT
|
|
20
|
+
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
- remove unneeded dep (ken@gizzar.com)
|
|
24
|
+
|
|
7
25
|
## 0.4.7
|
|
8
26
|
|
|
9
|
-
Sat, 08 Oct 2022 18:44:
|
|
27
|
+
Sat, 08 Oct 2022 18:44:41 GMT
|
|
10
28
|
|
|
11
29
|
### Patches
|
|
12
30
|
|
package/lib/WrappedTarget.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export interface WrappedTargetOptions {
|
|
|
26
26
|
*/
|
|
27
27
|
export declare class WrappedTarget implements TargetRun {
|
|
28
28
|
options: WrappedTargetOptions;
|
|
29
|
+
queueTime: [number, number];
|
|
29
30
|
startTime: [number, number];
|
|
30
31
|
duration: [number, number];
|
|
31
32
|
target: Target;
|
|
@@ -33,6 +34,7 @@ export declare class WrappedTarget implements TargetRun {
|
|
|
33
34
|
get abortController(): AbortController;
|
|
34
35
|
set abortController(abortController: AbortController);
|
|
35
36
|
constructor(options: WrappedTargetOptions);
|
|
37
|
+
onQueued(): void;
|
|
36
38
|
onAbort(): void;
|
|
37
39
|
onStart(): void;
|
|
38
40
|
onComplete(): void;
|
package/lib/WrappedTarget.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.WrappedTarget = void 0;
|
|
7
7
|
const bufferTransform_1 = require("./bufferTransform");
|
|
8
8
|
const getLageOutputCacheLocation_1 = require("./getLageOutputCacheLocation");
|
|
9
|
-
const
|
|
9
|
+
const format_hrtime_1 = require("@lage-run/format-hrtime");
|
|
10
10
|
const logger_1 = require("@lage-run/logger");
|
|
11
11
|
const fs_1 = __importDefault(require("fs"));
|
|
12
12
|
const path_1 = __importDefault(require("path"));
|
|
@@ -21,6 +21,7 @@ const promises_1 = require("fs/promises");
|
|
|
21
21
|
class WrappedTarget {
|
|
22
22
|
constructor(options) {
|
|
23
23
|
this.options = options;
|
|
24
|
+
this.queueTime = [0, 0];
|
|
24
25
|
this.startTime = [0, 0];
|
|
25
26
|
this.duration = [0, 0];
|
|
26
27
|
this.status = "pending";
|
|
@@ -32,6 +33,10 @@ class WrappedTarget {
|
|
|
32
33
|
set abortController(abortController) {
|
|
33
34
|
this.options.abortController = abortController;
|
|
34
35
|
}
|
|
36
|
+
onQueued() {
|
|
37
|
+
this.status = "queued";
|
|
38
|
+
this.queueTime = process.hrtime();
|
|
39
|
+
}
|
|
35
40
|
onAbort() {
|
|
36
41
|
this.status = "aborted";
|
|
37
42
|
this.duration = process.hrtime(this.startTime);
|
|
@@ -57,7 +62,7 @@ class WrappedTarget {
|
|
|
57
62
|
this.options.logger.info("failed", {
|
|
58
63
|
target: this.target,
|
|
59
64
|
status: "failed",
|
|
60
|
-
duration: (0,
|
|
65
|
+
duration: (0, format_hrtime_1.hrToSeconds)(this.duration),
|
|
61
66
|
});
|
|
62
67
|
if (!this.options.continueOnError && this.options.abortController) {
|
|
63
68
|
this.options.abortController.abort();
|
|
@@ -69,7 +74,7 @@ class WrappedTarget {
|
|
|
69
74
|
this.options.logger.info(`skipped`, {
|
|
70
75
|
target: this.target,
|
|
71
76
|
status: "skipped",
|
|
72
|
-
duration: (0,
|
|
77
|
+
duration: (0, format_hrtime_1.hrToSeconds)(this.duration),
|
|
73
78
|
hash,
|
|
74
79
|
});
|
|
75
80
|
}
|
|
@@ -97,20 +102,20 @@ class WrappedTarget {
|
|
|
97
102
|
}
|
|
98
103
|
async run() {
|
|
99
104
|
const { target, logger, shouldCache, abortController, pool } = this.options;
|
|
100
|
-
this.
|
|
105
|
+
this.onQueued();
|
|
101
106
|
const abortSignal = abortController.signal;
|
|
102
107
|
if (abortSignal.aborted) {
|
|
108
|
+
this.onStart();
|
|
103
109
|
this.onAbort();
|
|
104
110
|
return;
|
|
105
111
|
}
|
|
106
112
|
try {
|
|
107
113
|
const { hash, cacheHit } = await this.getCache();
|
|
108
114
|
const cacheEnabled = target.cache && shouldCache && hash;
|
|
109
|
-
if (cacheEnabled) {
|
|
110
|
-
logger.verbose(`hash: ${hash}, cache hit? ${cacheHit}`, { target });
|
|
111
|
-
}
|
|
112
115
|
// skip if cache hit!
|
|
113
116
|
if (cacheHit) {
|
|
117
|
+
this.onStart();
|
|
118
|
+
logger.verbose(`hash: ${hash}, cache hit? ${cacheHit}`, { target });
|
|
114
119
|
const cachedOutputFile = (0, getLageOutputCacheLocation_1.getLageOutputCacheLocation)(this.target, hash !== null && hash !== void 0 ? hash : "");
|
|
115
120
|
if (fs_1.default.existsSync(cachedOutputFile)) {
|
|
116
121
|
const cachedOutput = fs_1.default.createReadStream(cachedOutputFile, "utf8");
|
|
@@ -131,6 +136,10 @@ class WrappedTarget {
|
|
|
131
136
|
const bufferStdout = (0, bufferTransform_1.bufferTransform)();
|
|
132
137
|
const bufferStderr = (0, bufferTransform_1.bufferTransform)();
|
|
133
138
|
await pool.exec({ target }, (_worker, stdout, stderr) => {
|
|
139
|
+
this.onStart();
|
|
140
|
+
if (cacheEnabled) {
|
|
141
|
+
logger.verbose(`hash: ${hash}, cache hit? ${cacheHit}`, { target });
|
|
142
|
+
}
|
|
134
143
|
stdout.pipe(bufferStdout.transform);
|
|
135
144
|
stderr.pipe(bufferStderr.transform);
|
|
136
145
|
const releaseStdoutStream = logger.stream(logger_1.LogLevel.verbose, stdout, { target });
|
package/lib/WrappedTarget.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WrappedTarget.js","sourceRoot":"","sources":["../src/WrappedTarget.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAoD;AACpD,6EAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"WrappedTarget.js","sourceRoot":"","sources":["../src/WrappedTarget.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAoD;AACpD,6EAA0E;AAC1E,2DAAsD;AACtD,6CAA4C;AAE5C,4CAAoB;AACpB,gDAAwB;AACxB,0CAA+C;AAuB/C;;;;;;GAMG;AACH,MAAa,aAAa;IAexB,YAAmB,OAA6B;QAA7B,YAAO,GAAP,OAAO,CAAsB;QAdhD,cAAS,GAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrC,cAAS,GAAqB,CAAC,CAAC,EAAE,C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AI,CAAC,CAAC;gBACrE,MAAM,UAAU,GAAG,cAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;gBAChD,MAAM,IAAA,gBAAK,EAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC7C,MAAM,IAAA,oBAAS,EAAC,cAAc,EAAE,YAAY,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;aAC5E;YAED,IAAI,CAAC,UAAU,EAAE,CAAC;SACnB;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;YAEpC,IAAI,WAAW,CAAC,OAAO,EAAE;gBACvB,IAAI,CAAC,OAAO,EAAE,CAAC;aAChB;iBAAM;gBACL,IAAI,CAAC,MAAM,EAAE,CAAC;aACf;YAED,MAAM,CAAC,CAAC;SACT;IACH,CAAC;IAED;;;;;;OAMG;IACH,MAAM;QACJ,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE;YACtB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;IACJ,CAAC;CACF;AA5ND,sCA4NC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categorizeTargetRuns.js","sourceRoot":"","sources":["../src/categorizeTargetRuns.ts"],"names":[],"mappings":";;;AAEA,SAAgB,oBAAoB,CAAC,UAAuB;IAC1D,MAAM,OAAO,GAAqB;QAChC,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"categorizeTargetRuns.js","sourceRoot":"","sources":["../src/categorizeTargetRuns.ts"],"names":[],"mappings":";;;AAEA,SAAgB,oBAAoB,CAAC,UAAuB;IAC1D,MAAM,OAAO,GAAqB;QAChC,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,EAAE;KACX,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE;YAC5B,OAAO,CAAC,MAAM,CAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;SAC5C;KACF;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAnBD,oDAmBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lage-run/scheduler",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "Scheduler for Lage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/microsoft/lage"
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"@lage-run/logger": "^1.2.0",
|
|
20
20
|
"@lage-run/cache": "^0.1.19",
|
|
21
21
|
"@lage-run/worker-threads-pool": "^0.1.7",
|
|
22
|
+
"@lage-run/format-hrtime": "^0.1.1",
|
|
22
23
|
"p-graph": "^1.1.1",
|
|
23
24
|
"p-profiler": "^0.2.1",
|
|
24
25
|
"abort-controller": "^3.0.0",
|
|
25
26
|
"workspace-tools": "^0.28.0"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"@types
|
|
29
|
-
"@lage-run/scheduler-types": "^0.1.9",
|
|
29
|
+
"@lage-run/scheduler-types": "^0.1.10",
|
|
30
30
|
"@lage-run/monorepo-fixture": "*",
|
|
31
31
|
"@types/workerpool": "6.1.0",
|
|
32
32
|
"monorepo-scripts": "*"
|
package/lib/formatDuration.d.ts
DELETED
package/lib/formatDuration.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hrToSeconds = exports.formatDuration = void 0;
|
|
4
|
-
function formatDuration(seconds) {
|
|
5
|
-
const raw = parseFloat(seconds);
|
|
6
|
-
if (raw > 60) {
|
|
7
|
-
const minutes = Math.floor(raw / 60);
|
|
8
|
-
const seconds = (raw - minutes * 60).toFixed(2);
|
|
9
|
-
return `${minutes}m ${seconds}s`;
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
const seconds = raw.toFixed(2);
|
|
13
|
-
return `${seconds}s`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.formatDuration = formatDuration;
|
|
17
|
-
function hrToSeconds(hrtime) {
|
|
18
|
-
const raw = hrtime[0] + hrtime[1] / 1e9;
|
|
19
|
-
return raw.toFixed(2);
|
|
20
|
-
}
|
|
21
|
-
exports.hrToSeconds = hrToSeconds;
|
|
22
|
-
//# sourceMappingURL=formatDuration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatDuration.js","sourceRoot":"","sources":["../src/formatDuration.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,OAAe;IAC5C,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAChC,IAAI,GAAG,GAAG,EAAE,EAAE;QACZ,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;QACrC,MAAM,OAAO,GAAG,CAAC,GAAG,GAAG,OAAO,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAChD,OAAO,GAAG,OAAO,KAAK,OAAO,GAAG,CAAC;KAClC;SAAM;QACL,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC/B,OAAO,GAAG,OAAO,GAAG,CAAC;KACtB;AACH,CAAC;AAVD,wCAUC;AAED,SAAgB,WAAW,CAAC,MAAwB;IAClD,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IACxC,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACxB,CAAC;AAHD,kCAGC"}
|