You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tech-debtRefactors, unsavory workarounds or other technical decisions that should be revisited latertestingEngineering label for issues related to tests or test tooling
I suggest we that this change as is and find solution for npx and SIGINT separately in a dedicated PR.
The text was updated successfully, but these errors were encountered:
sobolk
added
tech-debt
Refactors, unsavory workarounds or other technical decisions that should be revisited later
testing
Engineering label for issues related to tests or test tooling
labels
Nov 3, 2023
I have attempted to use node-pty instead of execa to get some TTY emulation in #604 . I got stuck with e2e test job on Windows not completing within 60 min timeout.
Observations:
Using node-pty does solve Ctrl+C signal propagation when using npx amplify (instead of amplify). I.e. Pseudo TTY dispatches signals to all processes in process group so they have ability to react.
All e2e and live canary tests are passing.
The Windows job hangs indefinitely after running all tests.
I have added plenty of debug logs to monitor PredicatedActions , process spawning, process output and process exit. I also added output from tasklist and wtfnode to reveal what prevents node process from exiting.
Number of processes spawned equals number of processes that reported exit
Output from tasklist after all tests ran does not contain any pid that was reported in test logs
Do nothing and wait for node-pty fix. (This limits our testing capability)
While waiting consider not using npx but lookup amplify binary and use it directly in all cases.
Migrate to test runner that can ignore open handles and exit after tests complete. (Jest can do it, we know that from Gen1 CLI)
Explore our own mechanism to dispatch signal to "spawned process group". (this won't address demand for TTY testing if we get spinners and other things like this)
tech-debtRefactors, unsavory workarounds or other technical decisions that should be revisited latertestingEngineering label for issues related to tests or test tooling
From #575 (comment) .
When we try to call
npx amplify
in e2e tests then signals (SIGINT) do not reach child processes (i.e. sandbox).We should find a solution to this problem, or a workaround which will work in canary tests.
From PR ^
I was digging a bit and found this interesting article https://stackoverflow.com/questions/43788943/send-sigint-to-a-process-by-sending-ctrl-c-to-stdin .
It says that TTY terminal dispatches SIGINT to foreground process group. Which might be our problem with npx and we might need a bit more than just execa for our e2e test framework.
I suggest we that this change as is and find solution for npx and SIGINT separately in a dedicated PR.
The text was updated successfully, but these errors were encountered: