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

[v9.x backport] assert: fix diff color output #21154

Closed
wants to merge 1 commit into from
Closed

[v9.x backport] assert: fix diff color output #21154

wants to merge 1 commit into from

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Jun 5, 2018

Original PR: 19464

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

The color output was broken at some point and that was not detected
because it was not tested for properly so far. This makes sure the
colors work again and it adds a regression test as well.

PR-URL: #19464
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@nodejs-github-bot nodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. v9.x labels Jun 5, 2018
@targos
Copy link
Member

targos commented Jun 6, 2018

@ryzokuken ryzokuken added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 10, 2018
@ryzokuken
Copy link
Contributor

@targos the rerun passed, right? Why didn't the GH interface update? Rerunning the full CI just to make sure.

That said, I hope the PR contents are ready to be merged, given that you've approved them?

@ryzokuken
Copy link
Contributor

@ryzokuken
Copy link
Contributor

LinuxOne failed? Lemme check if was a flake, it has to be.

@ryzokuken
Copy link
Contributor

The failure, BTW.

-------------------------------------------------- label=rhel72-s390x --------------------------------------------------
URL        https://ci.nodejs.org/job/node-test-commit-linuxone/label=rhel72-s390x/2093/console
Reason
  not ok 481 parallel/test-eslint-require-buffer
    ---
    duration_ms: 0.862
    severity: fail
    exitcode: 1
    stack: |-
      /data/iojs/build/workspace/node-test-commit-linuxone/label/rhel72-s390x/tools/node_modules/eslint/lib/testers/rule-tester.js:148
              throw err;
              ^

      AssertionError [ERR_ASSERTION]: 'Use const { Buffer } = require(\'buffer\'); at the beginning of this file' === 'Use const Buffer = require(\'buffer\').Buffer; at the beginning of this file' ('Use const { Buffer } = require(\'buffer\'); at the beginning of this file' === 'Use const Buffer = require(\'buffer\').Buffer; at the beginning of this file')
          at assertMessageMatches (/data/iojs/build/workspace/node-test-commit-linuxone/label/rhel72-s390x/tools/node_modules/eslint/lib/testers/rule-tester.js:442:24)
          at testInvalidTemplate (/data/iojs/build/workspace/node-test-commit-linuxone/label/rhel72-s390x/tools/node_modules/eslint/lib/testers/rule-tester.js:494:29)
          at Function.RuleTester.it (/data/iojs/build/workspace/node-test-commit-linuxone/label/rhel72-s390x/tools/node_modules/eslint/lib/testers/rule-tester.js:581:25)
          at Function.itDefaultHandler (/data/iojs/build/workspace/node-test-commit-linuxone/label/rhel72-s390x/tools/node_modules/eslint/lib/testers/rule-tester.js:143:23)
          at test.invalid.forEach.invalid (/data/iojs/build/workspace/node-test-commit-linuxone/label/rhel72-s390x/tools/node_modules/eslint/lib/testers/rule-tester.js:580:32)
          at Array.forEach (<anonymous>)
          at Function.RuleTester.describe (/data/iojs/build/workspace/node-test-commit-linuxone/label/rhel72-s390x/tools/node_modules/eslint/lib/testers/rule-tester.js:579:30)
          at Function.describeDefaultHandler (/data/iojs/build/workspace/node-test-commit-linuxone/label/rhel72-s390x/tools/node_modules/eslint/lib/testers/rule-tester.js:160:19)
          at Function.RuleTester.describe (/data/iojs/build/workspace/node-test-commit-linuxone/label/rhel72-s390x/tools/node_modules/eslint/lib/testers/rule-tester.js:578:24)
          at Function.describeDefaultHandler (/data/iojs/build/workspace/node-test-commit-linuxone/label/rhel72-s390x/tools/node_modules/eslint/lib/testers/rule-tester.js:160:19)
    ...

@ryzokuken
Copy link
Contributor

@ryzokuken
Copy link
Contributor

ryzokuken commented Jun 10, 2018

Okay, so the rebuild failed again.

@codebytere maybe there's something wrong with the code. Could you take a look? Look if there are any buffer requires that got chopped up and are now failing on us.

P.S. This still looks a lot like a flake tbqh because it's not failing on any other platforms (it should've if it were real, right?) but let's still check.

@codebytere
Copy link
Member Author

@ryzokuken yes, looking now!

@ryzokuken
Copy link
Contributor

@codebytere wait a second, why are we still backporting to v9.x?

@codebytere
Copy link
Member Author

codebytere commented Jun 10, 2018

@ryzokuken i was actually unsure about this, i wasn't sure if you were only backporting security fixes to 9.x but it was labeled backport-requested so ¯\(ツ)

@apapirovski
Copy link
Member

apapirovski commented Jun 10, 2018

@codebytere I think those are old at this point. I would just go straight to 8.x and ignore the 9.x requests. (This particular one probably doesn't land on 8.x since I think we introduced the colour code in 9.x?)

@ryzokuken
Copy link
Contributor

@codebytere v9.x is in maintenance, so I don't think we need to. v9.x reaches EOL within June anyway.

@ryzokuken
Copy link
Contributor

Plus I ran a silent rerun, it failed again. This might involve more work than anticipated anyway.

@codebytere
Copy link
Member Author

Sounds good to me, closing this out in that case. For future backports, would be be more helpful for me to focus on LTS or current?

@codebytere codebytere closed this Jun 10, 2018
@codebytere codebytere deleted the backport-19464-to-v9.x branch June 10, 2018 19:28
@ryzokuken
Copy link
Contributor

Yeah, make sure to make PRs for active releases only (LTSes are helpful because they're active for a longer duration) and try to get people to merge them as soon as possible if you can. I tend to keep pinging people here or on chat, which seems to work pretty well. Doing this would ensure that none of your effort goes to waste 😅.

Again, thanks for the work you put in and sorry this couldn't be merged.

@richardlau
Copy link
Member

Saw this after glancing through the #node-build logs. To follow up re. the failing test:

 not ok 481 parallel/test-eslint-require-buffer
...
      AssertionError [ERR_ASSERTION]: 'Use const { Buffer } = require(\'buffer\'); at the beginning of this file' === 'Use const Buffer = require(\'buffer\').Buffer; at the beginning of this file' ('Use const { Buffer } = require(\'buffer\'); at the beginning of this file' === 'Use const Buffer = require(\'buffer\').Buffer; at the beginning of this file')

On master test-eslint-require-buffer was broken for a long time in a similar way but wasn't noticed because the eslint tests were not actually being run. This was fixed as part of #20372.

My guess, without digging into the commit history, is that there's probably a PR or two that would need to be backported but probably isn't worth it for v9.x. I don't know why it would only fail on one platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. errors Issues and PRs related to JavaScript errors originated in Node.js core.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants