[SERVER-73308] Capture npm output written to stderr in lint_fuzzer_sanity* Evergreen tasks Created: 13/Jan/23  Updated: 29/Oct/23  Resolved: 25/Jan/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Alex Neben
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-65581 Errors reported from ESLint/ClangTidy... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

(I'm filing this as a TIG ticket because after discussing with Xander the change will likely be made in npm_run.py rather than needing to be made in lint_fuzzer_sanity_all.sh and lint_fuzzer_sanity_patch.sh.)

This lint_fuzzer_sanity_patch Evergreen task failed but the logs for the test failure are unhelpful in that they only capture the output which was written to stdout.

The actual error was written to stderr by node and therefore is only captured in the task log. It would be more beneficial to surface the output from both stdout and stderr in the logs for the test failure.

[2023/01/05 18:55:07.302] $PYTHON src/scripts/npm_run.py "$@"
[2023/01/05 18:55:07.302] /data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/src/libfuzz/parser.ts:25
[2023/01/05 18:55:07.302]     const error = new SyntaxError(errMsg + '\n' + e.message);
[2023/01/05 18:55:07.302]                   ^
[2023/01/05 18:55:07.302] SyntaxError: Failed to parse column 4 of the following lines:
[2023/01/05 18:55:07.302] try {
[2023/01/05 18:55:07.302]     eval = kLdapUserCacheRefreshInterval;
[2023/01/05 18:55:07.302] } catch (e) {
[2023/01/05 18:55:07.302] This is likely a limitation of the fuzzer and not an issue with the JavaScript test.
[2023/01/05 18:55:07.302] Please reach out to the STM team via the #server-tig Slack channel for assistance.
[2023/01/05 18:55:07.302] Assigning to eval in strict mode (3852:4)
[2023/01/05 18:55:07.302]     at prepareSyntaxError (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/src/libfuzz/parser.ts:25:19)
[2023/01/05 18:55:07.302]     at Object.parse (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/src/libfuzz/parser.ts:49:15)
[2023/01/05 18:55:07.302]     at parseAndCheck (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/src/scripts/parse_jsfiles.js:9:9)
[2023/01/05 18:55:07.302]     at main (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/src/scripts/parse_jsfiles.js:29:5)
[2023/01/05 18:55:07.302]     at Object.<anonymous> (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/src/scripts/parse_jsfiles.js:34:5)
[2023/01/05 18:55:07.302]     at Module._compile (node:internal/modules/cjs/loader:1155:14)
[2023/01/05 18:55:07.302]     at Module.m._compile (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/ts-node/src/index.ts:439:23)
[2023/01/05 18:55:07.302]     at Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
[2023/01/05 18:55:07.302]     at Object.require.extensions.<computed> [as .js] (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/ts-node/src/index.ts:442:12)
[2023/01/05 18:55:07.302]     at Module.load (node:internal/modules/cjs/loader:1033:32)
[2023/01/05 18:55:07.302] SyntaxError: Assigning to eval in strict mode (3852:4)
[2023/01/05 18:55:07.302]     at Parser.pp$4.raise (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/acorn/dist/acorn.js:3459:15)
[2023/01/05 18:55:07.302]     at Parser.pp$7.checkLValSimple (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/acorn/dist/acorn.js:2134:16)
[2023/01/05 18:55:07.302]     at Parser.pp$7.checkLValPattern (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/acorn/dist/acorn.js:2185:12)
[2023/01/05 18:55:07.302]     at Parser.pp$5.parseMaybeAssign (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/acorn/dist/acorn.js:2491:16)
[2023/01/05 18:55:07.302]     at Parser.pp$5.parseExpression (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/acorn/dist/acorn.js:2441:21)
[2023/01/05 18:55:07.302]     at Parser.pp$8.parseStatement (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/acorn/dist/acorn.js:950:47)
[2023/01/05 18:55:07.302]     at Parser.pp$8.parseBlock (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/acorn/dist/acorn.js:1236:23)
[2023/01/05 18:55:07.302]     at Parser.pp$8.parseTryStatement (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/acorn/dist/acorn.js:1139:23)
[2023/01/05 18:55:07.302]     at Parser.pp$8.parseStatement (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/acorn/dist/acorn.js:911:36)
[2023/01/05 18:55:07.302]     at Parser.pp$8.parseTopLevel (/data/mci/bcf89f4c50be43fa205ed769955c456b/src/jstestfuzz/node_modules/acorn/dist/acorn.js:817:23)

https://parsley.mongodb.com/evergreen/mongodb_mongo_master_enterprise_rhel_80_64_bit_dynamic_all_feature_flags_required_security_patch_only_lint_fuzzer_sanity_patch_patch_7c6e28156acb53591db35dfb24f28151903fc57e_63b715f161837d672d740def_23_01_05_18_27_38/0/task?bookmarks=0,646&selectedLine=389



 Comments   
Comment by Githook User [ 08/Feb/23 ]

Author:

{'name': 'Alexander Neben', 'email': 'alexander.neben@mongodb.com', 'username': 'IamXander'}

Message: SERVER-73308 Added better test output to jstestfuzz tests
Branch: master
https://github.com/mongodb/mongo/commit/c152b3939471a48a8ddd32f06280763cde746a78

Generated at Thu Feb 08 06:24:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.