-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Azure Dev Ops regression with nx 8.4 affected:test task doesn't finish #1666
Comments
I tried different configurations and flags, but unfortunately nothing seems to help. yarn affected:test --runInBand --ci --base=origin/master --head=HEAD The version that we used previously (and currently for development due this problem) is 8.1. |
I update the nrwl libraries to the newest version 8.4.3. But still without luck :-( |
You could try to disable the new colorful output by setting the CI env variable to true. Something analogous to Could you try it and let us know if it helps? |
Thank you for your response! I am sorry but I am not sure if I did set the environment variable correct.
The YAML for this step
And also set an environment variable in Azure CI with the value true. Unfortunately with the same result. This is the Output of the run (stripped to the important parts. If something important is missing, please let me know) At the start
The output of test run for one of the libs
And this is on the end of the test suite (where I have to cancel it manually)
|
I encountered the described problem as well, not with Azure DevOps but with Jenkins: All After some investigation today I found the (potential) cause of the problem and a workaround: I have attached a NodeJS debugger to the hanging "nx affected:lint ..." process. Then I could evaluate So as a workaround I supply
With this workaround the CI build runs the parallel tasks without problems 🥳 Maybe the problem is caused by passing
BTW: Thank you, Nrwl, for building Nx. It's really great and improves our development workflow a lot 🙏🏻 |
Folks, thank you for troubleshooting. @Tre665 just to confirm:
|
I currently tried to replicate the workaround from @cjanz but unfortunately didn't find a way to append < /dev/null in azure dev ops yet. But I am currently investigating if this is somehow possible in Azure Devops.
Yes, we hadn't any issues before. The version before the update was pinned to 8.1.0
I feel a little bit ashamed, but currently we don't run lint on our CI server. The only other task that we run is the code format check via this command
Yes, the issues occurs with and without the --parallel flag (also --runInBand seems to do nothing with this issue) |
Thanks for the quick responses. Just to clarify and add further information to the issue: The behavior that we have encountered is not exact the same as the problem that @Tre665 has:
I hope this information helps. |
Ok I added the lint step in our pipeline and can confirm that this step will also hangs after it has successfully finished. In my case it also doesn't matter if I add the --parallel flag or not. An additional sidenote (don't know if it's useful) on the first run of
We had some lint issues which made the command finish with errors. In error case the Azure DevOp task exits as expected and doesn't hang. |
Definitely a bug. All CI builds (Bamboo for us) are stuck - once successful - from version 8.4.0 - when the new logging was introduced..? However: Everything works locally. |
We repro the issue and fixed it in 8.4.4. Thank you folks for troubleshooting it. |
@vsavkin Thank you very much for fixing the bug 🙏🏻 |
@vsavkin I also can confirm that the bug is fixed. Thank you for your quick response and the good work! |
I cannot confirm that the error is fixed, since my jobs are stuck and never finishes even though the linting/testing is done. |
@Tre665 - nx commands is not working in azure devops and it says "nx is not recognized as internal or external command" !!. Can you help me how did you solve this issue . Definitely i could see you where able to run affected test in azure devops . awaiting for your response... thanks in advance :) |
@saleemmalikraja Azure doesn't respect the binaries in Like so Your question isn't really related to the issue btw. OBS: everything is working perfectly using the latest release of Nx, I was just using an older version. |
@marcus-sa - Thanks for your input marcus.! I could find that nx command is working for others in azure devops but not working for me and its showing the below error . It would be an great help , if you could tell me how affected test has been set up |
@saleemmalikraja I just told you? If you're using NPM then run |
@marcus-sa - The problem was with the hosted agent . When my hosted agent is windows , nx command is not working and when my hosted agent is ubuntu then nx commands are working .!! I couldn't see this answer anywhere . I appreciate your help but at the same time if it works for you the same may not be the case for all .It would be good if you can understand the problem statement completely and i m glad to give more details about the context incase if the problem description is not elaborate!! |
testing with Jest? make sure to set isolatedModules: true otherwise testing takes forever on Windows machines. I had to make a hack to get this to work, see here for more info. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Please make sure you have read the submission guidelines before posting an issue
Prerequisites
Please answer the following questions for yourself before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.
Expected Behavior
run yarn affected test sends a done signal that is recognized by azure dev ops
Current Behavior
After all tests are completed the test task hangs forever.
Context
Please provide any relevant information about your setup:
8.4.1
8.1.1
Hi,
I just upgraded our dependencies to the newest NX version via yarn update.
On my local machine (MacOs) all works perfectly.
But unfortunately our CI Build (runs on ubuntu) hangs on the test task.
To run the tests for our PR triggered builds we ran the following command:
yarn affected:test --parallel --base=origin/master --head=HEAD
This worked flawlessly before the update.
Now all tests run (and pass) but the test doesn't finish. The output on the console is the following
On my local machine it is followed with this message:
✨ Done in 137.25s.
I am not sure if the ✨ is new. Could that be the issue?
Unfortunately we can't upgrade to this behaviour.
The text was updated successfully, but these errors were encountered: