-
Notifications
You must be signed in to change notification settings - Fork 459
Allow running tests concurrently with watch server #11900
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
Conversation
5e72128 to
69ead8d
Compare
| Scheduler.go_with_rpc_server ~common ~config f | ||
| ;; | ||
|
|
||
| let retry_loop once = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this loop should have another abort condition? We probably don't want it to loop forever as this might block other software waiting on dune runtest forever if the connection can't be made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that would be nice. I had a go implementing this (specifically having this function timeout after some period) and it's quite straightforward however for such a feature I'd want to add a cram test, and doing so would require adding an argument to various commands to allow the user to set the timeout, or hardcoding a specific non-infinite timeout into the code. The former would be too big a change for this PR I think, and the latter would change the behaviour of dune which I'm hesitant to do.
I'll note that the code in this file was mostly just moved from bin/rpc/build.ml and not written specifically for this PR.
test/blackbox-tests/test-cases/watching/watching-eager-concurrent-runtest-command.t
Show resolved
Hide resolved
test/blackbox-tests/test-cases/watching/watching-eager-concurrent-runtest-command.t
Show resolved
Hide resolved
2701d5d to
c6ddc82
Compare
c6ddc82 to
836e7f1
Compare
|
Reading your work in cc @shonfeder you were interested in the answer as well For context, I am asking this question to better implement #11958 |
Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
2a6757b to
e23e745
Compare
That's correct. That said, there is an oversight which I made that I'll address before merging, which is that I believed that the only way to evaluate a memo is by taking the global lock and running the build system, but I've recently learnt that this is not the case as I'll see if I can take advantage of this fact to simplify this PR. |
|
I spent some time today trying to take advantage of the |
|
@ElectreAAS I've added you as a reviewer as I think the other reviewers may be short on time at the moment. |
|
That failing test is a problem installing deps with apt, so it's unrelated to this change. |
|
@gridbugs I don't think we need a dedicated runtest method for this. I think what we need is a specific RPC call for getting cram tests in a given source directory. We don't need to know about contexts on our side. If a user wishes to build the alias This cram test finder could be made a bit smarter since we don't even need to return all the tests. We should instead have something like val find_cram_test
: dir:Path.Source.t ->
[ `Filename of string | `Name of string ] ->
(Cram_test.t * [ `Enabled | `Disabled ]) option Fiber.tThat way all I'm a little hesitant to add a dedicated runtest method since it is just a |
|
Thanks @Alizter! Can you clarify why it's necessary to enumerate the cram tests in a directory using an RPC method. Is there a possibility that it will race with the build system in some way? Ideally we could just make it a fiber or memo that resolves entirely within the client, but transforming the current logic doesn't seem straightforward (but it's not immediately clear to me why). |
|
Let's discuss with @ElectreAAS and @gridbugs how best to move this forward. Ali has communicated that his comments here are not blocking. |
|
Superseded by #12473 |
No description provided.