Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty-print error output if a command failed in parallel mode #57

Closed
Inkdpixels opened this issue Nov 20, 2017 · 6 comments
Closed

Pretty-print error output if a command failed in parallel mode #57

Inkdpixels opened this issue Nov 20, 2017 · 6 comments

Comments

@Inkdpixels
Copy link

If you execute a command in a lot of your packages and it failed in one of them, the error output might not be completely visible which creates more effort for the developer since he has to cd into the failed package and re-run the command again to see the full output.

It would be cool if the whole output of the failed command would be printed after the summary.

@guigrpa
Copy link
Owner

guigrpa commented Nov 20, 2017

It's true, and something I've encountered myself, but I don't have a clear solution to that — in the more general case, each parallel thread may be infinite (e.g. watching over N parallel compilations). In such a case, the error can also be hidden.

For your particular case, you may consider running in non-parallel mode?

@Inkdpixels
Copy link
Author

@guigrpa meh, running in non-parallel mode would slow down the CI pipeline a lot, don't you think there is some possibility to print the error logs after all processes have been finished? Of course that doesn't take infinite processes into account, but those are mostly dev scripts anyway aren't they? :)

Anyway thanks for getting back to me so fast! Really appreciated! ❤️

@guigrpa
Copy link
Owner

guigrpa commented Nov 24, 2017

I'll figure out something and keep you posted.

You say you're using parallel mode in CI? No problems with the logs? I don't remember exactly how they looked like in e.g. the Travis console, but I guess quite messy, right? What's your experience?

@Inkdpixels
Copy link
Author

@guigrpa Yep, IMO the logs are fine, except for the errors, that's why I created this issue. It would also be awesome if each printed log would have a package prefix like Lerna has implemented but that's another issue to open up I guess 😄

@guigrpa
Copy link
Owner

guigrpa commented Nov 24, 2017

Please check out v1.2.1, just published, and tell me what you think!

@guigrpa guigrpa closed this as completed Nov 24, 2017
@guigrpa
Copy link
Owner

guigrpa commented Nov 24, 2017

Just a note: error messages are reprinted at the end when running in --parallel and also logging in parallel. It doesn't make sense to dump stderr again when the --no-parallel-logs is set, since the error is well visible.

I also added prefixes to the logs when running in --parallel with --no-parallel-logs, to simplify attribution.

guigrpa added a commit that referenced this issue Jan 29, 2018
* 'master' of https://github.com/guigrpa/oao: (21 commits)
  v1.2.1
  Update snapshots
  Remove subpackage prefix in logs generated with `oao all` and `oao run-script` when not running in parallel
  v1.2.0
  De-lint
  In parallel mode, re-print the whole stderr contents at the end in case of error (#57).
  Add subpackage prefix to all logs in `oao all` and `oao run-script` (related to #57)
  Update readme
  Add stable Node to travis
  v1.1.0
  Fix flow errors
  Update changelog
  Add `--tree` to `oao all` and `oao run-script` (follows dependency tree, starting with the tree leaves and going upwards) (closes issue #58).
  Add --tree to oao all and oao run-script
  Support multi-root graph
  Minor
  Add DAG calculation
  Add constants.js
  Minor
  Make jest config less verbose
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants