Repository navigation
How to disable performance report enabled in #36077 #36597
Replies: 3 comments 2 replies
|
To disable the performance report in your CI, just override the GitHub Actions variable by adding GITHUB_STEP_SUMMARY: '' to your workflow step: - name: Run E2E Tests
env:
GITHUB_STEP_SUMMARY: ''
run: npx nx run-many -t e2eIf you also want to hide the Nx Cloud recommendations from the console output, add this variable: NX_NO_CLOUD=true |
|
There is no native flag as of 23.1.1 — // packages/nx/src/tasks-runner/run-command.ts, createLifeCycles()
if (process.env.NX_PERF_LOGGING === 'true') { lifeCycles.push(new TaskTimingsLifeCycle()) }
if (process.env.NX_PROFILE) { lifeCycles.push(new TaskProfilingLifeCycle(process.env.NX_PROFILE)) }
lifeCycles.push(new PerformanceLifeCycle(taskGraph, { skipNxCache, nxJson })); // no gateThe two lifecycles above it are env-gated; this one isn't. What's more useful is that the report has three separate output surfaces with different gates, and that's what decides which of your remaining complaints is fixable today. All in 1. The GitHub job summary markdown — the const summaryPath = process.env.GITHUB_STEP_SUMMARY;
if (
process.env.GITHUB_ACTIONS !== 'true' ||
!summaryPath ||
process.env.NX_TASK_TARGET_PROJECT
) {
return;
}2. The console print — ungated, in a export function flushPerformanceReport(): void {
...
console.log(formatReport(summary));
writePerformanceReportToGitHubActions(summary);
}3. The TUI exit popup: export function getPerformanceReport(taskCount: number) {
if (!isTuiEnabled() || taskCount <= 1) { return undefined }
return getPerformanceSummaryPayload() ?? undefined;
}Two things follow from that, and both are worth knowing before you spend time on it.
So your For the recommendations block, export function isNxCloudDisabled(nxJson: NxJsonConfiguration): boolean {
return process.env.NX_NO_CLOUD === 'true' || nxJson.neverConnectToCloud;
}The env var and If you do file the Verified against |
|
With multiple jobs this causes a flood of potentially irrelevant summaries making the GH Actions feature a bit useless. Haven't checked, but the workaround might suppress summaries generated by the scripts run through NX within that invocation/step. It's also quite cryptic |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I get quite lengthy markdown dump on each e2e run in CI which mixes in between my own messages which present links to reports. It causes confusion. Is there any way of disabling this feature via env variables or nx flags?
All reactions