Skip to content

refactor(@angular-devkit/build-angular): mute internal reporters #11238

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 3 commits into from
Aug 14, 2018

Conversation

corinna000
Copy link
Contributor

when other reporters are configured

internal Karma reporters should suppress output when user-defined
reporters are configured to prevent extrananeous error reporting for
failed tests (from ng test)

other reporters are configured

internal Karma reporters should suppress output when user-defined
reporters are configured to prevent extrananeous error reporting for
failed tests
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@corinna000
Copy link
Contributor Author

Not sure how to fix the CLA issue since I used a different gmail account for the commit than I used to sign the CLA. Any tips?

other reporters are configured

internal Karma reporters should suppress output when user-defined
reporters are configured to prevent extrananeous error reporting for
failed tests
@corinna000
Copy link
Contributor Author

I guess I could:

  1. decline this pr
  2. make my changes to a brand new branch, verifying I have the right email configured in my git config
  3. resubmit

But I'll wait for a little guidance because I suspect this has happened before.

@clydin
Copy link
Member

clydin commented Jun 18, 2018

If you drop the first commit and squash the other two, the CLA check should be fine.

@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

@alexeagle alexeagle requested a review from clydin August 14, 2018 14:19
Copy link
Contributor

@filipesilva filipesilva left a comment

Choose a reason for hiding this comment

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

Great work on addressing this problem!

Also this is related to #11628

@filipesilva filipesilva added the target: patch This PR is targeted for the next patch release label Aug 14, 2018
@clydin clydin removed their request for review August 14, 2018 14:27
@alexeagle alexeagle merged commit f46869d into angular:master Aug 14, 2018
alexeagle pushed a commit that referenced this pull request Aug 14, 2018
)

* refactor(@angular-devkit/build-angular): mute internal reporters when
other reporters are configured

internal Karma reporters should suppress output when user-defined
reporters are configured to prevent extrananeous error reporting for
failed tests

* refactor(@angular-devkit/build-angular): mute internal reporters when
other reporters are configured

internal Karma reporters should suppress output when user-defined
reporters are configured to prevent extrananeous error reporting for
failed tests
@shairez
Copy link
Contributor

shairez commented Aug 21, 2018

Funny, that's the same PR as mine from the past -
#9529

I wonder what caused the regression there...

@corinna000 corinna000 deleted the suppress-reporter-output branch August 21, 2018 13:05
@corinna000
Copy link
Contributor Author

Sorry, @shairez ! Good developers copy, great developers steal. =)

@shairez
Copy link
Contributor

shairez commented Aug 21, 2018

LOL 😄

Pay attention though, that in these lines:

function muteDuplicateReporterLogging(context: any, config: any) {
  context.writeCommonMsg = function () { };
  const reporterName = '@angular/cli';
  const hasTrailingReporters = config.reporters.slice(-1).pop() !== reporterName;
   if (hasTrailingReporters) {
    context.writeCommonMsg = function () { };
  }
}

The first context.writeCommonMsg = function () { }; makes the rest pretty much useless.

It was meant to be "if the last reporter is the angular CLI one, remove the duplication"

So @filipesilva make sure you test it thoroughly and if it works with several different reporters, then you could remove the lines followed by context.writeCommonMsg = function () { };

If not, remove the first statement and change the reporter's name if it has changed.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants