nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.52k stars 2.34k forks source link

nx: `task-runner#run-command` always ignores `outputStyle` on CI #15570

Open Hotell opened 1 year ago

Hotell commented 1 year ago

Current Behavior

CI=true nx run-many --target=test --output-style=dynamic

output-style arg is ignored (doesn't work).

This is caused by exiting early if env is on CI https://github.com/nrwl/nx/blob/16ad3086be4ff7c0174b518384428d11e2c4dfaa/packages/nx/src/tasks-runner/run-command.ts#L356

Expected Behavior

output-style should work within any environment.

In particular we need this to mirror lage behaviours if needed to gather data of particular task execution times.

lage output (in non verbose mode)

image

GitHub Repo

No response

Steps to Reproduce

  1. setup simple nx repo (using yarn)
  2. add at least 1 project that has test target defined
  3. run CI=true nx run-many --target=test --output-style=dynamic

Nx Report

I cannot provide report :) because of following

image
manual report:
nx 15.8.6
node 16.16
os: osx

Failure Logs

No response

Additional Information

No response

AgentEnder commented 1 year ago

Hey @Hotell! I'll discuss this with some other team members and get back to you.

LeoCaprile commented 12 months ago

having the same problem, in CI I only want to render the same as I have in the terminal on local environment

local: image

on CI: image

doesn't even add color. :(

Any update on this?

AgentEnder commented 11 months ago

As an update on this, the issues with nx report have been fixed, a lot of CI systems don't support dynamic terminal outputs super well when things get rewritten in the history.

LeoCaprile commented 11 months ago

As an update on this, the issues with nx report have been fixed, a lot of CI systems don't support dynamic terminal outputs super well when things get rewritten in the history.

Thanks!

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it hasn't had any activity for 6 months. Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore. If at this point, this is still an issue, please respond with updated information. It will be closed in 21 days if no further activity occurs. Thanks for being a part of the Nx community! 🙏

Hotell commented 5 months ago

a lot of CI systems don't support dynamic terminal outputs super well when things get rewritten in the history.

@AgentEnder True that but I think having possibility to output only non verbose version without the same terminal rewrites as present on local machine is a valuable feature to have ( lage has this )

Hotell commented 1 month ago

any updates on this @AgentEnder ? this relates a bit to following feature request https://github.com/nrwl/nx/issues/15570

would love to hear your thoughts. ty