Skip to content

Do not print duplicate error messages to stdout. #1468

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

Merged
merged 2 commits into from
Jan 18, 2019
Merged

Conversation

yifanyang
Copy link
Contributor

The issue with regard to lerna duplicating error messages was resolved recently. With this lerna option '--stream', lerna will output the same error message only once.

See the comparison below. In below demonstrations, I manually added a case that is meant to fail in firestore sdk test:

  1. error message without this change: code change, travis logs
  2. error message with this change: code change, traivs logs

Please check how the same error output are duplicated 4 times in the previous way:

  • messages printed by mocha;
  • messages printed by lerna (prefixed with "lerna ERR!");
  • messages printed by lerna (in the "Error" filed of the error object at the end of the log);
  • messages printed by lerna (in the "stdout" field of the error object at the end of the log).

@mikelehen
Copy link
Contributor

Sounds good to me, but I'll defer to Fei to officially approve. Thanks!

@yifanyang
Copy link
Contributor Author

Sure. Thanks! I invited both of you since I think this should be helpful to firestore most, as firestore generates much more (usually thousands of) lines of log than other sdks. The duplication would cause a big confusion in such case.

@mikelehen
Copy link
Contributor

Yeah, I just want to defer to Fei since upgrading lerna from 2.x to 3.x could have other impacts on the repo and he's the person to sign off on that. :-)

@mikelehen mikelehen removed their assignment Jan 10, 2019
@Feiyang1
Copy link
Member

Lerna 3 doesn't have any breaking change that affects us, so it should be fine.

@yifanyang
Copy link
Contributor Author

Tested both with and without the --stream option. Looks like the explicit --stream is necessary for lerna to not duplicate logs.

@yifanyang yifanyang merged commit 580c53c into master Jan 18, 2019
@yifanyang yifanyang deleted the yifany/log branch January 18, 2019 18:32
@firebase firebase locked and limited conversation to collaborators Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants