| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
|
If you push the artificial error to your branch, we could try running a node-stress-single-test CI with a single run to validate how Jenkins would parse the test failure. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Unfortunately, the Jenkins output is still not great and doesn't show the actual failure: https://ci.nodejs.org/job/node-stress-single-test/479/nodes=rhel8-x64/testReport/junit/(root)/parallel/test_runner_cli_concurrency/ EDIT: see comments below, that's not actually related to node:test, wrong assumption on my end. |
Sorry, something went wrong.
|
Interesting. Do you know how that is rendered. I was targeting the output in https://ci.nodejs.org/job/node-stress-single-test/479/nodes=rhel8-x64/console, which does look much better. But it would be nice to fix https://ci.nodejs.org/job/node-stress-single-test/479/nodes=rhel8-x64/testReport/junit/(root)/parallel/test_runner_cli_concurrency/. |
Sorry, something went wrong.
|
It looks like Jenkins cuts the "stacktrace" when it encounters stack: |- – maybe because it thinks it's a substack? I honestly don't know, I can try to look around if they have any documentation around that behavior. |
Sorry, something went wrong.
|
Is this just a general problem not related to the use of node:test? Looking at https://ci.nodejs.org/job/node-test-commit-linux-containered/42211/#showFailuresLink, I see 9 failures, and I don't think any of those tests use node:test. All of them look like this: fail (1) --- duration_ms: 815.156 exitcode: 1 severity: fail ... EDIT: This seems to be related to tap2junit I think. |
Sorry, something went wrong.
I think that's a tap2junit issue? Those Jenkins pages used to have the failure output in the "Stacktrace" box. |
Sorry, something went wrong.
There was a problem hiding this comment.
Overall LGTM, I think this would be a nice addition
Sorry, something went wrong.
There was a problem hiding this comment.
Why not yield the values directly, instead of having the output value?
Sorry, something went wrong.
|
Now that nodejs/tap2junit#54 has landed, what are the next steps to seeing it working in Jenkins? |
Sorry, something went wrong.
|
it needs to be released and the updated in all the ci machines CC @nodejs/build @cclauss |
Sorry, something went wrong.
|
@cjihrig nodejs/build#3761 is now deployed. should this PR be closed? |
Sorry, something went wrong.
|
Unsure. That PR was blocking me from evaluating this PR in the CI to see if it could be beneficial. |
Sorry, something went wrong.
|
So this still doesn't seem to work with the view in https://ci.nodejs.org/job/node-stress-single-test/514/nodes=rhel8-x64/testReport/junit/(root)/parallel/test_runner_cli_concurrency/, and I don't know what needs to happen to appease tap2junit (both with and without the change in this PR). The console output (shown in the OP) is still significantly better IMO. |
Sorry, something went wrong.
This commit introduces a node:test reporter to the common utils. This reporter can be used to silence output other than errors from node:test. This is useful because in Node's own test suite, the output of node:test is included in the output of the Python test runner. Refs: nodejs#49120
|
@MoLow I'm interested in replacing the spec reporter with the less verbose one from this PR inside of GitHub Actions runs. However, it looks like the GitHub reporter is also sending output to stdout: ::debug::starting to run default concurrency
::debug::completed running default concurrency
::debug::starting to run concurrency of one
::debug::completed running concurrency of one
::debug::starting to run concurrency of two
::error title=concurrency of two,file=test/parallel/test-runner-cli-concurrency.js,line=26,col=9::[Error [ERR_TEST_FAILURE]: bye] {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: Error: bye
at TestContext.<anonymous> (/home/runner/work/node/node/test/parallel/test-runner-cli-concurrency.js:26:9)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:931:25)
at Test.processPendingSubtests (node:internal/test_runner/test:629:18)
at Test.postRun (node:internal/test_runner/test:1042:19)
at Test.run (node:internal/test_runner/test:970:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:629:7)
}
Is it possible to leverage the GitHub reporter for its annotations without it also logging things? |
Sorry, something went wrong.
Codecov ReportAll modified and coverable lines are covered by tests ✅ Additional details and impacted files @@ Coverage Diff @@
## main #52189 +/- ##
==========================================
+ Coverage 88.04% 88.54% +0.50%
==========================================
Files 657 657
Lines 190290 190290
Branches 36245 36540 +295
==========================================
+ Hits 167536 168488 +952
+ Misses 15893 14971 -922
+ Partials 6861 6831 -30 |
Sorry, something went wrong.
|
Sigh. It looks like the GitHub Actions toolkit writes directly to process.stdout, and I don't think there is a way to avoid that. actions/toolkit#1743 appears to be trying to do exactly what I'd like to do. |
Sorry, something went wrong.
|
@JakobJingleheimer this might be something of interest to you. |
Sorry, something went wrong.
|
Awesome, this is a great idea! Do you need/want help finishing it? |
Sorry, something went wrong.
|
Help would definitely be welcomed. There are a few things left:
|
Sorry, something went wrong.
I'd like to help with this
About the first two I'm not sure what we can do to get the consensus
About this one I found an issue that suggests some collaborators don't think the fail fast option should be included, so not sure if we want to do this. Lmk however I can help. |
Sorry, something went wrong.
I would just open a PR with the proposed changes (or push the changes to this PR) and see how it is received. People have actively requested this.
That discussion is about including a fail fast mode in the test runner itself. While that is something I am supportive of adding, that is not really relevant here. This is more about combining this userland reporter with the reporter in this PR, but making it configurable via something like an environment variable. |
Sorry, something went wrong.
Cool, I'll make that. I guess I can add if (process.env.FAIL_FAST) {
yield `\n\u001b[31m✖ Bailing on failed test: ${event.data.name}\u001b[0m\n`;
throw new Error('Bail');
}Any better naming? |
Sorry, something went wrong.
|
That name sounds fine to me. This is also something that is only available internally to Node core, so it can be iterated on a bit more freely. |
Sorry, something went wrong.
|
Closing this since #56438 landed with these changes. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Opening as a draft to determine if this is a desirable change.
This commit introduces a node:test reporter to the common utils. This reporter can be used to silence output other than errors from node:test. This is useful because in Node's own test suite, the output of node:test is included in the output of the Python test runner.
Refs: #49120
A comparison of output before and after this change is shown below. The TAP reporter is shown for the current output. The output is generated by ./tools/test.py test/parallel/test-runner-cli-concurrency.js with an artificial error introduced.
Before:
=== release test-runner-cli-concurrency === Path: parallel/test-runner-cli-concurrency TAP version 13 # Subtest: default concurrency ok 1 - default concurrency --- duration_ms: 74.002459 ... # Subtest: concurrency of one ok 2 - concurrency of one --- duration_ms: 190.883208 ... # Subtest: concurrency of two not ok 3 - concurrency of two --- duration_ms: 125.033667 location: '/redacted/test/parallel/test-runner-cli-concurrency.js:23:1' failureType: 'testCodeFailure' error: 'bye' code: 'ERR_TEST_FAILURE' stack: |- TestContext.<anonymous> (/redacted/test/parallel/test-runner-cli-concurrency.js:27:9) Test.runInAsyncScope (node:async_hooks:206:9) Test.run (node:internal/test_runner/test:702:25) Test.processPendingSubtests (node:internal/test_runner/test:439:18) Test.postRun (node:internal/test_runner/test:807:19) Test.run (node:internal/test_runner/test:751:12) async Test.processPendingSubtests (node:internal/test_runner/test:439:7) ... 1..3 # tests 3 # suites 0 # pass 2 # fail 1 # cancelled 0 # skipped 0 # todo 0 # duration_ms 396.478041After:
=== release test-runner-cli-concurrency === Path: parallel/test-runner-cli-concurrency Test failure: 'concurrency of two' Location: test/parallel/test-runner-cli-concurrency.js:23:1 Error: bye at TestContext.<anonymous> (/redacted/test/parallel/test-runner-cli-concurrency.js:27:9) at Test.runInAsyncScope (node:async_hooks:206:9) at Test.run (node:internal/test_runner/test:702:25) at Test.processPendingSubtests (node:internal/test_runner/test:439:18) at Test.postRun (node:internal/test_runner/test:807:19) at Test.run (node:internal/test_runner/test:751:12) at async Test.processPendingSubtests (node:internal/test_runner/test:439:7)