Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "show progress better",
"packageName": "@lage-run/reporters",
"email": "kchau@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "show progress better",
"packageName": "@lage-run/scheduler",
"email": "kchau@microsoft.com",
"dependentChangeType": "patch"
}
6 changes: 6 additions & 0 deletions packages/reporters/src/ProgressReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ export class ProgressReporter implements Reporter {

if (entry.data && entry.data.schedulerRun) {
this.startTime = entry.data.schedulerRun.startTime;
const { targets } = entry.data.schedulerRun;

for (const target of targets) {
const task = this.taskReporter.addTask(target.label, true);
this.tasks.set(target.id, task);
}
}

if (entry.data && entry.data.status && entry.data.target) {
Expand Down
15 changes: 11 additions & 4 deletions packages/scheduler/src/SimpleScheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,17 @@ export class SimpleScheduler implements TargetScheduler<WorkerResult> {

const { continueOnError, logger, shouldCache } = this.options;

const { pool, abortController } = this;

const { targets } = targetGraph;

logger.verbose("", {
schedulerRun: {
startTime,
targets: [...targets.values()].filter((t) => !t.hidden).map((t) => ({ id: t.id, label: t.label })),
},
});

const { pool, abortController } = this;

const { targets } = targetGraph;

for (const target of targets.values()) {
let targetRun: WrappedTarget;

Expand Down Expand Up @@ -260,6 +261,12 @@ export class SimpleScheduler implements TargetScheduler<WorkerResult> {
await Promise.all(promises);
}

logTargets() {
this.options.logger.verbose("", {
targets: [...this.targetRuns.values()].map((t) => ({ id: t.target.id, label: t.target.label })),
});
}

logProgress() {
const targetRunByStatus = categorizeTargetRuns(this.targetRuns.values());
const total = [...this.targetRuns.values()].filter((t) => !t.target.hidden).length;
Expand Down