-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
I've been looking at this as part of the work on infrastructure and there are failures like https://dnceng.visualstudio.com/internal/_test/analytics?definitionId=21&contextType=build that might be due to reliability issues in the start script.
When looking at the logs for the build above I see the following:
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 18818.387300000002ms 200 text/html; charset=UTF-8
npmfail: Microsoft.AspNetCore.SpaServices[0]
npm ERR! code ELIFECYCLE
npmnpm ERR!npm ERR!npm fail: Microsoft.AspNetCore.SpaServices[0]
npm ERR! errno 1
npm ERR! [email protected] start: `rimraf ./build && react-scripts start`
fail: Microsoft.AspNetCore.SpaServices[0]
npm ERR! Exit status 1
npm ERR!
fail: Microsoft.AspNetCore.SpaServices[0]
npm ERR! Failed at the [email protected] start script.
fail: Microsoft.AspNetCore.SpaServices[0]
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.I believe it comes from the start script in here. I don't think we can tell whether rimraf ./build or react-scripts start is the one causing the issue.
Should we consider a product change here to improve reliability for development scenarios? We could do a couple of things:
- Add retries;
- Support multiple NPM script commands and separate
rimraf ./buildfromreact-scripts start - Switch the command to use
;instead of&&which will executereact-scripts startregardless of whetherrimraf ./buildsucceeds or fails. - Execute rimraf twice in the script.
- Execute rimraf before until it succeeds in the tests to give it a better chance of success.
Ultimately this seems like a product issue our customers might run into while developing. I can't tell from the logs what is causing rimraf to fail (maybe something is holding on to a file, or the OS if bugging out (it also rarely happens)).
Although small, this is impacting the E2E tests. We need to choose whether we address the product issue (reliability) or we change the test to be more reliable there.