Upload Electron E2E failure artifacts#533
Upload Electron E2E failure artifacts#533yusufm wants to merge 3 commits intosiddharthvaddem:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds CI jobs: a ChangesE2E Testing Infrastructure
Hook Cleanup Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 5/8 reviews remaining, refill in 22 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/e2e/gif-export.spec.ts`:
- Around line 12-21: In waitForProcessExit (the async function using child:
ReturnType<ElectronApplication["process"]>) remove all checks of child.killed
and only treat child.exitCode !== null as the indicator the process has exited;
implement proper listener/timeout cleanup by registering concrete handlers
(e.g., onExit and onTimeout), using clearTimeout and child.removeListener in the
Promise.race resolution so no dangling listeners remain. Also update the SIGKILL
logic that currently gates on !child.killed (the guard around the kill attempt
referenced near the SIGKILL call) to instead check that child.exitCode === null
before sending SIGKILL so you always attempt to kill processes that haven't
actually exited.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0157bcfd-4958-4417-9beb-0925159ec055
📒 Files selected for processing (3)
.github/workflows/ci.ymlsrc/hooks/useScreenRecorder.tstests/e2e/gif-export.spec.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/e2e/gif-export.spec.ts (1)
12-50: ⚡ Quick winMake the timeout distinguishable from a clean exit.
Lowkey risky:
waitForProcessExit()resolves on timeout exactly the same way it resolves after an actual exit, socloseElectronApp()can't tell whether Electron shut down or we just gave up and moved on. That can mask a stuck process and leave CI in a weird state.Consider returning a boolean or throwing when the forced-kill path still doesn't observe exit.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/e2e/gif-export.spec.ts` around lines 12 - 50, waitForProcessExit currently resolves both on real process exit and on timeout indistinguishably; change waitForProcessExit to return a boolean (true = observed exit before timeout, false = timed out) or to throw on timeout so callers can react. Update waitForProcessExit's internal promise to resolve(false) on the onTimeout path and resolve(true) on the onExit/finish path (or reject with an Error on timeout), and then update closeElectronApp to check the boolean/try-catch the rejection: if waitForProcessExit indicates a timeout, attempt child.kill("SIGKILL") and then throw if the second waitForProcessExit also fails (or propagate the timeout error) so stuck processes are surfaced instead of silently continuing; reference waitForProcessExit, closeElectronApp, child.exitCode, setTimeout, and child.kill in your changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tests/e2e/gif-export.spec.ts`:
- Around line 12-50: waitForProcessExit currently resolves both on real process
exit and on timeout indistinguishably; change waitForProcessExit to return a
boolean (true = observed exit before timeout, false = timed out) or to throw on
timeout so callers can react. Update waitForProcessExit's internal promise to
resolve(false) on the onTimeout path and resolve(true) on the onExit/finish path
(or reject with an Error on timeout), and then update closeElectronApp to check
the boolean/try-catch the rejection: if waitForProcessExit indicates a timeout,
attempt child.kill("SIGKILL") and then throw if the second waitForProcessExit
also fails (or propagate the timeout error) so stuck processes are surfaced
instead of silently continuing; reference waitForProcessExit, closeElectronApp,
child.exitCode, setTimeout, and child.kill in your changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1e489961-5438-4992-b85d-231c9a676898
📒 Files selected for processing (1)
tests/e2e/gif-export.spec.ts
Summary
Testing
Summary by CodeRabbit
Chores
Bug Fixes
Tests