зеркало из https://github.com/microsoft/lage.git
Fix profile reporter (#548)
* fixing profiler so that it will load correctly in the tracing UI * initialize hash * Change files
This commit is contained in:
Родитель
3ebdc50793
Коммит
b0f0b5a777
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "patch",
|
||||
"comment": "fixing profiler so that it will load correctly in the tracing UI",
|
||||
"packageName": "@lage-run/reporters",
|
||||
"email": "kchau@microsoft.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "patch",
|
||||
"comment": "fixing profiler so that it will load correctly in the tracing UI",
|
||||
"packageName": "@lage-run/scheduler",
|
||||
"email": "kchau@microsoft.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
|
@ -71,6 +71,6 @@ module.exports = {
|
|||
},
|
||||
npmClient: "yarn",
|
||||
cacheOptions: {
|
||||
environmentGlob: ["*.js", "*.json", ".github/**", "packages/tsconfig.lage2.json", "patches"],
|
||||
environmentGlob: ["beachball.config.js", "lage.config.js", "package.json", "renovate.json5", ".github/**", "packages/tsconfig.lage2.json", "patches"],
|
||||
},
|
||||
};
|
||||
|
|
|
@ -126,7 +126,7 @@ export class AdoReporter implements Reporter {
|
|||
? normalize(entry.msg)
|
||||
: normalize(getTaskLogPrefix(packageName ?? "<root>", task), entry.msg);
|
||||
return this.logStream.write(format(entry.level, normalizedArgs.prefix, colorFn("| " + normalizedArgs.message)));
|
||||
} else {
|
||||
} else if (entry?.msg.trim() !== "") {
|
||||
return this.logStream.write(format(entry.level, "", entry.msg));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -295,7 +295,8 @@ export class SimpleScheduler implements TargetScheduler {
|
|||
if (shouldRun) {
|
||||
await target.run();
|
||||
} else {
|
||||
target.status = "skipped";
|
||||
target.onStart(0);
|
||||
target.onSkipped();
|
||||
}
|
||||
} catch (e) {
|
||||
runError = e;
|
||||
|
|
|
@ -77,6 +77,7 @@ export class WrappedTarget implements TargetRun {
|
|||
|
||||
onStart(threadId: number) {
|
||||
if (this.status !== "running") {
|
||||
this.threadId = threadId;
|
||||
this.status = "running";
|
||||
this.startTime = process.hrtime();
|
||||
this.options.logger.info("", { target: this.target, status: "running", threadId });
|
||||
|
@ -109,7 +110,7 @@ export class WrappedTarget implements TargetRun {
|
|||
}
|
||||
}
|
||||
|
||||
onSkipped(hash: string | null) {
|
||||
onSkipped(hash?: string | undefined) {
|
||||
this.status = "skipped";
|
||||
this.duration = process.hrtime(this.startTime);
|
||||
this.options.logger.info("", {
|
||||
|
@ -123,7 +124,8 @@ export class WrappedTarget implements TargetRun {
|
|||
|
||||
async getCache() {
|
||||
const { cacheProvider, hasher } = this.options;
|
||||
let hash: string | null = null;
|
||||
|
||||
let hash: string | undefined = undefined;
|
||||
let cacheHit = false;
|
||||
|
||||
const { target, shouldCache, shouldResetCache } = this.options;
|
||||
|
|
Загрузка…
Ссылка в новой задаче