Skip to content

Conversation

@matejchalk
Copy link
Collaborator

@matejchalk matejchalk commented Nov 24, 2025

After reviewing how our CI logs look with the new Logger, I decided some further improvements are needed to make them readable.

The new way of logging executed processes nicely formats external tools, but when the CI package logs code-pushup commands this way, it introduces too much nesting. This also breaks log group rendering.

Furthermore, I realized a single verbose flag for everything isn't the best in this case. The CI doesn't log almost anything without enabling CP_VERBOSE, because most of the interesting output is from the code-pushup commands (e.g., report summary). However, verbose shouldn't be needed by default, as it introduces too much noise (e.g., all passed audits).

My solution is to disable the default process logging in the CI package, and use some new low-level utilities to print code-pushup output as soon as it's received (don't have to wait for everything to complete before seeing progress), with spaces via line breaks instead of indentation and gray color. By default, the output is printed, regardless of CP_VERBOSE. To silence the code-pushup command output specifically, I've introduced an optional silent flag.

For all other executeProcess calls, the logs look the same as before.

@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 utils 🧩 ci labels Nov 24, 2025
@nx-cloud
Copy link

nx-cloud bot commented Nov 24, 2025

View your CI Pipeline Execution ↗ for commit ff64ed9

Command Status Duration Result
nx code-pushup --nx-bail -- compare ✅ Succeeded 59s View ↗
nx code-pushup --nx-bail -- ✅ Succeeded 1m 8s View ↗
nx code-pushup --nx-bail -- print-config --outp... ✅ Succeeded 5m 21s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-26 09:50:07 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 24, 2025

Open in StackBlitz

@code-pushup/ci

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/ci@1152

@code-pushup/cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/cli@1152

@code-pushup/core

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/core@1152

@code-pushup/create-cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/create-cli@1152

@code-pushup/models

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models@1152

@code-pushup/nx-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1152

@code-pushup/axe-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/axe-plugin@1152

@code-pushup/coverage-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/coverage-plugin@1152

@code-pushup/js-packages-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/js-packages-plugin@1152

@code-pushup/eslint-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/eslint-plugin@1152

@code-pushup/jsdocs-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/jsdocs-plugin@1152

@code-pushup/lighthouse-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/lighthouse-plugin@1152

@code-pushup/typescript-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/typescript-plugin@1152

@code-pushup/utils

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/utils@1152

@code-pushup/models-transformers

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models-transformers@1152

commit: ff64ed9

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 4ea2a25 with previous commit eb876a8.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 39 🔴 32 ↓ −6.4
Code coverage 🟡 89 🟡 89 ↑ +0.1
Documentation 🔴 35 🔴 35 ↑ +0.1
Security 🔴 43 🔴 43
Updates 🟡 71 🟡 71
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟢 92 🟢 92
Type Safety 🟢 100 🟢 100
Bug prevention 🟢 100 🟢 100
Miscellaneous 🟢 100 🟢 100
Code style 🟢 100 🟢 100
👍 2 groups improved, 👎 1 group regressed, 👍 5 audits improved, 👎 5 audits regressed, 13 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 39 🔴 32 ↓ −6.4
Code coverage Code coverage metrics 🟡 89 🟡 89 ↑ +0.1
JSDoc coverage Documentation coverage 🔴 35 🔴 35 ↑ +0.1

20 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Initial server response time was short 🟥 Root document took 610 ms 🟩 Root document took 560 ms ↓ −8.3 %
Lighthouse Speed Index 🟥 6.4 s 🟥 7.9 s ↑ +24 %
Lighthouse Total Blocking Time 🟥 1,360 ms 🟥 3,060 ms ↑ +124.9 %
Lighthouse First Contentful Paint 🟥 3.0 s 🟥 3.1 s ↑ +4.6 %
Lighthouse Time to Interactive 🟥 12.7 s 🟥 13.6 s ↑ +7.3 %
JSDoc coverage Types coverage 🟥 238 undocumented types 🟥 238 undocumented types  +0 %
Code coverage Branch coverage 🟨 87.1 % 🟨 87.3 % ↑ +0.2 %
Code coverage Function coverage 🟩 90.2 % 🟩 90.3 % ↑ +0.1 %
JSDoc coverage Functions coverage 🟥 554 undocumented functions 🟥 557 undocumented functions ↑ +0.5 %
Code coverage Line coverage 🟨 85.3 % 🟨 85.3 % ↑ +0.1 %
Lighthouse Minimizes main-thread work 🟥 10.9 s 🟥 16.2 s ↑ +48.9 %
Lighthouse JavaScript execution time 🟥 4.7 s 🟥 5.9 s ↑ +27 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +7.3 %
Lighthouse Largest Contentful Paint 🟥 11.1 s 🟥 11.9 s ↑ +7.5 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,020 KiB 🟩 Total size was 2,020 KiB ↓ −0.1 %
Lighthouse Max Potential First Input Delay 🟥 1,270 ms 🟥 1,670 ms ↑ +31.7 %
Lighthouse Uses efficient cache policy on static assets 🟨 30 resources found 🟨 30 resources found ↓ −0.1 %
Lighthouse Server Backend Latencies 🟩 1,110 ms 🟩 870 ms ↓ −21.7 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 104 KiB 🟥 Potential savings of 73 KiB ↓ −33.3 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 184 KiB 🟥 Potential savings of 161 KiB ↑ +16.5 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 83 KiB 🟥 Potential savings of 81 KiB ↑ +50 %
Lighthouse Network Round Trip Times 🟩 20 ms 🟩 20 ms ↓ −10.2 %
JS Packages Outdated NPM prod dependencies. 🟨 17 outdated package versions (7 major, 7 minor, 3 patch) 🟨 18 outdated package versions (7 major, 8 minor, 3 patch) ↑ +5.9 %

655 other audits are unchanged.

@matejchalk matejchalk marked this pull request as ready for review November 26, 2025 09:32
Copy link
Collaborator

@hanna-skryl hanna-skryl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see the log group rendering fixed 👍 I wonder if there is a specific reason some JSON logs have remained non-collapsible.

@matejchalk
Copy link
Collaborator Author

I wonder if there is a specific reason some JSON logs have remained non-collapsible.

I'm guessing you mean the npm commands with large JSON output? That's the raw process output, which is meant to be printed underneath the spinner with indentation, as you see. But it shouldn't be logged by default - only the command name, status, and duration are always logged. However, Michael hard-coded --verbose for all our code-pushup targets, which I'll be getting rid of in my next PR 😅

@matejchalk matejchalk merged commit d498d22 into main Nov 26, 2025
21 of 22 checks passed
@matejchalk matejchalk deleted the fix-ci-logs branch November 26, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧩 ci 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants