-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add timeout to JS bundle creation in release builds (#14063)
## Description This PR sets a timeout for the bundle command (`npx react-native bundle`) that happens during release builds with `run-windows`. This is because sometimes Metro can hang indefinitely even after it's done, causing the command to not exit, and otherwise hold up a good build from finishing. The new timeout defaults to 5m (a new app takes ~40s to bundle) but this variable can easily be modified by defining `BundleCommandTimeoutMs` MSBuild property. For our new project tests, setting the timeout to 1m, so that, in theory, if the bundle actually finished at 40s, then timing out won't block the remainder of the build. ### Type of Change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ### Why See above. May help fix some of the times we've seen hanging with #14055. ### What See above. ## Screenshots N/A ## Testing Verified build continues after the timeout has hit. ## Changelog Should this change be included in the release notes: _yes_ Add timeout to JS bundle creation in release builds
- Loading branch information
1 parent
3191a4a
commit 914b6b7
Showing
4 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
change/react-native-windows-51a54d64-0977-4db3-9842-2c3face412ef.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "Add timeout to JS bundle creation in release builds", | ||
"packageName": "react-native-windows", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters