Skip to content

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Aug 26, 2025

Current Behavior

The React Native e2e tests contain variable naming conflicts and inconsistent error handling in the process cleanup sections:

  • Variables named process shadow the global Node.js process object
  • Inconsistent error handling patterns in process cleanup logic
  • Some cleanup operations attempt to kill processes that may not exist

Expected Behavior

The React Native e2e tests should have:

  • Clear variable names that don't shadow global objects
  • Consistent error handling patterns throughout all test cleanup sections
  • Robust process cleanup that handles cases where processes may not be running

Changes Made

  1. Variable Naming: Renamed process variables to childProcess to avoid shadowing the global Node.js process object
  2. Error Handling: Added consistent try-catch blocks around all process cleanup operations
  3. Process Cleanup: Simplified cleanup logic by passing undefined for process ID when the process reference is not available, allowing killProcessAndPorts to handle port cleanup appropriately

This fixes issues that could occur in nightly builds where process cleanup wasn't being handled consistently, potentially leading to hanging processes or ports.

@Coly010 Coly010 self-assigned this Aug 26, 2025
Copy link

vercel bot commented Aug 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Aug 26, 2025 6:08pm

Copy link
Contributor

nx-cloud bot commented Aug 26, 2025

View your CI Pipeline Execution ↗ for commit 27bd51f

Command Status Duration Result
nx run e2e-nx:e2e-local ❌ Failed 45m 24s View ↗
nx run e2e-angular:e2e-local ❌ Failed 47m 33s View ↗
nx run e2e-next:e2e-local ❌ Failed 40m 50s View ↗
nx run e2e-workspace-create:e2e-local ❌ Failed 38m 6s View ↗
nx run e2e-js:e2e-local ❌ Failed 28m 10s View ↗
nx run e2e-release:e2e-local ❌ Failed 32m View ↗
nx run e2e-plugin:e2e-local ❌ Failed 17m 38s View ↗
nx run e2e-rollup:e2e-local ❌ Failed 6m 55s View ↗
Additional runs (21) ❌ Failed ... View ↗

☁️ Nx Cloud last updated this comment at 2025-08-26 19:33:41 UTC

@FrozenPandaz
Copy link
Collaborator

@claude Could you write a PR description for this PR please?

Copy link
Contributor

claude bot commented Aug 26, 2025

Claude finished @FrozenPandaz's task —— View job


I'll write a PR description for this React Native nightly fix.

Todo List

  • Read the modified file to understand what changes were made
  • Analyze the changes and write appropriate PR description
  • Format according to the PR template requirements

PR Description

Current Behavior

The React Native e2e tests contain variable naming conflicts and inconsistent error handling in the process cleanup sections:

  • Variables named process shadow the global Node.js process object
  • Inconsistent error handling patterns in process cleanup logic
  • Some cleanup operations attempt to kill processes that may not exist

Expected Behavior

The React Native e2e tests should have:

  • Clear variable names that don't shadow global objects
  • Consistent error handling patterns throughout all test cleanup sections
  • Robust process cleanup that handles cases where processes may not be running

Changes Made

  1. Variable Naming: Renamed process variables to childProcess to avoid shadowing the global Node.js process object
  2. Error Handling: Added consistent try-catch blocks around all process cleanup operations
  3. Process Cleanup: Simplified cleanup logic by passing undefined for process ID when the process reference is not available, allowing killProcessAndPorts to handle port cleanup appropriately

This fixes issues that could occur in nightly builds where process cleanup wasn't being handled consistently, potentially leading to hanging processes or ports.


@Coly010 Coly010 marked this pull request as ready for review August 26, 2025 20:09
@Coly010 Coly010 requested a review from a team as a code owner August 26, 2025 20:09
@Coly010 Coly010 requested a review from jaysoo August 26, 2025 20:09
@FrozenPandaz FrozenPandaz merged commit 98cf4b7 into master Aug 26, 2025
105 of 145 checks passed
@FrozenPandaz FrozenPandaz deleted the fix-react-native-nightly branch August 26, 2025 20:10
Copy link
Contributor

github-actions bot commented Sep 1, 2025

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants