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

test_runner: handle file rename and deletion under watch mode #53114

Conversation

jakecastelli
Copy link
Contributor

@jakecastelli jakecastelli commented May 23, 2024

Fixes: #53113

@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 May 23, 2024
@jakecastelli jakecastelli force-pushed the fix-test-runner-rename-delete-error branch from 174efbb to 019625e Compare May 23, 2024 07:05
lib/internal/test_runner/runner.js Outdated Show resolved Hide resolved
lib/internal/test_runner/runner.js Outdated Show resolved Hide resolved
@jakecastelli jakecastelli force-pushed the fix-test-runner-rename-delete-error branch from 019625e to d23cbc4 Compare May 24, 2024 00:06
Copy link
Member

@MoLow MoLow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a test

@jakecastelli jakecastelli force-pushed the fix-test-runner-rename-delete-error branch 2 times, most recently from 1f0ae63 to 0d22545 Compare May 25, 2024 15:55
@jakecastelli
Copy link
Contributor Author

@MoLow I have added tests to cover both rename and delete a watched test file 👍 could you please take a look when you have time

@jakecastelli jakecastelli force-pushed the fix-test-runner-rename-delete-error branch from 0d22545 to b1816bb Compare May 25, 2024 16:04
@jakecastelli
Copy link
Contributor Author

jakecastelli commented May 31, 2024

Could someone help me to kick start the CI? 👀

Thanks!

@nodejs-github-bot
Copy link
Collaborator

@jakecastelli
Copy link
Contributor Author

Looks like there are a few failing jobs (most likely flaky tests 👀) I guess they need a rerun?

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@MoLow MoLow added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jun 2, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 2, 2024
@nodejs-github-bot nodejs-github-bot merged commit 7125931 into nodejs:main Jun 2, 2024
56 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 7125931

targos pushed a commit that referenced this pull request Jun 3, 2024
Fixes: #53113
PR-URL: #53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Jun 7, 2024
eliphazb pushed a commit to eliphazb/node that referenced this pull request Jun 20, 2024
Fixes: nodejs#53113
PR-URL: nodejs#53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
bmeck pushed a commit to bmeck/node that referenced this pull request Jun 22, 2024
Fixes: nodejs#53113
PR-URL: nodejs#53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
marco-ippolito pushed a commit that referenced this pull request Jul 19, 2024
Fixes: #53113
PR-URL: #53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
marco-ippolito pushed a commit that referenced this pull request Jul 19, 2024
Fixes: #53113
PR-URL: #53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
nodejs-github-bot pushed a commit that referenced this pull request Aug 14, 2024
When a watched test file is being deleted then the referenced dependency
file(s) will be updated incorrect when `unfilterFilesOwnedBy` method is
called, which will cause tests not being rerun when its referenced
dependency changed. To prevent this case, we can simply `return` when we
detect a watched test file being deleted.

PR-URL: #53533
Refs: #53114
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Aug 19, 2024
When a watched test file is being deleted then the referenced dependency
file(s) will be updated incorrect when `unfilterFilesOwnedBy` method is
called, which will cause tests not being rerun when its referenced
dependency changed. To prevent this case, we can simply `return` when we
detect a watched test file being deleted.

PR-URL: #53533
Refs: #53114
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename or delete a watched test file will cause MODULE_NOT_FOUND error
6 participants