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

Revert "test_runner: ignore unmapped lines for coverage" #55339

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

RedYetiDev
Copy link
Member

@RedYetiDev RedYetiDev commented Oct 9, 2024

Reverts #55228

This reverts a PR that was intended to fix #54753, however, the tests that it added where not accurate, and it actually does not pass the tests that it should pass.

Once this lands, I'll open a follow up with tests for this behavior so that this doesn't happen again.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Oct 9, 2024
@RedYetiDev RedYetiDev added test Issues and PRs related to the tests. revert PRs that revert previously landed PRs. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. labels Oct 9, 2024
@cjihrig
Copy link
Contributor

cjihrig commented Oct 9, 2024

Please drop the second commit. Just the revert.

@geeksilva97
Copy link
Contributor

#55228 (comment) any consideration on this comment?

Also, would you point which tests are failing, @RedYetiDev ? (if this info is public)

@RedYetiDev RedYetiDev removed the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label Oct 9, 2024
@cjihrig cjihrig added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 9, 2024
@RedYetiDev RedYetiDev added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 9, 2024
@RedYetiDev
Copy link
Member Author

Also, would you point which tests are failing, @RedYetiDev ? (if this info is public)

(From @cjihrig)

If source maps are enabled, coverage should be based on the original source. If a function in the original source is uncovered, it should be reported as uncovered.

I'm assuming the function is not mapped because of some dead code elimination or similar optimization during transpilation. That doesn't change the fact that it exists in the original source and is never executed.

You can see this if you compare --enable-source-maps to running without the flag. While the output should be same, after your PR, there are pretty distinct differences.

@nodejs-github-bot
Copy link
Collaborator

@RedYetiDev RedYetiDev added the fast-track PRs that do not need to wait for 48 hours to land. label Oct 9, 2024
@RedYetiDev
Copy link
Member Author

RedYetiDev commented Oct 9, 2024

Fast tracking for the upcoming proposal(s).

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Fast-track has been requested by @RedYetiDev. Please 👍 to approve.

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.41%. Comparing base (7178588) to head (3b7f3d6).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55339      +/-   ##
==========================================
+ Coverage   88.38%   88.41%   +0.02%     
==========================================
  Files         652      652              
  Lines      186740   186714      -26     
  Branches    36036    36031       -5     
==========================================
+ Hits       165058   165078      +20     
+ Misses      14934    14896      -38     
+ Partials     6748     6740       -8     
Files with missing lines Coverage Δ
lib/internal/test_runner/coverage.js 64.54% <100.00%> (+0.82%) ⬆️

... and 34 files with indirect coverage changes

@RedYetiDev RedYetiDev mentioned this pull request Oct 9, 2024
@aduh95 aduh95 added dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. labels Oct 10, 2024
@nodejs-github-bot
Copy link
Collaborator

@RedYetiDev
Copy link
Member Author

@RafaelGSS said that he'll do a final sync with main later today. It's imperative that this fix lands before that sync. If not, --enable-source-maps with coverage reporting will be broken.

@cjihrig
Copy link
Contributor

cjihrig commented Oct 10, 2024

We need a green CI first.

@nodejs-github-bot
Copy link
Collaborator

@RafaelGSS
Copy link
Member

@RafaelGSS said that he'll do a final sync with main later today. It's imperative that this fix lands before that sync. If not, --enable-source-maps with coverage reporting will be broken.

I can drop the original commit if this doesn't land. No need to rush if CI isn't green

@RedYetiDev
Copy link
Member Author

If this isn't green by the time you do your final sync, that's probably the best idea. Thanks!

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 11, 2024
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Oct 11, 2024
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/55339
✔  Done loading data for nodejs/node/pull/55339
----------------------------------- PR info ------------------------------------
Title      Revert "test_runner: ignore unmapped lines for coverage" (#55339)
Author     Aviv Keller <redyetidev@gmail.com> (@RedYetiDev)
Branch     RedYetiDev:revert-55228-issue-55106 -> nodejs:main
Labels     test, fast-track, author ready, needs-ci, revert, dont-land-on-v18.x, test_runner, dont-land-on-v20.x, dont-land-on-v22.x
Commits    1
 - Revert "test_runner: ignore unmapped lines for coverage"
Committers 1
 - GitHub <noreply@github.com>
PR-URL: https://github.com/nodejs/node/pull/55339
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/55339
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Wed, 09 Oct 2024 17:59:26 GMT
   ✔  Approvals: 2
   ✔  - Colin Ihrig (@cjihrig): https://github.com/nodejs/node/pull/55339#pullrequestreview-2357863538
   ✔  - Chemi Atlow (@atlowChemi): https://github.com/nodejs/node/pull/55339#pullrequestreview-2358022594
   ℹ  This PR is being fast-tracked
   ✘  This PR needs to wait 6 more hours to land (or 0 hours if there are 2 more approvals (👍) of the fast-track request from collaborators).
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2024-10-11T08:57:38Z: https://ci.nodejs.org/job/node-test-pull-request/63048/
- Querying data for job/node-test-pull-request/63048/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/11291355072

@richardlau richardlau added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Oct 11, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 11, 2024
@nodejs-github-bot nodejs-github-bot merged commit ccd4faf into nodejs:main Oct 11, 2024
87 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in ccd4faf

louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
This reverts commit 3a42085.

PR-URL: nodejs#55339
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
This reverts commit 3a42085.

PR-URL: nodejs#55339
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
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. dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. fast-track PRs that do not need to wait for 48 hours to land. needs-ci PRs that need a full CI run. revert PRs that revert previously landed PRs. test_runner Issues and PRs related to the test runner subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--experimental-test-coverage falsely reports missing coverage where TS source is import type
8 participants