Skip to content

Conversation

lerouxb
Copy link
Contributor

@lerouxb lerouxb commented Jul 14, 2023

It looks like tests that were executing code straight in lib via child_process.spawn or similar (java-shell, some tests in cli-repl) were adding broken paths into the coverage. I've changed the .nycrc config to only instrument the .ts source files, not the lib files. This will probably drop our coverage because e2e tests won't count, but at least we should (hopefully) get sensible results for now.

I temporarily lowered the coverage threshold. We'll see once this runs what it should be.

Then I also split the coverage check from the reporting so that we can generate the report, then upload it, THEN possibly fail. That way we can download the report if coverage drops below the threshold.

Potential Future Work:

A better fix might be to try and generate coverage for the compiled and webpackaged mongosh properly and then have nyc use that or take that into consideration. Then we can get and add coverage for our e2e test too.

@addaleax
Copy link
Collaborator

I can't immediately see anything wrong while looking at the output from CI.

To quote myself from the tech design:

currently, at least some code from the async-rewriter2 and browser-runtime-core packages is misattributed and shows up in the coverage report twice

Expand output with some lines highlighted to show the problem
    [2023/07/12 03:28:18.458] ---------------------------------------|---------|----------|---------|---------|-------------------
    [2023/07/12 03:28:18.458] File                                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
    [2023/07/12 03:28:18.458] ---------------------------------------|---------|----------|---------|---------|-------------------
    [2023/07/12 03:28:18.458] All files                              |   73.97 |    65.35 |   71.08 |   83.31 |
    [2023/07/12 03:28:18.458]  autocompleter                         |   18.18 |        0 |       0 |   18.18 |
--> [2023/07/12 03:28:18.458]   shell-api-autocompleter.ts           |   18.18 |        0 |       0 |   18.18 | 9-29
    [2023/07/12 03:28:18.458]  compass                               |      50 |      100 |       0 |      50 |
    [2023/07/12 03:28:18.458]   compass-service-provider.ts          |      50 |      100 |       0 |      50 | 27-28
    [2023/07/12 03:28:18.458]  locales                               |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   de_DE.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   en_US.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  packages/arg-parser/src               |      94 |    87.32 |   91.22 |      94 |
    [2023/07/12 03:28:18.458]   arg-mapper.ts                        |    89.1 |       80 |   89.13 |    89.1 | ...96,225,286,299
    [2023/07/12 03:28:18.458]   uri-generator.ts                     |   98.98 |    92.18 |     100 |   98.98 | 278
    [2023/07/12 03:28:18.458]  packages/async-rewriter2/bin          |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   make-runtime-support.js              |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  packages/async-rewriter2/src          |   96.15 |    77.27 |   83.33 |   96.15 |
    [2023/07/12 03:28:18.458]   async-writer-babel.ts                |   95.23 |       75 |      80 |   95.23 | 95
    [2023/07/12 03:28:18.458]   error-codes.ts                       |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  packages/async-rewriter2/src/stages   |    97.5 |    94.77 |     100 |   97.82 |
--> [2023/07/12 03:28:18.458]   transform-maybe-await.ts             |   98.26 |    94.31 |     100 |   99.05 | 456
    [2023/07/12 03:28:18.458]   uncatchable-exceptions.ts            |    92.3 |    92.85 |     100 |      92 | 40-41
    [2023/07/12 03:28:18.458]   wrap-as-iife.ts                      |    98.3 |    97.67 |     100 |   98.11 | 111
    [2023/07/12 03:28:18.458]  packages/autocomplete/src             |   88.52 |    83.76 |   92.85 |   87.93 |
    [2023/07/12 03:28:18.458]   index.ts                             |   88.52 |    83.76 |   92.85 |   87.93 | ...69,311-312,315
    [2023/07/12 03:28:18.458]  packages/browser-repl/config          |     100 |    66.66 |     100 |     100 |
    [2023/07/12 03:28:18.458]   karma.conf.js                        |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   setup-test-browser.js                |     100 |    66.66 |     100 |     100 | 11-16
    [2023/07/12 03:28:18.458]   webpack.config.base.js               |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   webpack.config.test.js               |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  packages/browser-runtime-core/src     |      60 |     8.33 |      50 |      60 |
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   open-context-runtime.ts              |   57.14 |     8.33 |      40 |   57.14 | 54-63,82-92
    [2023/07/12 03:28:18.458]  ...ser-runtime-core/src/autocompleter |   81.81 |    66.66 |     100 |   81.81 |
--> [2023/07/12 03:28:18.458]   shell-api-autocompleter.ts           |   81.81 |    66.66 |     100 |   81.81 | 14,20
    [2023/07/12 03:28:18.458]  packages/browser-runtime-electron/src |   86.66 |       50 |      75 |   86.66 |
    [2023/07/12 03:28:18.458]   electron-interpreter-environment.ts  |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   electron-runtime.ts                  |   77.77 |       50 |      60 |   77.77 | 57-61
    [2023/07/12 03:28:18.458]  packages/build/src                    |   87.13 |    70.34 |   82.14 |   87.02 |
    [2023/07/12 03:28:18.458]   barque.ts                            |   90.99 |    82.53 |   86.66 |    90.9 | ...12,190-198,335
    [2023/07/12 03:28:18.458]   download-mongodb.ts                  |   59.52 |    48.48 |      50 |   59.52 | 23,55,83-119
    [2023/07/12 03:28:18.458]   run-draft.ts                         |     100 |       68 |     100 |     100 | ...,67-68,108,120
    [2023/07/12 03:28:18.458]   run-publish.ts                       |   94.73 |    72.22 |     100 |   94.59 | 38,134
    [2023/07/12 03:28:18.458]   run-upload.ts                        |      80 |    66.66 |     100 |      80 | 14,34
    [2023/07/12 03:28:18.458]  packages/build/src/config             |   75.86 |    60.71 |    92.3 |      84 |
    [2023/07/12 03:28:18.458]   build-variant.ts                     |   84.84 |       75 |     100 |   84.37 | 47-49,53,68,83
    [2023/07/12 03:28:18.458]   get-release-version-from-tag.ts      |      75 |    66.66 |     100 |   84.61 | 14-15
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   platform.ts                          |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   redact-config.ts                     |     100 |    16.66 |     100 |     100 | 23-24
    [2023/07/12 03:28:18.458]   should-do-public-release.ts          |   53.84 |       50 |      50 |   72.22 | 9,14,18,21-22
    [2023/07/12 03:28:18.458]  packages/build/src/download-center    |   93.54 |       25 |     100 |   93.54 |
    [2023/07/12 03:28:18.458]   artifacts.ts                         |     100 |        0 |     100 |     100 | 10
    [2023/07/12 03:28:18.458]   config.ts                            |   88.88 |    33.33 |     100 |   88.88 | 32-33
    [2023/07/12 03:28:18.458]   constants.ts                         |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  packages/build/src/evergreen          |   84.31 |     87.5 |    90.9 |   84.31 |
    [2023/07/12 03:28:18.458]   artifacts.ts                         |   65.21 |      100 |      75 |   65.21 | 29-52,72
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   rest-api.ts                          |     100 |     87.5 |     100 |     100 | 33
    [2023/07/12 03:28:18.458]  packages/build/src/git                |   93.96 |    79.27 |     100 |    93.8 |
    [2023/07/12 03:28:18.458]   changelog.ts                         |    92.3 |    80.64 |     100 |    92.1 | 55,82-83
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   repository-status.ts                 |     100 |       80 |     100 |     100 | 18-19,43,58-107
    [2023/07/12 03:28:18.458]   tags.ts                              |    87.5 |       76 |     100 |    87.5 | 40,71,80,84
    [2023/07/12 03:28:18.458]  packages/build/src/helpers            |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   spawn-sync.ts                        |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   with-retries.ts                      |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  packages/build/src/homebrew           |   89.06 |    73.33 |   88.88 |   90.16 |
    [2023/07/12 03:28:18.458]   generate-formula.ts                  |      95 |    88.23 |     100 |      95 | 18
    [2023/07/12 03:28:18.458]   publish-to-homebrew.ts               |   76.19 |    45.45 |     100 |   76.19 | 27-28,47-49
    [2023/07/12 03:28:18.458]   update-homebrew-fork.ts              |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   utils.ts                             |   91.66 |      100 |   83.33 |     100 |
    [2023/07/12 03:28:18.458]  packages/build/src/local              |     100 |       75 |     100 |     100 |
    [2023/07/12 03:28:18.458]   trigger-release-draft.ts             |     100 |    80.64 |     100 |     100 | 19-29
    [2023/07/12 03:28:18.458]   trigger-release-publish.ts           |     100 |     64.7 |     100 |     100 | 11-15,64
    [2023/07/12 03:28:18.458]  packages/build/src/npm-packages       |     100 |    68.42 |     100 |     100 |
    [2023/07/12 03:28:18.458]   bump.ts                              |     100 |       80 |     100 |     100 | 6
    [2023/07/12 03:28:18.458]   constants.ts                         |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   list.ts                              |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   publish.ts                           |     100 |    64.28 |     100 |     100 | 9-11,50-62
    [2023/07/12 03:28:18.458]  packages/build/src/packaging          |   58.51 |    28.94 |      40 |   58.06 |
    [2023/07/12 03:28:18.458]   download-crypt-library.ts            |   16.66 |        0 |       0 |   16.66 | 12-73
    [2023/07/12 03:28:18.458]   download-manpage.ts                  |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |      50 |     100 |
    [2023/07/12 03:28:18.458]   notary-service.ts                    |      96 |    84.61 |     100 |      96 | 77
    [2023/07/12 03:28:18.458]   run-package.ts                       |   38.09 |        0 |       0 |   38.09 | 12-51
    [2023/07/12 03:28:18.458]  packages/build/src/packaging/package  |   97.02 |       76 |   94.11 |   96.98 |
    [2023/07/12 03:28:18.458]   create-package.ts                    |   96.15 |    91.66 |     100 |      96 | 63
    [2023/07/12 03:28:18.458]   debian.ts                            |   97.87 |       80 |      80 |   97.82 | 33
    [2023/07/12 03:28:18.458]   get-package-file.ts                  |      90 |    85.71 |     100 |      90 | 56
    [2023/07/12 03:28:18.458]   helpers.ts                           |   94.44 |    71.87 |     100 |   94.33 | 113,122,143
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   msi.ts                               |     100 |        0 |     100 |     100 | 23
    [2023/07/12 03:28:18.458]   redhat.ts                            |   97.67 |    63.63 |      90 |   97.67 | 101
    [2023/07/12 03:28:18.458]   tarball.ts                           |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   zip.ts                               |     100 |    85.71 |     100 |     100 | 27
    [2023/07/12 03:28:18.458]  packages/cli-repl/bin                 |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   mongosh.js                           |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  packages/cli-repl/src                 |   92.97 |    82.11 |   94.03 |   93.04 |
    [2023/07/12 03:28:18.458]   arg-parser.ts                        |   97.72 |    94.11 |     100 |   97.72 | 205
    [2023/07/12 03:28:18.458]   async-repl.ts                        |   96.19 |    84.61 |     100 |   96.11 | 360-361,368-369
    [2023/07/12 03:28:18.458]   build-info.ts                        |   78.57 |    57.14 |     100 |   78.57 | 65-68
    [2023/07/12 03:28:18.458]   cli-repl.ts                          |   95.22 |    83.13 |      90 |   95.19 | ...77-878,951,983
    [2023/07/12 03:28:18.458]   clr.ts                               |   85.71 |    69.23 |   66.66 |   85.71 | 30-31,51
    [2023/07/12 03:28:18.458]   config-directory.ts                  |   86.56 |    60.97 |     100 |   86.56 | ...61,182,187-190
    [2023/07/12 03:28:18.458]   constants.ts                         |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   crypt-library-paths.ts               |    87.5 |     61.4 |   66.66 |   90.32 | 31,86,105
    [2023/07/12 03:28:18.458]   error-codes.ts                       |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   format-json.ts                       |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   format-output.ts                     |    96.2 |    88.33 |   96.15 |   96.05 | ...81,230,280-285
    [2023/07/12 03:28:18.458]   get-os-info.ts                       |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   line-by-line-input.ts                |     100 |    96.15 |     100 |     100 | 123,145
    [2023/07/12 03:28:18.458]   mongosh-repl.ts                      |   92.65 |    90.24 |   91.52 |   92.92 | ...41,684,710,830
    [2023/07/12 03:28:18.458]   run.ts                               |   80.18 |     58.9 |   93.33 |      80 | ...43,234-238,267
    [2023/07/12 03:28:18.458]   smoke-tests-fle.ts                   |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   smoke-tests.ts                       |   93.93 |    77.27 |     100 |   93.93 | 168-169
    [2023/07/12 03:28:18.458]   tls-certificate-selector.ts          |   88.46 |    78.78 |     100 |   88.46 | 52,62,71
    [2023/07/12 03:28:18.458]  packages/editor/src                   |   98.92 |       90 |     100 |   98.92 |
    [2023/07/12 03:28:18.458]   editor.ts                            |   98.92 |       90 |     100 |   98.92 | 275
    [2023/07/12 03:28:18.458]  packages/errors/src                   |   97.29 |    66.66 |   91.66 |   97.29 |
    [2023/07/12 03:28:18.458]   common-errors.ts                     |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   index.ts                             |   96.55 |       60 |    90.9 |   96.55 | 14
    [2023/07/12 03:28:18.458]  packages/history/src                  |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   history.ts                           |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  packages/i18n/src                     |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   translator.ts                        |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  packages/i18n/src/locales             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   de_DE.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   en_US.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  ...ges/js-multiline-to-singleline/src |     100 |     87.5 |     100 |     100 |
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |     87.5 |     100 |     100 | 72-111
    [2023/07/12 03:28:18.458]  packages/logging/src                  |   91.63 |    76.92 |   87.95 |   91.57 |
    [2023/07/12 03:28:18.458]   analytics-helpers.ts                 |   86.82 |    75.64 |   82.35 |   86.71 | ...19,351-354,366
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |      25 |     100 |
    [2023/07/12 03:28:18.458]   setup-logger-and-telemetry.ts        |   95.71 |    80.76 |   97.77 |   95.71 | ...71-172,600-601
    [2023/07/12 03:28:18.458]  ...runtime-worker-thread/__fixtures__ |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   script-that-throws.js                |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  ...ges/node-runtime-worker-thread/src |     100 |    88.88 |     100 |     100 |
    [2023/07/12 03:28:18.458]   lock.ts                              |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   rpc.ts                               |     100 |    88.23 |     100 |     100 | 63,185-186
    [2023/07/12 03:28:18.458]   serializer.ts                        |     100 |    93.54 |     100 |     100 | 122-140
    [2023/07/12 03:28:18.458]   spawn-child-from-source.ts           |     100 |    81.81 |     100 |     100 | 16,51-80
    [2023/07/12 03:28:18.458]  packages/service-provider-core/src    |   91.42 |    82.92 |      85 |   91.42 |
    [2023/07/12 03:28:18.458]   connect-info.ts                      |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |       0 |     100 |
    [2023/07/12 03:28:18.458]   printable-bson.ts                    |   97.05 |    73.33 |     100 |   97.05 | 96
    [2023/07/12 03:28:18.458]   service-provider.ts                  |   42.85 |        0 |       0 |   42.85 | 21-25
    [2023/07/12 03:28:18.458]   textencoder-polyfill.ts              |   85.71 |       75 |     100 |   85.71 | 13
    [2023/07/12 03:28:18.458]  packages/service-provider-server/src  |   87.27 |    71.17 |   82.19 |   87.21 |
    [2023/07/12 03:28:18.458]   cli-service-provider.ts              |   86.66 |     70.7 |   81.69 |   86.66 | ...1286,1294,1352
    [2023/07/12 03:28:18.458]   mongodb-patches.ts                   |     100 |       75 |     100 |     100 | 8-10
    [2023/07/12 03:28:18.458]  ...ervice-provider-server/src/compass |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   compass-service-provider.ts          |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]  packages/shell-api/src                |   61.09 |    49.67 |   57.51 |   75.06 |
    [2023/07/12 03:28:18.458]   abstract-cursor.ts                   |   58.18 |    44.11 |   52.94 |   70.73 | ...39,142,148,154
    [2023/07/12 03:28:18.458]   aggregate-or-find-cursor.ts          |   76.92 |       50 |     100 |      80 | 41-42,54-56,62-64
    [2023/07/12 03:28:18.458]   aggregation-cursor.ts                |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   bulk.ts                              |   84.54 |    42.85 |   74.19 |   90.52 | ...88,218-220,233
    [2023/07/12 03:28:18.458]   change-stream-cursor.ts              |    67.6 |    33.33 |   73.91 |      86 | ...70,73-75,79,90
    [2023/07/12 03:28:18.458]   collection.ts                        |   66.77 |     56.4 |    67.4 |   77.98 | ...1712,1748,1750
    [2023/07/12 03:28:18.458]   cursor.ts                            |   66.87 |    46.42 |   58.53 |   86.84 | ...82-186,198,213
    [2023/07/12 03:28:18.458]   database.ts                          |   55.43 |    43.24 |   52.68 |   73.38 | ...1679-1691,1714
    [2023/07/12 03:28:18.458]   dbquery.ts                           |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   decorators.ts                        |    85.1 |    76.43 |   78.75 |   88.12 | ...32,539,553,753
    [2023/07/12 03:28:18.458]   enums.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   error-codes.ts                       |     100 |      100 |      75 |     100 |
    [2023/07/12 03:28:18.458]   explainable-cursor.ts                |   88.23 |    66.66 |     100 |   85.71 | 22-23
    [2023/07/12 03:28:18.458]   explainable.ts                       |   67.56 |    48.64 |   54.83 |   76.59 | ...03-205,216,244
    [2023/07/12 03:28:18.458]   field-level-encryption.ts            |   55.28 |    45.74 |   43.85 |   69.45 | ...54,556,565,574
    [2023/07/12 03:28:18.458]   help.ts                              |   88.23 |      100 |   83.33 |   93.33 | 42
    [2023/07/12 03:28:18.458]   helpers.ts                           |   54.33 |    46.67 |   52.38 |   67.55 | ...1004,1008-1017
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |   83.33 |     100 |
    [2023/07/12 03:28:18.458]   interruptor.ts                       |   71.42 |       50 |      60 |   77.14 | ...38,42-51,54-59
    [2023/07/12 03:28:18.458]   log-entry.ts                         |    62.5 |       50 |      50 |   76.92 | 18,24-25
    [2023/07/12 03:28:18.458]   mongo-errors.ts                      |   58.06 |    47.22 |      50 |   73.91 | 20,27-30,32,39,51
    [2023/07/12 03:28:18.458]   mongo.ts                             |   53.43 |    47.56 |      50 |   68.11 | ...91,794,830,842
    [2023/07/12 03:28:18.458]   no-db.ts                             |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   plan-cache.ts                        |   71.42 |       60 |   54.54 |   87.09 | 39,56,64,72
    [2023/07/12 03:28:18.458]   replica-set.ts                       |   57.25 |    48.59 |      50 |   75.13 | ...62,371,411,418
    [2023/07/12 03:28:18.458]   result.ts                            |   82.79 |      100 |   56.25 |   88.88 | ...,78,92,112,124
    [2023/07/12 03:28:18.458]   run-command-cursor.ts                |     100 |      100 |     100 |     100 |
    [2023/07/12 03:28:18.458]   session.ts                           |   72.13 |       60 |   77.77 |   90.69 | 49-51,93,108
    [2023/07/12 03:28:18.458]   shard.ts                             |   59.65 |     40.9 |   54.05 |   77.55 | ...27,641,659-664
    [2023/07/12 03:28:18.458]   shell-api.ts                         |      60 |    47.26 |   56.89 |   78.46 | ...21,331-333,343
    [2023/07/12 03:28:18.458]   shell-bson.ts                        |   50.79 |    50.87 |   45.09 |   64.82 | ...39-342,351-356
    [2023/07/12 03:28:18.458]   shell-instance-state.ts              |   46.09 |    38.66 |   46.15 |   61.05 | ...81-589,618,639
    [2023/07/12 03:28:18.458]  packages/shell-evaluator/src          |   97.14 |    88.88 |      75 |   97.14 |
    [2023/07/12 03:28:18.458]   index.ts                             |     100 |      100 |       0 |     100 |
    [2023/07/12 03:28:18.458]   shell-evaluator.ts                   |   96.87 |    88.88 |     100 |   96.87 | 95
    [2023/07/12 03:28:18.458]  packages/snippet-manager/src          |   99.63 |    90.55 |   95.55 |   99.62 |
    [2023/07/12 03:28:18.458]   snippet-manager.ts                   |   99.63 |    90.55 |   95.55 |   99.62 | 183
    [2023/07/12 03:28:18.458]  packages/types/src                    |   96.34 |    96.34 |     100 |   96.34 |
    [2023/07/12 03:28:18.458]   index.ts                             |   96.34 |    96.34 |     100 |   96.34 | 401,405,564
    [2023/07/12 03:28:18.458]  scripts                               |      90 |    83.33 |     100 |      90 |
    [2023/07/12 03:28:18.459]   run-if-package-requested.js          |      90 |    83.33 |     100 |      90 | 14
    [2023/07/12 03:28:18.459]  stages                                |   84.56 |    83.82 |   97.22 |   87.54 |
--> [2023/07/12 03:28:18.459]   transform-maybe-await.ts             |   88.73 |    86.02 |      96 |   90.36 | ...32,582,603,642
    [2023/07/12 03:28:18.459]   uncatchable-exceptions.ts            |   53.84 |    43.33 |     100 |   63.15 | ...-87,92,100-107
    [2023/07/12 03:28:18.459]   wrap-as-iife.ts                      |   96.61 |    93.02 |     100 |   96.22 | 99,111
    [2023/07/12 03:28:18.459] ---------------------------------------|---------|----------|---------|---------|-------------------

@lerouxb lerouxb changed the title chore: lower the coverage threshold so that the job will upload the report MONGOSH-1312 chore: fix coverage reporting MONGOSH-1312 Jul 14, 2023
@lerouxb
Copy link
Contributor Author

lerouxb commented Jul 15, 2023

I think the coverage looks correct now: https://parsley.mongodb.com/evergreen/mongosh_linux_coverage_check_coverage_patch_e92fb5aa609c050ee9e7ac966ff8af2592c853c2_64b1679b7742aea8427427da_23_07_14_15_19_57/1/task?bookmarks=0,138896

83%, but I'd kinda expect it to go down because e2e tests are now basically ignored coverage-wise. Plus it already said 83%-ish before this change, so I can believe that numbers just dropped over time.

You can also download the html report from that link.

I can't spot any duplicates now:

---------------------------------------|---------|----------|---------|---------|-------------------
File                                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------------------|---------|----------|---------|---------|-------------------
All files                              |   73.49 |    64.16 |   70.72 |   83.19 |
 arg-parser/src                        |      94 |    87.32 |   91.22 |      94 |
  arg-mapper.ts                        |    89.1 |       80 |   89.13 |    89.1 | ...96,225,286,299
  uri-generator.ts                     |   98.98 |    92.18 |     100 |   98.98 | 278
 async-rewriter2/src                   |      96 |    77.27 |   83.33 |      96 |
  async-writer-babel.ts                |   95.23 |       75 |      80 |   95.23 | 95
  error-codes.ts                       |     100 |      100 |     100 |     100 |
  index.ts                             |     100 |      100 |     100 |     100 |
 async-rewriter2/src/stages            |    97.5 |    94.77 |     100 |   97.82 |
  transform-maybe-await.ts             |   98.26 |    94.31 |     100 |   99.05 | 456
  uncatchable-exceptions.ts            |    92.3 |    92.85 |     100 |      92 | 40-41
  wrap-as-iife.ts                      |    98.3 |    97.67 |     100 |   98.11 | 111
 autocomplete/src                      |   88.52 |    83.76 |   92.85 |   87.93 |
  index.ts                             |   88.52 |    83.76 |   92.85 |   87.93 | ...69,311-312,315
 browser-runtime-core/src              |      60 |     8.33 |      50 |      60 |
  index.ts                             |     100 |      100 |     100 |     100 |
  open-context-runtime.ts              |   57.14 |     8.33 |      40 |   57.14 | 54-63,82-92
 ...ser-runtime-core/src/autocompleter |   81.81 |    66.66 |     100 |   81.81 |
  shell-api-autocompleter.ts           |   81.81 |    66.66 |     100 |   81.81 | 14,20
 browser-runtime-electron/src          |   86.66 |       50 |      75 |   86.66 |
  electron-interpreter-environment.ts  |     100 |      100 |     100 |     100 |
  electron-runtime.ts                  |   77.77 |       50 |      60 |   77.77 | 57-61
 build/src                             |   87.13 |    70.34 |   82.14 |   87.02 |
  barque.ts                            |   90.99 |    82.53 |   86.66 |    90.9 | ...12,190-198,335
  download-mongodb.ts                  |   59.52 |    48.48 |      50 |   59.52 | 23,55,83-119
  run-draft.ts                         |     100 |       68 |     100 |     100 | ...,67-68,108,120
  run-publish.ts                       |   94.73 |    72.22 |     100 |   94.59 | 38,134
  run-upload.ts                        |      80 |    66.66 |     100 |      80 | 14,34
 build/src/config                      |   75.86 |    60.71 |    92.3 |      84 |
  build-variant.ts                     |   84.84 |       75 |     100 |   84.37 | 47-49,53,68,83
  get-release-version-from-tag.ts      |      75 |    66.66 |     100 |   84.61 | 14-15
  index.ts                             |     100 |      100 |     100 |     100 |
  platform.ts                          |     100 |      100 |     100 |     100 |
  redact-config.ts                     |     100 |    16.66 |     100 |     100 | 23-24
  should-do-public-release.ts          |   53.84 |       50 |      50 |   72.22 | 9,14,18,21-22
 build/src/download-center             |   93.54 |       25 |     100 |   93.54 |
  artifacts.ts                         |     100 |        0 |     100 |     100 | 10
  config.ts                            |   88.88 |    33.33 |     100 |   88.88 | 32-33
  constants.ts                         |     100 |      100 |     100 |     100 |
  index.ts                             |     100 |      100 |     100 |     100 |
 build/src/evergreen                   |   84.31 |     87.5 |    90.9 |   84.31 |
  artifacts.ts                         |   65.21 |      100 |      75 |   65.21 | 29-52,72
  index.ts                             |     100 |      100 |     100 |     100 |
  rest-api.ts                          |     100 |     87.5 |     100 |     100 | 33
 build/src/git                         |   93.96 |    79.27 |     100 |    93.8 |
  changelog.ts                         |    92.3 |    80.64 |     100 |    92.1 | 55,82-83
  index.ts                             |     100 |      100 |     100 |     100 |
  repository-status.ts                 |     100 |       80 |     100 |     100 | 18-19,43,58-107
  tags.ts                              |    87.5 |       76 |     100 |    87.5 | 40,71,80,84
 build/src/helpers                     |     100 |      100 |     100 |     100 |
  index.ts                             |     100 |      100 |     100 |     100 |
  spawn-sync.ts                        |     100 |      100 |     100 |     100 |
  with-retries.ts                      |     100 |      100 |     100 |     100 |
 build/src/homebrew                    |   89.06 |    73.33 |   88.88 |   90.16 |
  generate-formula.ts                  |      95 |    88.23 |     100 |      95 | 18
  publish-to-homebrew.ts               |   76.19 |    45.45 |     100 |   76.19 | 27-28,47-49
  update-homebrew-fork.ts              |     100 |      100 |     100 |     100 |
  utils.ts                             |   91.66 |      100 |   83.33 |     100 |
 build/src/local                       |     100 |       75 |     100 |     100 |
  trigger-release-draft.ts             |     100 |    80.64 |     100 |     100 | 19-29
  trigger-release-publish.ts           |     100 |     64.7 |     100 |     100 | 11-15,64
 build/src/npm-packages                |     100 |    68.42 |     100 |     100 |
  bump.ts                              |     100 |       80 |     100 |     100 | 6
  constants.ts                         |     100 |      100 |     100 |     100 |
  list.ts                              |     100 |      100 |     100 |     100 |
  publish.ts                           |     100 |    64.28 |     100 |     100 | 9-11,50-62
 build/src/packaging                   |   58.51 |    28.94 |      40 |   58.06 |
  download-crypt-library.ts            |   16.66 |        0 |       0 |   16.66 | 12-73
  download-manpage.ts                  |     100 |      100 |     100 |     100 |
  index.ts                             |     100 |      100 |      50 |     100 |
  notary-service.ts                    |      96 |    84.61 |     100 |      96 | 77
  run-package.ts                       |   38.09 |        0 |       0 |   38.09 | 12-51
 build/src/packaging/package           |   97.02 |       76 |   94.11 |   96.98 |
  create-package.ts                    |   96.15 |    91.66 |     100 |      96 | 63
  debian.ts                            |   97.87 |       80 |      80 |   97.82 | 33
  get-package-file.ts                  |      90 |    85.71 |     100 |      90 | 56
  helpers.ts                           |   94.44 |    71.87 |     100 |   94.33 | 113,122,143
  index.ts                             |     100 |      100 |     100 |     100 |
  msi.ts                               |     100 |        0 |     100 |     100 | 23
  redhat.ts                            |   97.67 |    63.63 |      90 |   97.67 | 101
  tarball.ts                           |     100 |      100 |     100 |     100 |
  zip.ts                               |     100 |    85.71 |     100 |     100 | 27
 cli-repl/src                          |   92.97 |    82.11 |   94.03 |   93.03 |
  arg-parser.ts                        |   97.72 |    94.11 |     100 |   97.72 | 205
  async-repl.ts                        |   96.19 |    84.61 |     100 |   96.11 | 362-363,370-371
  build-info.ts                        |   78.57 |    57.14 |     100 |   78.57 | 65-68
  cli-repl.ts                          |   95.22 |    83.13 |      90 |   95.19 | ...77-878,951,983
  clr.ts                               |   85.71 |    69.23 |   66.66 |   85.71 | 30-31,51
  config-directory.ts                  |   86.56 |    60.97 |     100 |   86.56 | ...61,182,187-190
  constants.ts                         |     100 |      100 |     100 |     100 |
  crypt-library-paths.ts               |    87.5 |     61.4 |   66.66 |   90.32 | 31,86,105
  error-codes.ts                       |     100 |      100 |     100 |     100 |
  format-json.ts                       |     100 |      100 |     100 |     100 |
  format-output.ts                     |    96.2 |    88.33 |   96.15 |   96.05 | ...81,230,280-285
  get-os-info.ts                       |     100 |      100 |     100 |     100 |
  line-by-line-input.ts                |     100 |    96.15 |     100 |     100 | 123,145
  mongosh-repl.ts                      |   92.65 |    90.24 |   91.52 |   92.92 | ...41,684,710,830
  run.ts                               |   80.18 |     58.9 |   93.33 |      80 | ...43,234-238,267
  smoke-tests-fle.ts                   |     100 |      100 |     100 |     100 |
  smoke-tests.ts                       |   93.93 |    77.27 |     100 |   93.93 | 168-169
  tls-certificate-selector.ts          |   88.46 |    78.78 |     100 |   88.46 | 52,62,71
 editor/src                            |   98.92 |       90 |     100 |   98.92 |
  editor.ts                            |   98.92 |       90 |     100 |   98.92 | 275
 errors/src                            |   97.22 |    66.66 |   91.66 |   97.22 |
  common-errors.ts                     |     100 |      100 |     100 |     100 |
  index.ts                             |   96.55 |       60 |    90.9 |   96.55 | 14
 history/src                           |     100 |      100 |     100 |     100 |
  history.ts                           |     100 |      100 |     100 |     100 |
 i18n/src                              |     100 |      100 |     100 |     100 |
  translator.ts                        |     100 |      100 |     100 |     100 |
 i18n/src/locales                      |     100 |      100 |     100 |     100 |
  de_DE.ts                             |     100 |      100 |     100 |     100 |
  en_US.ts                             |     100 |      100 |     100 |     100 |
 js-multiline-to-singleline/src        |     100 |     87.5 |     100 |     100 |
  index.ts                             |     100 |     87.5 |     100 |     100 | 72-111
 logging/src                           |   91.63 |    76.92 |   87.95 |   91.57 |
  analytics-helpers.ts                 |   86.82 |    75.64 |   82.35 |   86.71 | ...19,351-354,366
  index.ts                             |     100 |      100 |      25 |     100 |
  setup-logger-and-telemetry.ts        |   95.71 |    80.76 |   97.77 |   95.71 | ...71-172,600-601
 node-runtime-worker-thread/src        |     100 |    88.88 |     100 |     100 |
  lock.ts                              |     100 |      100 |     100 |     100 |
  rpc.ts                               |     100 |    88.23 |     100 |     100 | 63,187-188
  serializer.ts                        |     100 |    93.54 |     100 |     100 | 122-140
  spawn-child-from-source.ts           |     100 |    81.81 |     100 |     100 | 16,51-80
 service-provider-core/src             |   91.42 |    82.92 |      85 |   91.42 |
  connect-info.ts                      |     100 |      100 |     100 |     100 |
  index.ts                             |     100 |      100 |       0 |     100 |
  printable-bson.ts                    |   97.05 |    73.33 |     100 |   97.05 | 96
  service-provider.ts                  |   42.85 |        0 |       0 |   42.85 | 21-25
  textencoder-polyfill.ts              |   85.71 |       75 |     100 |   85.71 | 13
 service-provider-server/src           |   87.27 |    71.17 |   82.19 |   87.21 |
  cli-service-provider.ts              |   86.66 |     70.7 |   81.69 |   86.66 | ...1286,1294,1352
  mongodb-patches.ts                   |     100 |       75 |     100 |     100 | 8-10
 service-provider-server/src/compass   |     100 |      100 |     100 |     100 |
  compass-service-provider.ts          |     100 |      100 |     100 |     100 |
 shell-api/src                         |   60.86 |    49.67 |   57.51 |   75.03 |
  abstract-cursor.ts                   |    57.4 |    44.11 |   52.94 |   70.73 | ...39,142,148,154
  aggregate-or-find-cursor.ts          |   75.67 |       50 |     100 |      80 | 41-42,54-56,62-64
  aggregation-cursor.ts                |     100 |      100 |     100 |     100 |
  bulk.ts                              |    84.4 |    42.85 |   74.19 |   90.52 | ...88,218-220,233
  change-stream-cursor.ts              |    67.6 |    33.33 |   73.91 |      86 | ...70,73-75,79,90
  collection.ts                        |    66.8 |     56.4 |    67.4 |   77.98 | ...1712,1748,1750
  cursor.ts                            |   66.87 |    46.42 |   58.53 |   86.84 | ...82-186,198,213
  database.ts                          |   55.48 |    43.24 |   52.68 |   73.38 | ...1679-1691,1714
  dbquery.ts                           |     100 |      100 |     100 |     100 |
  decorators.ts                        |    85.1 |    76.43 |   78.75 |   88.12 | ...32,539,553,753
  enums.ts                             |     100 |      100 |     100 |     100 |
  error-codes.ts                       |     100 |      100 |      75 |     100 |
  explainable-cursor.ts                |   88.23 |    66.66 |     100 |   85.71 | 22-23
  explainable.ts                       |   67.56 |    48.64 |   54.83 |   76.59 | ...03-205,216,244
  field-level-encryption.ts            |   54.25 |    45.74 |   43.85 |    69.3 | ...54,556,565,574
  help.ts                              |   88.23 |      100 |   83.33 |   93.33 | 42
  helpers.ts                           |   54.33 |    46.67 |   52.38 |   67.55 | ...1004,1008-1017
  index.ts                             |     100 |      100 |   83.33 |     100 |
  interruptor.ts                       |   71.42 |       50 |      60 |   77.14 | ...38,42-51,54-59
  log-entry.ts                         |    62.5 |       50 |      50 |   76.92 | 18,24-25
  mongo-errors.ts                      |   58.06 |    47.22 |      50 |   73.91 | 20,27-30,32,39,51
  mongo.ts                             |   53.43 |    47.56 |      50 |   68.11 | ...91,794,830,842
  no-db.ts                             |     100 |      100 |     100 |     100 |
  plan-cache.ts                        |   71.42 |       60 |   54.54 |   87.09 | 39,56,64,72
  replica-set.ts                       |   57.25 |    48.59 |      50 |   75.13 | ...62,371,411,418
  result.ts                            |   73.25 |      100 |   56.25 |    87.5 | ...,78,92,112,124
  run-command-cursor.ts                |     100 |      100 |     100 |     100 |
  session.ts                           |   72.13 |       60 |   77.77 |   90.69 | 49-51,93,108
  shard.ts                             |   59.65 |     40.9 |   54.05 |   77.55 | ...27,641,659-664
  shell-api.ts                         |   59.77 |    47.26 |   56.89 |   78.46 | ...21,331-333,343
  shell-bson.ts                        |   50.79 |    50.87 |   45.09 |   64.82 | ...39-342,351-356
  shell-instance-state.ts              |   46.09 |    38.66 |   46.15 |   61.05 | ...81-589,618,639
 shell-evaluator/src                   |   97.14 |    88.88 |      75 |   97.14 |
  index.ts                             |     100 |      100 |       0 |     100 |
  shell-evaluator.ts                   |   96.87 |    88.88 |     100 |   96.87 | 95
 snippet-manager/src                   |   99.63 |    90.55 |   95.55 |   99.62 |
  snippet-manager.ts                   |   99.63 |    90.55 |   95.55 |   99.62 | 183
 types/src                             |   96.34 |    96.34 |     100 |   96.34 |
  index.ts                             |   96.34 |    96.34 |     100 |   96.34 | 401,405,564
---------------------------------------|---------|----------|---------|---------|-------------------

@lerouxb lerouxb merged commit 6395585 into main Jul 20, 2023
@lerouxb lerouxb deleted the fix-nyc branch July 20, 2023 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants