-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn Test task hangs #17
Comments
Hi, I'm really sorry to hear that. What's the outcome of your tests with NPM? |
Hi, The builds do appear to be more reliable using NPM. |
#20 seems to have a similar issue. I think there might be something going wrong with yarn and angular cli. Can you provide a minimal project which would allow me to reproduce the issue? |
This is affecting me too, with an ember-cli project. Is there a way I can run the |
I don't think there's an easy way to do that. You'll have to create the repo to share it with us anyway. If you can share a repro it would be greatly appreciated. |
I wonder if for some reason the yarn or the cli is hanging waiting on some user input which would be the same issue as when there is a version conflict (tracked here #21). If it's yarn there is an undocumented Would you mind trying to add this flag to the argument in your build and see if something changes? |
Here's an example of a hang with
I'll try to create a simplified repro from scratch some time in the next few days. |
Thanks, it would be much appreciated |
@sandorfr okay, got it! https://github.com/jrr/vsts-yarn-issue-repro A successful build takes ~2 minutes, with the test step taking ~30 seconds of that. (so, if you see it stuck for more than 3 minutes, it's probably hung) It's intermittent, so you may need to try a few times before it happens. Here are my task configs, in case they're relevant: yarn install {
"environment": {},
"enabled": true,
"continueOnError": false,
"alwaysRun": false,
"displayName": "yarn",
"timeoutInMinutes": 0,
"condition": "succeeded()",
"refName": "Yarn_4",
"task": {
"id": "0888c9a9-d1b2-4567-aae2-beadcb2059b3",
"versionSpec": "1.*",
"definitionType": "task"
},
"inputs": {
"ProjectDirectory": "",
"Arguments": "",
"ProductionMode": "false",
"customRegistry": "useNpmrc",
"customFeed": "",
"customEndpoint": ""
}
}, yarn test (intermittently hangs) {
"environment": {},
"enabled": true,
"continueOnError": false,
"alwaysRun": false,
"displayName": "Test",
"timeoutInMinutes": 0,
"condition": "succeeded()",
"refName": "Yarn_7",
"task": {
"id": "0888c9a9-d1b2-4567-aae2-beadcb2059b3",
"versionSpec": "1.*",
"definitionType": "task"
},
"inputs": {
"ProjectDirectory": "",
"Arguments": "test",
"ProductionMode": "false",
"customRegistry": "useNpmrc",
"customFeed": "",
"customEndpoint": ""
}
}, npm test (reliably works) {
"environment": {},
"enabled": false,
"continueOnError": false,
"alwaysRun": false,
"displayName": "Test (workaround)",
"timeoutInMinutes": 0,
"condition": "succeeded()",
"refName": "Npm7",
"task": {
"id": "fe47e961-9fa8-4106-8639-368c022d43ad",
"versionSpec": "1.*",
"definitionType": "task"
},
"inputs": {
"command": "custom",
"workingDir": "",
"verbose": "false",
"customCommand": "run test",
"customRegistry": "useNpmrc",
"customFeed": "",
"customEndpoint": "",
"publishRegistry": "useExternalRegistry",
"publishFeed": "",
"publishEndpoint": ""
}
}, Let me know if there's anything else I can do to help. Thanks! |
We're experiencing this issue as well. We're using Yarn, and Jest as test runner. Using the yarn task within VSTS just hangs, with no feedback. We were running an old version of Yarn vsts task (0.7.xx), and upgrading to 0.28.xx did not change anything, it still hangs. Using the I've ran a couple of builds, and terminating the ones that took ~20 secs or more to complete. Only testing a subset right now to get this up and running. Yarn 0.28.4 (same with 0.7.xx)
With npm it works well:
Using npm: the small test set starts right away, and completes in an expected timeframe, not much more than what it use on my dev machine. |
Thanks for the repro @jrr, I can confirm that I reproduce the issue :) I can see the node process invoked by ember cli hanging literally doing nothing. It's really strange. Trying to figure out what's going on. |
It seems to be a windows only issue. I can't reproduce it on Linux hosted agents. |
Still happening with 1.x versions of Yarn. I wonder if it could be related to symlinks and UAC https://ember-cli.com/user-guide/#windows |
I just realized I'm not facing this issue and this is apparently related to the fact that I'm using a more recent version of node (8.x) thanks to nuget tools installer. @jrr would you give a try to see if it mitigates your issue? |
Looks like it does! Specifically:
@schei1 how about you? (does node 8 fix it for you?) So, I think it's resolved, but I'll be more confident after another week or so of builds. As far as I'm concerned you can close the issue and I'll reopen if it recurs. |
I have the feeling it's more a node/Yarn issue indeed Node 6 is supposed to
be supported, so I'll probably close this one and open it in yarn.
Le jeu. 12 oct. 2017 à 05:24, John Ruble <[email protected]> a
écrit :
… Looks like it does! Specifically:
- I can still get the hang with node 6 and *vsts-yarn-issue-repro*.
- Switching to node 8 via the *Node Tool Installer (Preview)* task
fixes it.
- I also switched to node 8 in our app, and ~5 builds later the hang
hasn't occurred.
@schei1 <https://github.com/schei1> how about you? (does node 8 fix it
for you?)
So, I think it's resolved, but I'll be more confident after another week
or so of builds. As far as I'm concerned you can close the issue and I'll
reopen if it recurs.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACiXpubH6L5p6pmD5KezzZ3JkaN8ZdcEks5srQfCgaJpZM4ODlog>
.
|
sandorfr Any updates to this issue? The hang also occurs for node 10. Thanks! |
Edit: Nevermind, I had to provide an env variable to my test script as I was using create-react-app. More details are here https://facebook.github.io/create-react-app/docs/running-tests#on-your-own-environment 2nd Edit: I should mention that I had to add the Here’s a screenshot of what I am talking about: |
Oh thanks for that information @Weffe, I need to add that to some trouble shooting steps. |
@pdemro what do you expect yarn ng build --prod to do ? Either you have a script named |
@sandorfr I'm not sure if it is what you were getting at, but I removed the Yarn task from the build and replaced with a command line task for ng build --prod. The build still takes 2-3 times as long for Angular 6 as opposed to Angular 5. This leans blame more to Devops agents rather than vsts-tasks-yarn. Thanks for your input! |
yes @pdemro it's more likely a environmental issue with angular cli. That said ng build --prod has always been quite slow from my experience, even on good hardware. |
It seems that the original issue is not happening anymore. To people facing similar issues please open a new issue with repro and traces. |
We have the following workflow...
yarn install
yarn test
yarn build
Intermittently the build will hang on the 'yarn test' task. The build will eventually timeout.
The build only ever hangs on the test task. We are using the Jest testing framework.
I've reverted back to using NPM to see if this is more reliable.
The text was updated successfully, but these errors were encountered: