@lage-run/scheduler 0.8.0 → 0.8.2

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 CHANGED
@@ -2,7 +2,37 @@
2
2
  "name": "@lage-run/scheduler",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 18 Jan 2023 18:18:13 GMT",
5
+ "date": "Tue, 31 Jan 2023 23:54:40 GMT",
6
+ "tag": "@lage-run/scheduler_v0.8.2",
7
+ "version": "0.8.2",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "kchau@microsoft.com",
12
+ "package": "@lage-run/scheduler",
13
+ "commit": "9340358c80d388e0d56b40d1fdb965e1b4e20454",
14
+ "comment": "fixed reporter to not log target status when it should not run at all"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Fri, 27 Jan 2023 00:28:15 GMT",
21
+ "tag": "@lage-run/scheduler_v0.8.1",
22
+ "version": "0.8.1",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "kchau@microsoft.com",
27
+ "package": "@lage-run/scheduler",
28
+ "commit": "b0f0b5a7773a71c111799f3a3b0a48a7824b838b",
29
+ "comment": "fixing profiler so that it will load correctly in the tracing UI"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Wed, 18 Jan 2023 18:18:35 GMT",
6
36
  "tag": "@lage-run/scheduler_v0.8.0",
7
37
  "version": "0.8.0",
8
38
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,28 @@
1
1
  # Change Log - @lage-run/scheduler
2
2
 
3
- This log was last generated on Wed, 18 Jan 2023 18:18:13 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 31 Jan 2023 23:54:40 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.8.2
8
+
9
+ Tue, 31 Jan 2023 23:54:40 GMT
10
+
11
+ ### Patches
12
+
13
+ - fixed reporter to not log target status when it should not run at all (kchau@microsoft.com)
14
+
15
+ ## 0.8.1
16
+
17
+ Fri, 27 Jan 2023 00:28:15 GMT
18
+
19
+ ### Patches
20
+
21
+ - fixing profiler so that it will load correctly in the tracing UI (kchau@microsoft.com)
22
+
7
23
  ## 0.8.0
8
24
 
9
- Wed, 18 Jan 2023 18:18:13 GMT
25
+ Wed, 18 Jan 2023 18:18:35 GMT
10
26
 
11
27
  ### Minor changes
12
28
 
@@ -250,7 +250,7 @@ async function generateTargetRunPromise(target) {
250
250
  if (shouldRun) {
251
251
  await target.run();
252
252
  } else {
253
- target.status = "skipped";
253
+ target.onSkipped();
254
254
  }
255
255
  } catch (e1) {
256
256
  runError = e1;
@@ -46,9 +46,9 @@ export declare class WrappedTarget implements TargetRun {
46
46
  onStart(threadId: number): void;
47
47
  onComplete(): void;
48
48
  onFail(): void;
49
- onSkipped(hash: string | null): void;
49
+ onSkipped(hash?: string | undefined): void;
50
50
  getCache(): Promise<{
51
- hash: null;
51
+ hash: undefined;
52
52
  cacheHit: boolean;
53
53
  } | {
54
54
  hash: string;
@@ -45,6 +45,7 @@ class WrappedTarget {
45
45
  }
46
46
  onStart(threadId) {
47
47
  if (this.status !== "running") {
48
+ this.threadId = threadId;
48
49
  this.status = "running";
49
50
  this.startTime = process.hrtime();
50
51
  this.options.logger.info("", {
@@ -78,19 +79,23 @@ class WrappedTarget {
78
79
  }
79
80
  }
80
81
  onSkipped(hash) {
82
+ if (this.startTime[0] !== 0 && this.startTime[1] !== 0) {
83
+ this.duration = process.hrtime(this.startTime);
84
+ }
81
85
  this.status = "skipped";
82
- this.duration = process.hrtime(this.startTime);
83
- this.options.logger.info("", {
84
- target: this.target,
85
- status: "skipped",
86
- duration: this.duration,
87
- hash,
88
- threadId: this.threadId
89
- });
86
+ if (hash) {
87
+ this.options.logger.info("", {
88
+ target: this.target,
89
+ status: "skipped",
90
+ duration: this.duration,
91
+ hash,
92
+ threadId: this.threadId
93
+ });
94
+ }
90
95
  }
91
96
  async getCache() {
92
97
  const { cacheProvider , hasher } = this.options;
93
- let hash = null;
98
+ let hash = undefined;
94
99
  let cacheHit = false;
95
100
  const { target , shouldCache , shouldResetCache } = this.options;
96
101
  if (!shouldCache || !target.cache || !cacheProvider || !hasher) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lage-run/scheduler",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Scheduler for Lage",
5
5
  "repository": {
6
6
  "url": "https://github.com/microsoft/lage"