-
Notifications
You must be signed in to change notification settings - Fork 69
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
CI with github actions #216
Conversation
I figured out how to add back ubuntu and windows and I did fail-fast:false so that you could see macOS is completing while ubuntu and windows do not. The test failures on ubuntu are the same that I see on my windows machine when I try to run the tests. Example fun: https://github.com/nhirschey/RProvider/runs/3616975071?check_suite_focus=true |
Great to see this going through on Mac! |
@nhirschey Would you like to be co-maintainer with @AndrewIOM ? |
@dsyme, if @AndrewIOM would like the help I am happy to co-maintain with him. I am very appreciative of his hard work getting this library up to date. I use both F# and R most days for my research, so I benefit a lot from getting this library working again and stable. |
Thanks @nhirschey , would be great to co-maintain with you. It will be very beneficial to have additional support from someone experienced on both the R and F# sides! |
Thanks for your fixes! We have left one outstanding issue: building the test solution on linux and windows seems to lock up. I've just tested out building, testing, and the full 'fake run -t All' in an Ubuntu dev container with .net 5.0 and R 3.6.3 (installed at /usr/lib/R) on Ubuntu 20.04.3 LTS. All runs fine, all tests pass, makes nugets and docs fine. Need to investigate further if this is an R version issue or Github Actions issue. |
I am on windows, and the CI behavior is the same as when I run locally--I cannot use the provider or run the tests. When I try to load RProvider.dll it locks up fsharp interactive, so it seems to be the issue. Here's a screen-shot of the intellisense error ... I tried a bit of digging but haven't been able to track down the explanation for these error messages. It actually looks like this issue: dotnet/fsharp#3303 |
Can DesignTime and Runtme be netstandard2.0? That would be simplest if it works |
@nhirschey #222 might help with the issues in the IDE |
I merged #222 @nhirschey I enabled logging and got this log https://gist.github.com/dsyme/5b31f597a035fe66b371e0ca9a30ecd9 Looks like R is closing the pipe and hence the hang Looks like you might first need to do better pipe-closure detection, recovery and error reporting so this is visible and not a hang. Making the log much more visible e.g. in error reports sounds good.
|
One thing from your big pull request caught my eye:
I think RProvider.Server.exe is still getting launched on windows (see "[Server Pipe log]" messages). Is this expected in the new pipe architecture? Note: windows was local with R-4.0.2, mac was CI R-4.1.1.
As an example of differences, compare windows starting line 15:
To mac line 12
|
Thanks @nhirschey. I'm back from travelling now so have access to a Windows 10 VM and can finally start looking into the windows issues in detail today. Just got started and can reproduce the lock-up locally on windows:
Will investigate this (look at error handling / pipe closure etc.), and also the logging issue. I think the client and server are both running, but that a recent regression has stopped logs from spawned server processes being added to the text file on macOS for some reason (could be related to passing of environment variables?). These logs were there a few commits ago, and now on my local mac copy of this PR I only see logs from the client. Will investigate! Edit: so it looks like the issue only occurs on windows during fake test. I have been able to run all tests using dotnet test, and also use R from dotnet fsi. In image, left is Ubuntu with fake passing; right is windows with dotnet test and dotnet fsi working (R v4.0.2, dotnet latest v5 SDK, Windows 10 1704). It may be that it builds and runs fine when the build is triggered for a second time. |
I think I have identified the problem - the Stop command is not being sent on windows, as it never detects that the process with the given PID has ended (this is when the process is no longer present in task manager). The problematic block of code is: /// Process.WaitForExit does not seem to be working reliably
/// on Mono, so instead we loop asynchronously until the process is gone
let rec asyncWaitForExit pid = async {
let parentProcess = try Process.GetProcessById(pid) |> Some with _ -> None
match parentProcess with
| Some _ ->
do! Async.Sleep(1000)
return! asyncWaitForExit pid
| None -> () } Will work on a fix. |
Use a version of PipeMethodCalls that doesn't pack on build
Stops infinite hangs when the process has exited
Try to see if options passed by FAKE cause test instability
Change build order and enable more verbose logging for tests
Windows and macOS are now building and testing OK!
Only linux to go - this is proving tricky, as it works locally for me. Going to try R 4.0.2 locally to see if that makes a difference. |
Great progress! |
Remove the test. Process.HasExisted doesn't appear to be the issue in Github Actions...
Testing Github Actions stalling on Ubuntu 20.04
Not that either...
Fantastic! I was able to build and pass all tests on windows 10 using @AndrewIOM maybe save this for a separate issue, but when I plot something the plot window is locked up by the REngine. I cannot resize the window and if I try to close the plot window it crashes the F# process (see gif). |
I have been debugging the reasons for the Ubuntu fail on CI but not on a local machine. I have identified that it is actually REngine.GetInstance() in RInit.fs that is hanging in the Ubuntu CI, so this could be an RDotNet issue. I tried moving the engine initialisation out to a subsequent call to engine.Initialize() - this then is the step that locks up. No exceptions seem to be thrown. Not 100% sure how to proceed with this, as it works for me on the same Ubuntu version and same R version vscode dev-env. Downgrading the CI to R 3.6.3 doesn't help. Really exciting to see it all working on Windows. Thanks for testing! For the years I have used RProvider (on mac), the graphics have beachballed and been locked up when using quartz, but not when using X11. I will open an issue - definately worth a fix for both windows and mac. I propose that we remove Ubuntu for now and merge in this PR to get Windows working on CI. We could then release an RProvider v2.0.0-beta to allow wider testing of the .net 5 version. We could start a new PR to resolve the outstanding Ubuntu CI issues. What do you think? ! |
Sounds good! |
I'm really looking forward to using this library.