Capture npm output written to stderr in lint_fuzzer_sanity* Evergreen tasks

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      (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

            Assignee:
            Alex Neben
            Reporter:
            Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: