-
-
Notifications
You must be signed in to change notification settings - Fork 10
fireEvent.sigkill fails on some CI systems #3
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
Comments
FireEvent SigKill works
test often fails on CI systemsFireEvent SigKill works
test often fails on some CI systems
FireEvent SigKill works
test often fails on some CI systems
OK I'm stumped. I've tried for hours and hours now with no avail. It seems to work fine in CircleCI, but not GitHub actions. I'm going to mark this as "help needed" and hope the ecosystem has some kind of solution Note: This library works fine for Windows itself. I will be manually testing everything on my machine to make sure it works and continue to write Windows-specific tests |
OK it's not just https://github.com/crutchcorn/cli-testing-library/actions/runs/1558975085 There is some timing issue somewhere, and I don't think it's our code, but I could be wrong. |
I fixed the timing issue (Node 14 seems to have changed something with Sure enough, both Windows and Ubuntu tests pass now |
We're running into this issue again in Plop as Windows devices are failing again. I'm willing to pay a bounty of $50 if anyone is able to solve these issues well enough that Windows CI systems do not fail on GitHub actions on the Plop monorepo 5x in a row. |
/bounty $50 |
💎 $50 bounty created by crutchcorn
|
/attempt #3 Options |
Hey @crutchcorn Is it possible for me to get the config that you used for circle ci? |
@Drex72 it might be in the commit history. Otherwise I wouldn't know where it is :( Sorry I'm not more help |
Alright, no problem |
Failing job in Plop plop:test
cache miss, executing b00a87c8e47ca0af
> [email protected] test:instrument
> nyc instrument ./bin ./instrumented/bin && nyc instrument ./src ./instrumented/src && cp package.json ./instrumented
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
> [email protected] vitest
> vitest run
RUN v1.1.0 D:/a/plop/plop/packages/plop
✓ tests/actions.spec.js (6 tests | 4 skipped) 6435ms
✓ tests/wrapper.spec.js (5 tests) 15245ms
✓ tests/esm.spec.js (4 tests) 11460ms
✓ tests/action-failure.spec.js (1 test) 3675ms
✓ tests/typescript.spec.js (1 test) 2179ms
✓ tests/input-processing.spec.js (16 tests | 1 skipped) 35128ms
⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯
Vitest caught 1 unhandled error during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.
⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯
Error: Command failed: taskkill /pid 1544 /T /F
ERROR: The process with PID 5052 (child process of PID 1544) could not be terminated.
Reason: The operation attempted is not supported.
ERROR: The process with PID 1544 (child process of PID 5[72](https://github.com/plopjs/plop/actions/runs/7304409077/job/19906537229#step:5:74)8) could not be terminated.
Reason: The operation attempted is not supported.
❯ ChildProcess.exithandler node:child_process:422:12
❯ ChildProcess.emit node:events:517:28
❯ maybeClose node:internal/child_process:1098:16
❯ Process.ChildProcess._handle.onexit node:internal/child_process:303:5
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 1544 /T /F' }
This error originated in "tests/input-processing.spec.js" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "Should bypass input prompt with name". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- This was the last recorded test before the error was thrown, if error originated after test finished its execution.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Test Files 6 passed (6)
Tests 28 passed | 5 todo (33)
Errors 1 error
Start at 22:39:53
Duration 36.38s (transform 179ms, setup 1.64s, collect 657ms, tests [74](https://github.com/plopjs/plop/actions/runs/7304409077/job/19906537229#step:5:76).12s, environment 2ms, prepare 1.[78](https://github.com/plopjs/plop/actions/runs/7304409077/job/19906537229#step:5:80)s)
npm ERR! Lifecycle script `vitest` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: [email protected]
npm ERR! at location: D:\a\plop\plop\packages\plop
Error: command finished with error: command (D:\a\plop\plop\packages\plop) C:\Users\RUNNER~1\AppData\Local\Temp\xfs-42d[81](https://github.com/plopjs/plop/actions/runs/7304409077/job/19906537229#step:5:83)1ce\yarn.cmd run test exited (1)
Error: plop#test: command (D:\a\plop\plop\packages\plop) C:\Users\RUNNER~1\AppData\Local\Temp\xfs-42d811ce\yarn.cmd run test exited (1)
Tasks: 1 successful, 2 total
Cached: 0 cached, 2 total
Time: 54.193s
Failed: plop#test
ERROR run failed: command exited (1)
Error: Process completed with exit code 1. |
@crutchcorn just want to be clear, you are not seeing this issue for yourself locally? I was able to reproduce it on my local windows 11 desktop |
@Waldeedle INTERESTING. I, in fact, was not able to reproduce it locally even recently on the Plop repo. |
@crutchcorn try cloning the repo to a new folder and just run the exact commands from your test workflow: Here's some copy-pasta for your convenience git clone [email protected]:plopjs/plop.git
cd plop/
yarn install --frozen-lockfile
yarn test |
@Waldeedle it's interesting it mentions Microsoft AV. What if you turn it off (temporarily) for running? [Only if you trust it, feel free to read the source] I have mine disabled in favor of a different antivirus and maybe that could be part of the root. |
@crutchcorn assuming you meant from my screenshot? Sorry should've clarified that this was from my task manager, its going to show all processes, I will switch over to process explorer so I can see the related processes from the test |
/attempt #3 if (err.message.includes('could not be terminated') && err.message.includes('There is no running instance of the task.')) Options |
Note The user @smartbizlord is already attempting to complete issue #3 and claim the bounty. We recommend checking in on @smartbizlord's progress, and potentially collaborating, before starting a new solution. |
Truthfully I don't remember. I think this was an attempt to fix the problem at hand or work around windows specifically but idk |
💡 @Waldeedle submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
@Waldeedle: Your claim has been rewarded! 👉 Complete your Algora onboarding to collect the bounty. |
@Waldeedle thanks so much for contributing to this project and helping us out! Great work! |
@crutchcorn anytime, thanks for the brain teaser! 👏 |
While this code runs on all the same versions of Node on Windows within CI, it seems to error out on platforms like Windows.
Log:
https://github.com/crutchcorn/cli-testing-library/runs/4339953929?check_suite_focus=true
It appears to be a permissions issue of being unable to
taskkill
(or similar) a PID on Windows machines on GH Actions CI. This makes sense to me, as it may introduce vulnerabilities.As a temporary workaround, I will be removing that test from CI and simply doing tests manually on Windows myself. Please let us know if there's a better way you know of
The text was updated successfully, but these errors were encountered: